Provide an emacsclient-mail.desktop

We provide both an emacs.desktop and an emacsclient.desktop, so for
consistency let’s do the same with mail.

* etc/emacs-mail.desktop: Extract suggestions for using emacsclient
from comments to create emacsclient-mail.desktop.
* etc/emacsclient-mail.desktop: Send mail using an existing Emacs
rather than starting a new one.
This commit is contained in:
Peter Oliver 2021-06-09 12:44:32 +01:00 committed by Lars Ingebrigtsen
parent 9eadcfdfe6
commit b1b05c828d
3 changed files with 21 additions and 13 deletions

View file

@ -1077,6 +1077,7 @@ Clicking on a 'mailto:' link in other applications will then open
Emacs with headers filled out according to the link, e.g.
"mailto:larsi@gnus.org?subject=This+is+a+test". If you prefer
emacsclient, use "emacsclient -e '(message-mailto "%u")'"
or "emacsclient-mail.desktop".
---
*** Change to default value of 'message-draft-headers' user option.

View file

@ -1,22 +1,10 @@
[Desktop Entry]
Categories=Network;Email;
Comment=GNU Emacs is an extensible, customizable text editor - and more
Exec=emacs -f message-mailto %u
Icon=emacs
Name=Emacs (Mail)
MimeType=x-scheme-handler/mailto;
NoDisplay=false
Terminal=false
Type=Application
Exec=emacs -f message-mailto %u
# # If you prefer to use emacsclient, use this instead:
# Exec=sh -c 'emacsclient --alternate-editor= --display="$DISPLAY" --eval "(message-mailto \"%u\")"'
# Actions=new-window;new-instance;
# [Desktop Action new-window]
# Name=New Window
# Exec=emacsclient --alternate-editor= --create-frame --eval '(message-mailto "%u")'
# [Desktop Action new-instance]
# Name=New Instance
# Exec=emacs -f message-mailto %u

View file

@ -0,0 +1,19 @@
[Desktop Entry]
Categories=Network;Email;
Comment=GNU Emacs is an extensible, customizable text editor - and more
Exec=sh -c 'exec emacsclient --alternate-editor= --display="$DISPLAY" --eval "(message-mailto \"%u\")"'
Icon=emacs
Name=Emacs (Mail, Client)
MimeType=x-scheme-handler/mailto;
NoDisplay=false
Terminal=false
Type=Application
Actions=new-window;new-instance;
[Desktop Action new-window]
Name=New Window
Exec=emacsclient --alternate-editor= --create-frame --eval '(message-mailto "%u")'
[Desktop Action new-instance]
Name=New Instance
Exec=emacs -f message-mailto %u