From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: buffer-charset Date: Fri, 11 Oct 2002 09:18:06 +0900 (JST) Sender: emacs-devel-admin@gnu.org Message-ID: <200210110018.JAA21116@etlken.m17n.org> References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: main.gmane.org 1034295657 29496 127.0.0.1 (11 Oct 2002 00:20:57 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 11 Oct 2002 00:20:57 +0000 (UTC) Cc: emacs-devel@gnu.org, joanna_p@poczta.gazeta.pl Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17znXz-0007fV-00 for ; Fri, 11 Oct 2002 02:20:55 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17zoMk-0000J0-00 for ; Fri, 11 Oct 2002 03:13:22 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17znWI-0000WZ-00; Thu, 10 Oct 2002 20:19:10 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17znVX-00076f-00 for emacs-devel@gnu.org; Thu, 10 Oct 2002 20:18:23 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17znVR-0006sA-00 for emacs-devel@gnu.org; Thu, 10 Oct 2002 20:18:22 -0400 Original-Received: from tsukuba.m17n.org ([192.47.44.130]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17znVR-0006dh-00; Thu, 10 Oct 2002 20:18:17 -0400 Original-Received: from fs.m17n.org (fs.m17n.org [192.47.44.2]) by tsukuba.m17n.org (8.11.6/3.7W-20010518204228) with ESMTP id g9B0I6F15426; Fri, 11 Oct 2002 09:18:06 +0900 (JST) (envelope-from handa@m17n.org) Original-Received: from etlken.m17n.org (etlken.m17n.org [192.47.44.125]) by fs.m17n.org (8.11.3/3.7W-20010823150639) with ESMTP id g9B0I6R29122; Fri, 11 Oct 2002 09:18:06 +0900 (JST) Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id JAA21116; Fri, 11 Oct 2002 09:18:06 +0900 (JST) Original-To: pot@gnu.org In-reply-to: (message from Francesco Potorti` on Thu, 10 Oct 2002 15:34:24 +0200) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.1.30 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:8516 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:8516 In article , Francesco Potorti` writes: > I take the file in > > 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