all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 4623@emacsbugs.donarmstrong.com
Subject: bug#4623: 23.1.50; rmail changes encoding of characters on save
Date: Fri, 04 Dec 2009 13:42:31 -0500	[thread overview]
Message-ID: <jwvhbs6shvt.fsf-monnier+emacsbugreports@gnu.org> (raw)
In-Reply-To: <831vjalmrl.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 04 Dec 2009 18:36:14 +0200")

> The cure for this bug, viz.
>   *** rmail.el   6 Oct 2009 06:40:40 -0000  1.554
>   --- rmail.el   13 Oct 2009 01:17:20 -0000
>   ***************
>   *** 4176,4181 ****
>   --- 4176,4182 ----
>     (defun rmail-write-region-annotate (start end)
>       (when (and (null start) (rmail-buffers-swapped-p))
>         (set-buffer rmail-view-buffer)
>   +     (set (make-local-variable 'coding-system-for-write) 'no-conversion)
>         (widen)
>         nil))

> is IMO not much better than the disease: now C-x C-s _always_ leaves
> the RMAIL buffer in no-conversion state, until you display a message,
> e.g., with "M-n".

> I think this happens because the above sets the encoding of
> rmail-view-buffer, where we display the messages, to no-conversion.

In the above code, rmail-view-buffer is (confusingly enough) the
raw-data buffer (which is why we switch to it to save the raw data), so
setting coding-system-for-write in that buffer is right.

The problem is that this setting is then somehow propagated to the other
buffer (the one we show to the user).

> Perhaps we should special-case RMAIL in save-buffer, or maybe do
> something in buffer-swap-text.

Most likely we need to do something in the rmail code that calls
buffer-swap-text.  Some debugging `message's in there showing the
coding-systems in use in each buffer before and after the swap should
make things more clear.


        Stefan





  parent reply	other threads:[~2009-12-04 18:42 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-04 16:36 bug#4623: 23.1.50; rmail changes encoding of characters on save Eli Zaretskii
2009-12-04 17:16 ` Glenn Morris
2009-12-04 18:42 ` Stefan Monnier [this message]
2009-12-04 19:15   ` Eli Zaretskii
2009-12-04 19:48     ` Stefan Monnier
2009-12-05 12:03       ` Eli Zaretskii
2009-12-05 20:10         ` Markus Rost
2009-12-05 21:52           ` Eli Zaretskii
2009-12-05 22:37             ` Markus Rost
2009-12-06  4:10               ` Eli Zaretskii
2009-12-06 14:40                 ` Markus Rost
2009-12-06 19:17             ` Eli Zaretskii
2009-12-06 20:23               ` Markus Rost
2009-12-07  4:04                 ` Eli Zaretskii
2009-12-07 19:22                   ` Eli Zaretskii
2009-12-07 19:50                     ` Markus Rost
2009-12-07 19:51                       ` Eli Zaretskii
2009-12-07  4:34         ` Stefan Monnier
2009-12-07 18:59           ` Eli Zaretskii
2009-12-07 19:25             ` Stefan Monnier
2009-12-07 19:53               ` Eli Zaretskii
2009-12-07 21:44                 ` Stefan Monnier
2009-12-08  4:14                   ` Eli Zaretskii
2009-12-08 13:47                     ` Stefan Monnier
  -- strict thread matches above, loose matches on Subject: below --
2009-10-03 14:54 Markus Rost
2009-10-13  1:21 ` Glenn Morris
2009-10-13  2:16   ` Markus Rost

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvhbs6shvt.fsf-monnier+emacsbugreports@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=4623@emacsbugs.donarmstrong.com \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.