Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 885981 - app-emacs/emacs-common-1.8: does not install all GNU Emacs .desktops
Summary: app-emacs/emacs-common-1.8: does not install all GNU Emacs .desktops
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: GNU Emacs project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-14 18:46 UTC by Arsen Arsenović
Modified: 2022-12-19 17:46 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arsen Arsenović gentoo-dev 2022-12-14 18:46:06 UTC
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.
Comment 1 Ulrich Müller gentoo-dev 2022-12-15 08:46:51 UTC
The problem is that this won't work for all slots. message-mailto is a relatively new feature introduced with Emacs 28.
Comment 2 Arsen Arsenović gentoo-dev 2022-12-15 21:40:38 UTC
Would it need to be handled by eselect then?
Comment 3 Ulrich Müller gentoo-dev 2022-12-16 07:24:52 UTC
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.
Comment 4 Ulrich Müller gentoo-dev 2022-12-16 08:25:26 UTC
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."
Comment 5 Larry the Git Cow gentoo-dev 2022-12-16 18:05:52 UTC
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(+)
Comment 6 Arsen Arsenović gentoo-dev 2022-12-19 15:13:38 UTC
Lovely!  Thanks.