GNU bug report logs - #75397
29.4; GNUS message mode lacks Cyrillic support (GNU/Linux)

Previous Next

Package: emacs;

Reported by: "Nickolai Dobrynin" <ndobrynin <at> gmail.com>

Date: Mon, 6 Jan 2025 09:09:03 UTC

Severity: wishlist

Found in version 29.4

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 75397 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: 75397 <at> debbugs.gnu.org, ndobrynin <at> gmail.com
Subject: Re: bug#75397: 29.4;
 GNUS message mode lacks Cyrillic support (GNU/Linux)
Date: Wed, 08 Jan 2025 17:30:18 +0200
> Cc: 75397 <at> debbugs.gnu.org
> From: Andreas Schwab <schwab <at> linux-m68k.org>
> Date: Mon, 06 Jan 2025 10:36:34 +0100
> 
> On Jan 06 2025, Nickolai Dobrynin wrote:
> 
> > 1. Type M-gnus to start GNUS.
> > 2. Start composing a message by pressing 'm'.
> > 3. Enter the first, say, 5 letters of the Cyrillic alphabet, i.e. абвгд.
> > 4. Press C-c C-d to save the draft.
> > 5. Press S D e to resume editing.
> > 6. Bizarrely enough, instead of "абвгд", you will see a sequence of digits "01234".
> >
> > Is this even real?? By the way, this does not occur with ordinary text
> > files. And everything works fine in the view mode inside the draft
> > group. Pressing S D e, on the other hand, makes things go haywire.
> 
> The problem is that message-dont-send doesn't encode the message when it
> saves it.

I must be missing something here, because I don't see what you
describe above:

  (defun message-dont-send ()
    "Don't send the message you have been editing.
  Instead, just auto-save the buffer and then bury it."
    (interactive nil message-mode)
    (set-buffer-modified-p t)
    (save-buffer)  <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
    (let ((actions message-postpone-actions))
      (message-bury (current-buffer))
      (message-do-actions actions)))

So message-dont-send saves the buffer.  And that buffer has a
buffer-file-coding-system set in message-set-auto-save-file-name,
which is called when message-mode is turned on (which is supposed to
happen when you press 'm' in Gnus):

    (setq buffer-file-coding-system message-draft-coding-system)))

And message-draft-coding-system is:


  (defvar message-draft-coding-system mm-auto-save-coding-system
    "Coding system to compose mail.")

which in my testing, starting from "emacs -Q", produces utf-8-emacs,
as I'd expect.

In my testing, the draft is saved using utf-8-emacs, and if I them
visit it, I get the Cyrillic text back.  As expected.

So where does the above breaks?  Is the value of
mm-auto-save-coding-system different?  Otherwise, save-buffer should
have encoded the draft's text.  What did I miss?




This bug report was last modified 119 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.