I use Pop OS 20.04 on my desktop. When I start Emacs on login, I run the command (server-start). So when I open a file using the command emacsclient <filename> it opens it in the currently running emacs session. I love this.

However, when I double click text files in the native file explorer a new Emacs session is started. How do I force all files to open in the same Emacs session?

1 Answer 1


The details will depend on the particular file browser you're using, but you need to set the default program for opening text files to emacsclient, rather than emacs.

  • Thank you. How do we do that? PopOS runs GNOME. I can't even set Emacs as the default editor. And I have tried updating the defaults.list and the update-alternatives method suggested on this site elsewhere. The best I could do was select Emacs as the default editor for .org files from the GUI. But I couldn't enforce Emacs to be the default editor for the system. Gedit is the default editor for my system. Feb 27, 2021 at 22:14
  • 1
    I don't know. That would be a good question for a Pop OS forum, I'm not familiar with it
    – Tyler
    Mar 1, 2021 at 13:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.