6

I want to open all text files with emacsclient. On 10.04 it used to mostly work, but on 16.04 it's completely broken:

  • emacsclient exists and works fine
  • it's missing from the "open with" menu
  • the "add" button does nothing at all
  • there are duplicates

Then I added an emacsclient.desktop entry to ~/.local/share/applications manually as found in my 10.04, but it does nothing at all.

missing-emacsclient

2 Answers2

2

You will need to add the association with text files via xdg-mime as well:

xdg-mime default emacsclient.desktop text/plain

Also, make sure you've started the Emacs server via the command M-x server-start.

halloleo
  • 141
  • 5
  • you could use --alternative-editor '' option to use existing server or start a new one automatically: Exec=/usr/bin/emacsclient -a '' -c %F See [How to use one instance of emacs as the default text editor? Linux] – jfs May 11 '19 at 10:45
0

mimeapps.list file is present in .local/share/applications open it and add text/plain=emacs.desktop in it so that all text files will open in emacs