emacs-common currently does not install all the .desktop files that Emacs provides: [c] ~ 1 $ qlist -e app-emacs/emacs-common | grep '\.desktop$' /usr/share/applications/emacsclient.desktop /usr/share/applications/emacs.desktop [c] ~$ qlist -e app-editors/emacs | grep '\.desktop$' /usr/share/emacs/29.0.60/etc/emacsclient.desktop /usr/share/emacs/29.0.60/etc/emacs.desktop /usr/share/emacs/29.0.60/etc/emacs-mail.desktop /usr/share/emacs/29.0.60/etc/emacsclient-mail.desktop [i] ~$ AFAICT, adding the -mails would be trivial, since they appear to be largely similar to their non -mail parts.
The problem is that this won't work for all slots. message-mailto is a relatively new feature introduced with Emacs 28.
Would it need to be handled by eselect then?
eselect doesn't look like the right tool for this. We could think about a separate package like app-emacs/emacs-desktop-mail that would install just the two desktop files.
Actually, the emacsclient-mail.desktop file from upstream seems to be invalid. It has this (note the %u field code inside the quoted argument): Exec=sh -c "exec emacsclient --alternate-editor= --display=\\"\\$DISPLAY\\" --eval \\\\(message-mailto\\\\ \\\\\\"%u\\\\\\"\\\\)" However, the Desktop Entry Specification https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#exec-variables says: "Field codes must not be used inside a quoted argument, the result of field code expansion inside a quoted argument is undefined."
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e7c3de949b9565006c50eebcc50fdf9f66791fb5 commit e7c3de949b9565006c50eebcc50fdf9f66791fb5 Author: Ulrich Müller <ulm@gentoo.org> AuthorDate: 2022-12-16 18:03:16 +0000 Commit: Ulrich Müller <ulm@gentoo.org> CommitDate: 2022-12-16 18:05:12 +0000 x11-misc/emacs-desktop-mail: Initial import Ebuild contributed by me. Closes: https://bugs.gentoo.org/885981 Signed-off-by: Ulrich Müller <ulm@gentoo.org> .../emacs-desktop-mail-1.0.ebuild | 53 ++++++++++++++++++++++ x11-misc/emacs-desktop-mail/metadata.xml | 9 ++++ 2 files changed, 62 insertions(+)
Lovely! Thanks.