From: Kenichi Handa <handa@m17n.org>
Cc: emacs-devel@gnu.org, joanna_p@poczta.gazeta.pl
Subject: Re: buffer-charset
Date: Fri, 11 Oct 2002 09:18:06 +0900 (JST) [thread overview]
Message-ID: <200210110018.JAA21116@etlken.m17n.org> (raw)
In-Reply-To: <E17zdSK-00032n-00@pot.cnuce.cnr.it> (message from Francesco Potorti` on Thu, 10 Oct 2002 15:34:24 +0200)
In article <E17zdSK-00032n-00@pot.cnuce.cnr.it>, Francesco Potorti` <pot@gnu.org> writes:
> I take the file in
> <ftp://alpha.gnu.org/gnu/emacs/pretest/emacs-21.2.91.announce>
> and save it into `ann'. Then
> emacs -q
> C-x m
> C-c TAB ann RET
> C-c C-c
> I get a pop-up window proposing a bunch of "safe" coding systems.
> Obviously I have no idea why ever I should change my coding system,
> given that the file I included is apparently text only. So I do:
In HEAD trunk, select-safe-coding-system is improved. It
shows problematic characters in *Warning* buffer, and you
can click on them to move point to that character.
This works well on saving a buffer, but on sending a mail
(by sendmail-send-it), select-safe-coding-system (via
select-message-coding-system) is run on "sendmail temp"
buffer, thus that buffer disappears when you type C-g.
The attached patch is to run select-message-coding-system on
the current buffer (i.e. *mail*) in advance. Could you
please try it with HEAD?
To the maintainer of sendmail.el:
Do you think it breaks something? If no, can I install that patch?
---
Ken'ichi HANDA
handa@m17n.org
*** sendmail.el.~1.258.~ Mon Sep 23 09:17:51 2002
--- sendmail.el Fri Oct 11 09:17:14 2002
***************
*** 808,816 ****
(tembuf (generate-new-buffer " sendmail temp"))
(multibyte enable-multibyte-characters)
(case-fold-search nil)
! (coding (and (local-variable-p 'buffer-file-coding-system)
! buffer-file-coding-system))
! selected-coding
;;; resend-to-addresses
delimline
fcc-was-found
--- 808,814 ----
(tembuf (generate-new-buffer " sendmail temp"))
(multibyte enable-multibyte-characters)
(case-fold-search nil)
! (selected-coding (select-message-coding-system))
;;; resend-to-addresses
delimline
fcc-was-found
***************
*** 830,836 ****
(unless multibyte
(set-buffer-multibyte nil))
(insert-buffer-substring mailbuf)
- (set-buffer-file-coding-system coding)
(goto-char (point-max))
;; require one newline at the end.
(or (= (preceding-char) ?\n)
--- 828,833 ----
***************
*** 954,960 ****
(not (re-search-forward "^MIME-version:" delimline t))
(progn (skip-chars-forward "\0-\177")
(/= (point) (point-max)))
! (setq selected-coding (select-message-coding-system))
(setq charset
(coding-system-get selected-coding 'mime-charset))
(goto-char delimline)
--- 951,957 ----
(not (re-search-forward "^MIME-version:" delimline t))
(progn (skip-chars-forward "\0-\177")
(/= (point) (point-max)))
! selected-coding
(setq charset
(coding-system-get selected-coding 'mime-charset))
(goto-char delimline)
***************
*** 983,991 ****
\\|^resent-cc:\\|^resent-bcc:"
delimline t))
(let* ((default-directory "/")
! (coding-system-for-write
! (or selected-coding
! (select-message-coding-system)))
(args
(append (list (point-min) (point-max)
program
--- 980,986 ----
\\|^resent-cc:\\|^resent-bcc:"
delimline t))
(let* ((default-directory "/")
! (coding-system-for-write selected-coding)
(args
(append (list (point-min) (point-max)
program
next prev parent reply other threads:[~2002-10-11 0:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-10 13:34 buffer-charset Francesco Potorti`
2002-10-11 0:18 ` Kenichi Handa [this message]
2002-10-11 12:44 ` buffer-charset Richard Stallman
2002-10-15 1:10 ` buffer-charset Kenichi Handa
2002-10-11 17:12 ` buffer-charset Simon Josefsson
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200210110018.JAA21116@etlken.m17n.org \
--to=handa@m17n.org \
--cc=emacs-devel@gnu.org \
--cc=joanna_p@poczta.gazeta.pl \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).