Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #269422

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

From Max Nikulin <manikulin@gmail.com>
Newsgroups linux.debian.user
Subject Re: Bookworm's /etc/mailcap seems to break s-nail
Date 2024-05-17 13:00 +0200
Message-ID <IF3tE-dWrj-5@gated-at.bofh.it> (permalink)
References (2 earlier) <IB7vP-bv5W-13@gated-at.bofh.it> <IBrux-bHif-3@gated-at.bofh.it> <IBvRv-bK09-5@gated-at.bofh.it> <IEpcR-dxWM-11@gated-at.bofh.it> <IEE2d-dGV1-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Bookworm's /etc/mailcap seems to break s-nail Jesper Dybdal <jd-debian-user@dybdal.dk> - 2024-05-06 15:10 +0200
  Re: Bookworm's /etc/mailcap seems to break s-nail Greg Wooledge <greg@wooledge.org> - 2024-05-06 15:30 +0200
    Re: Bookworm's /etc/mailcap seems to break s-nail Jesper Dybdal <jd-debian-user@dybdal.dk> - 2024-05-06 16:10 +0200
    Re: Bookworm's /etc/mailcap seems to break s-nail Max Nikulin <manikulin@gmail.com> - 2024-05-06 16:30 +0200
      Re: Bookworm's /etc/mailcap seems to break s-nail Max Nikulin <manikulin@gmail.com> - 2024-05-06 17:10 +0200
      Re: Bookworm's /etc/mailcap seems to break s-nail Jesper Dybdal <jd-debian-user@dybdal.dk> - 2024-05-07 13:50 +0200
        Re: Bookworm's /etc/mailcap seems to break s-nail Max Nikulin <manikulin@gmail.com> - 2024-05-07 18:30 +0200
          Re: Bookworm's /etc/mailcap seems to break s-nail Max Nikulin <manikulin@gmail.com> - 2024-05-15 18:00 +0200
            Re: Bookworm's /etc/mailcap seems to break s-nail "Jonathan Dowland" <jmtd@debian.org> - 2024-05-16 09:50 +0200
              Re: Bookworm's /etc/mailcap seems to break s-nail Max Nikulin <manikulin@gmail.com> - 2024-05-17 13:00 +0200
                Re: Bookworm's /etc/mailcap seems to break s-nail "Jonathan Dowland" <jmtd@debian.org> - 2024-05-20 11:50 +0200
            Re: Bookworm's /etc/mailcap seems to break s-nail Jesper Dybdal <jesper@dybdal.dk> - 2024-05-17 22:50 +0200
  Re: Bookworm's /etc/mailcap seems to break s-nail David Wright <deblis@lionunicorn.co.uk> - 2024-05-06 17:00 +0200
    Re: Bookworm's /etc/mailcap seems to break s-nail Max Nikulin <manikulin@gmail.com> - 2024-05-06 17:10 +0200

csiph-web