• Bookworm's /etc/mailcap seems to break s-nail

    From Jesper Dybdal@21:1/5 to All on Mon May 6 15:10:01 2024
    I use s-nail as my mailx command (selected using the Debian
    "alternatives" mechanism).

    Since I upgraded from Bullseye to Bookworm, s-nail now shows a bunch of
    error messages in connection with viewing messages.  Here is a sample:
    s-nail: $MAILCAPS: /etc/mailcap: x-scheme-handler/mailto: ignored
    unknown string/command: u = \\${u//\\\\\\"/\\\\\\\\\\\\\\"}
    s-nail: $MAILCAPS: /etc/mailcap: text/english: ignored unknown string/command: then exec emacsclient --alternate-editor = --display=\\"\\$DISPLAY\\" \\"\\$@\\"
    s-nail: $MAILCAPS: /etc/mailcap: text/plain: ignored unknown
    string/command: then exec emacsclient --alternate-editor = --display=\\"\\$DISPLAY\\" \\"\\$@\\"
    s-nail: $MAILCAPS: /etc/mailcap: text/x-makefile: ignored unknown string/command: then exec emacsclient --alternate-editor = --display=\\"\\$DISPLAY\\" \\"\\$@\\"
    s-nail: $MAILCAPS: /etc/mailcap: text/x-c++hdr: ignored unknown string/command: then exec emacsclient --alternate-editor = --display=\\"\\$DISPLAY\\" \\"\\$@\\"
    s-nail: $MAILCAPS: /etc/mailcap: text/x-c++src: ignored unknown string/command: then exec emacsclient --alternate-editor

    I have no particular wish to learn about /etc/mailcap.  The only way
    I've found to avoid this is to remove the /etc/mailcap file entirely.

    The package versions involved are:
    * in Bullseye:
       mailcap/oldstable,now 3.69 all [installed,automatic]
       s-nail/oldstable,now 14.9.22-1 amd64 [installed]
    * In Bookworm:
       mailcap/stable,now 3.70+nmu1 all [installed,automatic]
       j-nail/stable,now 14.9.24-2 amd64 [installed]

    Has anyone else seen this?

    Thanks,
    Jesper

    --
    Jesper Dybdal
    https://www.dybdal.dk

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jesper Dybdal@21:1/5 to Greg Wooledge on Mon May 6 16:10:01 2024
    On 2024-05-06 15:27, Greg Wooledge wrote:
    On Mon, May 06, 2024 at 02:53:10PM +0200, Jesper Dybdal wrote:
    I use s-nail as my mailx command (selected using the Debian "alternatives" >> mechanism).

    Since I upgraded from Bullseye to Bookworm, s-nail now shows a bunch of
    error messages in connection with viewing messages.  Here is a sample:
    s-nail: $MAILCAPS: /etc/mailcap: x-scheme-handler/mailto: ignored
    unknown string/command: u = \\${u//\\\\\\"/\\\\\\\\\\\\\\"}
    s-nail: $MAILCAPS: /etc/mailcap: text/english: ignored unknown
    string/command: then exec emacsclient --alternate-editor =
    --display=\\"\\$DISPLAY\\" \\"\\$@\\"
    I don't have lines like this in mine. Then again, I don't have emacs installed.

    The question (one of the questions) is what's putting them there, and I
    would guess one of the emacs packages is doing it.
    I have no particular wish to learn about /etc/mailcap.  The only way I've >> found to avoid this is to remove the /etc/mailcap file entirely.

    I would think deleting any lines containing "emacs" would be slightly
    less invasive. Obviously, make a backup copy of the file first.
    That might be an excellent idea.  I've removed all lines with
    "emacsclient" (there were also some with "emacs", but not
    "emacsclient"), and the error messages have disappeared.  Since I only
    use s-nail rarely. it may be a while before I know whether that removal
    also has negative consequences.

    Thanks a lot, Greg!

    --
    Jesper Dybdal
    https://www.dybdal.dk

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Greg Wooledge@21:1/5 to Jesper Dybdal on Mon May 6 15:30:01 2024
    On Mon, May 06, 2024 at 02:53:10PM +0200, Jesper Dybdal wrote:
    I use s-nail as my mailx command (selected using the Debian "alternatives" mechanism).

    Since I upgraded from Bullseye to Bookworm, s-nail now shows a bunch of
    error messages in connection with viewing messages. Here is a sample:
    s-nail: $MAILCAPS: /etc/mailcap: x-scheme-handler/mailto: ignored
    unknown string/command: u = \\${u//\\\\\\"/\\\\\\\\\\\\\\"}
    s-nail: $MAILCAPS: /etc/mailcap: text/english: ignored unknown string/command: then exec emacsclient --alternate-editor = --display=\\"\\$DISPLAY\\" \\"\\$@\\"

    I don't have lines like this in mine. Then again, I don't have emacs installed.

    The question (one of the questions) is what's putting them there, and I
    would guess one of the emacs packages is doing it.

    I have no particular wish to learn about/etc/mailcap. The only way I've found to avoid this is to remove the /etc/mailcap file entirely.

    I would think deleting any lines containing "emacs" would be slightly
    less invasive. Obviously, make a backup copy of the file first.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Wright@21:1/5 to Jesper Dybdal on Mon May 6 17:00:01 2024
    On Mon 06 May 2024 at 14:53:10 (+0200), Jesper Dybdal wrote:

    The package versions involved are:
    * in Bullseye:
       mailcap/oldstable,now 3.69 all [installed,automatic]
       s-nail/oldstable,now 14.9.22-1 amd64 [installed]
    * In Bookworm:
       mailcap/stable,now 3.70+nmu1 all [installed,automatic]
       j-nail/stable,now 14.9.24-2 amd64 [installed]



    Has anyone else seen this?

    No.

    Cheers,
    David.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jesper Dybdal@21:1/5 to Max Nikulin on Tue May 7 13:50:01 2024
    On 2024-05-06 16:24, Max Nikulin wrote:
    On 06/05/2024 20:27, Greg Wooledge wrote:
    On Mon, May 06, 2024 at 02:53:10PM +0200, Jesper Dybdal wrote:
    s-nail: $MAILCAPS: /etc/mailcap: text/english: ignored unknown
    string/command: then exec emacsclient --alternate-editor =
    --display=\\"\\$DISPLAY\\" \\"\\$@\\"
    ...
    It seems there are a couple of bugs in update-mime:
    ...
    2. It does not skip x-scheme-handler/* entries. Are there applications
    that may use such entries?

    On 2024-05-06 17:04, Max Nikulin wrote:
    So doubled backslashes (as in .desktop files) are correct.

    What is wrong is lack of backslashes added before ";" and it is a bug.

    I have now removed the "x-scheme-handler/mailto" entry and added
    backslashes in all the
    emacsclient entries in mailcap, and the error messages are gone.

    Thanks a lot to Max and everybody else who responsed.

    Jesper

    --
    Jesper Dybdal
    https://www.dybdal.dk

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jonathan Dowland@21:1/5 to Max Nikulin on Thu May 16 09:50:01 2024
    On Wed May 15, 2024 at 4:51 PM BST, Max Nikulin wrote:
    On 07/05/2024 23:24, Max Nikulin wrote:
    On 2024-05-06 17:04, Max Nikulin wrote:
    So doubled backslashes (as in .desktop files) are correct.

    What is wrong is lack of backslashes added before ";" and it is a bug.

    I have filed
    https://bugs.debian.org/1071036
    update-mime does not escape semicolon in .desktop Exec entries

    Thanks for persevering with this!

    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.


    --
    Please do not CC me for listmail.

    👱🏻 Jonathan Dowland
    jmtd@debian.org
    🔗 https://jmtd.net

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jesper Dybdal@21:1/5 to Max Nikulin on Fri May 17 22:50:21 2024
    On 2024-05-15 17:51, Max Nikulin wrote:
    I have filed
    https://bugs.debian.org/1071036
    update-mime does not escape semicolon in .desktop Exec entries

    Thanks!  I should have done that, but I've postponed it because I felt I didn't know enough about the context.  (I just run Emacs on a Debian
    server box, shoving emacs frames on an X server running under Windows.)

    --
    Jesper Dybdal
    https://www.dybdal.dk

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jonathan Dowland@21:1/5 to Max Nikulin on Mon May 20 11:50:01 2024
    On Fri May 17, 2024 at 11:56 AM BST, Max Nikulin wrote:
    You may file an issue to the emacs bug tracker.

    I didn't realise this was coming straight from upstream. If it were
    a Debian-local issue, I'd file something, but I will respectfully
    decline to engage with Emacs upstream.

    (Interesting to see another user of debbugs out there Today, besides
    Debian!)

    However at least one developer was against wrappers:


    Thank you for sharing these upstream bugs. They make for fascinating
    (if occasionally horrifying) reading.

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

    I agree.

    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.

    So I did: Apologies! It seems my new favourite MUA (aerc) does not
    handle list replies by default as I would like it to/as I was used
    to with mutt. I will be more careful.


    --
    Please do not CC me for listmail.

    👱🏻 Jonathan Dowland
    jmtd@debian.org
    🔗 https://jmtd.net

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)