[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bookworm's /etc/mailcap seems to break s-nail



On 16/05/2024 14:48, Jonathan Dowland wrote:
On Wed May 15, 2024 at 4:51 PM BST, Max Nikulin wrote:
https://bugs.debian.org/1071036
update-mime does not escape semicolon in .desktop Exec entries

Re-reading your bug report I'm struck by how hard to reason about
(and test) the emacs .desktop Exec= line is. Personally I'd break
that out to a separate wrapper script, which wouldn't fix the root
issue you've identified, but wouldn't trigger it.

You may file an issue to the emacs bug tracker. I agree that more simple Exec entries in .desktop files will be easier to maintain.

However at least one developer was against wrappers:
https://debbugs.gnu.org/57752#8
Lars Ingebrigtsen, Tue, 13 Sep 2022 14:19:47 +0200
I'd prefer to have a .desktop file that works without any helper
scripts.

Later CVE-2023-27985 and CVE-2023-27986 were assigned for quoting in emacsclient .desktop files and there was an intermediate step:
https://debbugs.gnu.org/60204

Actually a feature that allows to simplify .desktop files was added to the development branch despite strong opposition:
https://debbugs.gnu.org/65902
-Exec=sh -c "u=\\$(echo \\"\\$1\\" | sed 's/[\\\\\\"]/\\\\\\\\&/g'); exec emacsclient --alternate-editor= --display=\\"\\$DISPLAY\\" --eval \\"(message-mailto \\\\\\"\\$u\\\\\\")\\"" sh %u
+Exec=emacsclient --alternate-editor= --eval "(message-mailto (pop server-eval-args-left))" %u

From my point of view, the following stance is spectacular:
https://debbugs.gnu.org/65902#79
Eli Zaretskii, Thu, 14 Sep 2023 16:36:06 +0300
Emacs developers make mistakes even in the simple regexps we have in
our code.  That doesn't mean we should abandon regexps.  The solution
for sending Lisp forms to the server exists, and the quoting, although
tricky in some cases, is not rocket science to get right.

emacsclient.desktop still has a complex shell command.

By the way, I have not noticed handling of %f substitutions in Emacs code for handling .desktop files, not to mention \n, \t, \s
https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/dired-aux.el#n1364
shell-command-guess-xdg function

Finally, I think that s-nail should ignore malformed mailcap entries.

On 16/05/2024 14:48, Jonathan Dowland wrote:
Please do not CC me for listmail.

You still decided to add my address to CC despite I joined to the thread, not started it. I expect it is enough to guess that I am able to follow the discussion even not being subscribed.



Reply to: