GNU bug report logs -
#23141
25.1.50; emacsclient.desktop
Previous Next
Reported by: Helmut Eller <eller.helmut <at> gmail.com>
Date: Tue, 29 Mar 2016 10:11:01 UTC
Severity: wishlist
Tags: fixed
Merged with 21042
Found in version 25.1.50
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
It would be useful to have a emacsclient.desktop file, because that
makes it possible to use emacsclient with docks/panels or the "Open
with" menu in some file managers.
Emacs already comes with emacs.desktop file, but that starts a new Emacs
process every time. The emacsclient.desktop should use an existing
Emacs if there is one or start a new Emacs if there is none.
I created my own emacsclient.desktop (see below) but I think many people
would like something like that and it would be more efficient to ship a
good emacsclient.desktop with Emacs.
My version uses two (perhaps not so obvious) tricks:
1) the "-a emacs" part starts a new Emacs if no existing Emacs process
can be found
2) adding +0 makes it possible to start emacsclient without file
argument. Emacs will then switch to the scratch buffer.
[Desktop Entry]
Name=Emacsclient
Comment=Tells a running Emacs to visit a file
Exec=emacsclient -a emacs --no-wait +0 %F
Icon=emacs24
Terminal=false
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
Type=Application
Categories=Utility;Development;TextEditor;
This bug report was last modified 4 years and 107 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.