From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: [david.reitter@gmail.com: recentf: "Select coding system" on quit] Date: Thu, 21 Apr 2005 14:37:12 +0900 (JST) Message-ID: <200504210537.OAA29195@etlken.m17n.org> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1114061773 3288 80.91.229.2 (21 Apr 2005 05:36:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 21 Apr 2005 05:36:13 +0000 (UTC) Cc: david.reitter@gmail.com, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Apr 21 07:36:04 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DOULy-0004Mp-5B for ged-emacs-devel@m.gmane.org; Thu, 21 Apr 2005 07:35:54 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DOUQc-0008EQ-7T for ged-emacs-devel@m.gmane.org; Thu, 21 Apr 2005 01:40:42 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DOUQI-0008E9-Vv for emacs-devel@gnu.org; Thu, 21 Apr 2005 01:40:23 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DOUQH-0008Dh-Di for emacs-devel@gnu.org; Thu, 21 Apr 2005 01:40:22 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DOUQG-0008AT-Tj for emacs-devel@gnu.org; Thu, 21 Apr 2005 01:40:21 -0400 Original-Received: from [192.47.44.130] (helo=tsukuba.m17n.org) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1DOUPc-0005jF-Px; Thu, 21 Apr 2005 01:39:41 -0400 Original-Received: from nfs.m17n.org (nfs.m17n.org [192.47.44.7]) by tsukuba.m17n.org (8.12.3/8.12.3/Debian-7.1) with ESMTP id j3L5bCdY018859; Thu, 21 Apr 2005 14:37:12 +0900 Original-Received: from etlken.m17n.org (etlken.m17n.org [192.47.44.125]) by nfs.m17n.org (8.12.3/8.12.3/Debian-7.1) with ESMTP id j3L5bCDI001238; Thu, 21 Apr 2005 14:37:12 +0900 Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id OAA29195; Thu, 21 Apr 2005 14:37:12 +0900 (JST) Original-To: rms@gnu.org In-reply-to: (message from Richard Stallman on Sun, 17 Apr 2005 15:20:05 -0400) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/22.0.50 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:36222 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:36222 In article , Richard Stallman writes: > Would you please DTRT and ack? > ------- Start of forwarded message ------- > To: emacs-pretest-bug@gnu.org > From: David Reitter > Date: Sun, 17 Apr 2005 10:29:34 +0100 > Subject: recentf: "Select coding system" on quit [...] > The recentf library asks the user "Select coding system" upon quitting > emacs what coding system to use when one of the recent files is one > with non-ascii characters, instead of non-interactively (i.e. > automatically) choosing a safe coding system such as utf-8. > This is generated by mule-cmds.el, possibly > select-safe-coding-system-interactively or something like that. I think the attached patch will fix the problem. Shall I install it? The code: (if (coding-system-p 'utf-8-emacs) ...) is for emacs-unicode. --- Ken'ichi HANDA handa@m17n.org 2005-04-21 Kenichi Handa * recentf.el (recentf-save-file-coding-system): New variable. (recentf-save-list): Encode the file by recentf-save-file-coding-system and add coding: tag. * international/mule-cmds.el: Add autoload for widget-value in eval-when-compile *** recentf.el 25 Mar 2005 10:37:27 +0900 1.35 --- recentf.el 21 Apr 2005 14:23:21 +0900 *************** *** 1137,1142 **** --- 1137,1148 ---- ";;; Automatically generated by `recentf' on %s.\n" "Header to be written into the `recentf-save-file'.") + (defconst recentf-save-file-coding-system + (if (coding-system-p 'utf-8-emacs) + 'utf-8-emacs + 'emacs-mule) + "Coding system of the file `recentf-save-file'.") + (defun recentf-save-list () "Save the recent list. Write data into the file specified by `recentf-save-file'." *************** *** 1144,1152 **** --- 1150,1162 ---- (condition-case error (with-temp-buffer (erase-buffer) + (set-buffer-file-coding-system recentf-save-file-coding-system) (insert (format recentf-save-file-header (current-time-string))) (recentf-dump-variable 'recentf-list recentf-max-saved-items) (recentf-dump-variable 'recentf-filter-changer-state) + (insert ";;; Local Variables:\n" + (format ";;; coding: %s\n" recentf-save-file-coding-system) + ";;; End:\n") (write-file (expand-file-name recentf-save-file)) nil) (error