From: Helmut Eller <eller.helmut@gmail.com>
To: 23141@debbugs.gnu.org
Subject: bug#23141: 25.1.50; emacsclient.desktop
Date: Tue, 29 Mar 2016 12:10:00 +0200 [thread overview]
Message-ID: <m2wpol4mtj.fsf@gmail.com> (raw)
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;
next reply other threads:[~2016-03-29 10:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-29 10:10 Helmut Eller [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-07-12 4:08 bug#21042: There exists etc/emacs.desktop. Please consider adding an emacsclient.desktop Vaidheeswaran C
2021-02-07 13:55 ` bug#23141: 25.1.50; emacsclient.desktop Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2wpol4mtj.fsf@gmail.com \
--to=eller.helmut@gmail.com \
--cc=23141@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.