[xubuntu-users] How can I change the default graphical editor to emacs-nox

Victor Forberger vforberger at fastmail.fm
Sat Jun 21 22:25:35 UTC 2014


On 06/13/2014 04:15 PM, James Freer wrote:
> I have been learning emacs and wanted to use it as the default editor
> i.e. apply association so that I can click on a .txt file on the Desktop
> and enter into emacs. Why nox as opposed to standard gui version? - I
> find the console one a bit quicker and less dependencies to install.
> 
> I've been doing "lookup & learn" and come a little unstuck - thus
> grateful for a little help. I found this (below) and made the .desktop
> file. It provided the association in the 'open with' window. Went into
> properties and selected emacs-nox for .txt files. No icon?
> 
> File placed in home .local/share/applications/emacs.desktop
> [Desktop Entry]
> Name=Emacs-nox
> Comment=Edit text files
> Exec=emacs %F
> Terminal=true
> Type=Application
> Icon=Emacs
> Categories=;
> StartupNotify=true
> MimeType=text/plain;
> 
> a] When I click on a .txt file it opens up the file in emacs-nox
> although the terminal window opens first small, and then maximised with
> emacs and the .txt file. But why - it does seem slow? I have set the
> terminal to default to max.
> 
> b] However, if I in Thunar go to .local/share/applications and click
> onto emacs.desktop - it immediately loads emacs in a maximised window
> which is what I want.
> 
> So it seems that something isn't quite right with the associations or ?
> and I'd be grateful if someone could guide me.
> 
> thanks
> james
> 

I use emacs -nw for my non-X emacs editing.

FYI, I have the following aliases defined for myself:

# emacs aliases
alias sudem='sudo emacs -nw'
alias em='emacs -nw'

- Victor


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 538 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/xubuntu-users/attachments/20140621/b8035be6/attachment.sig>


More information about the xubuntu-users mailing list