From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Ponce Newsgroups: gmane.emacs.devel Subject: Re: [david.reitter@gmail.com: recentf: "Select coding system" on quit] Date: Thu, 21 Apr 2005 19:10:59 +0200 Message-ID: <4267DEA3.8040802@wanadoo.fr> References: <16131584.1114096593070.JavaMail.www@wwinf1101> <87hdi08465.fsf@xs4all.nl> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1114218646 27721 80.91.229.2 (23 Apr 2005 01:10:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 23 Apr 2005 01:10:46 +0000 (UTC) Cc: david.reitter@gmail.com, handa@m17n.org, rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Apr 23 03:10:43 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DP9AO-0005dY-Ae for ged-emacs-devel@m.gmane.org; Sat, 23 Apr 2005 03:10:40 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DP9FP-0000Nv-Dk for ged-emacs-devel@m.gmane.org; Fri, 22 Apr 2005 21:15:51 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DP9EG-0008Uq-28 for emacs-devel@gnu.org; Fri, 22 Apr 2005 21:14:40 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DP9ED-0008UD-Nz for emacs-devel@gnu.org; Fri, 22 Apr 2005 21:14:39 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DP9ED-0008QD-Km for emacs-devel@gnu.org; Fri, 22 Apr 2005 21:14:37 -0400 Original-Received: from [199.232.41.67] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_ARCFOUR_SHA:16) (Exim 4.34) id 1DP9E7-0006L8-Is for emacs-devel@gnu.org; Fri, 22 Apr 2005 21:14:31 -0400 Original-Received: from [193.252.22.24] (helo=smtp7.wanadoo.fr) by mx20.gnu.org with esmtp (Exim 4.34) id 1DOfBk-000611-89 for emacs-devel@gnu.org; Thu, 21 Apr 2005 13:10:04 -0400 Original-Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf0703.wanadoo.fr (SMTP Server) with ESMTP id 4C6F81000051 for ; Thu, 21 Apr 2005 19:10:03 +0200 (CEST) Original-Received: from [192.168.1.2] (AGrenoble-152-1-46-63.w82-122.abo.wanadoo.fr [82.122.136.63]) by mwinf0703.wanadoo.fr (SMTP Server) with ESMTP id A826510000AC; Thu, 21 Apr 2005 19:10:02 +0200 (CEST) X-ME-UUID: 20050421171002688.A826510000AC@mwinf0703.wanadoo.fr User-Agent: Mozilla Thunderbird 1.0.2-1.3.2 (X11/20050324) X-Accept-Language: en-us, en Original-To: Lute Kamstra In-Reply-To: <87hdi08465.fsf@xs4all.nl> 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:36282 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:36282 > Isn't inserting a ^L at the proper place the canonical solution? Yes you're right. Following is a new patch. Thanks! David Index: recentf.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/recentf.el,v retrieving revision 1.35 diff -c -r1.35 recentf.el *** recentf.el 23 Mar 2005 07:20:48 -0000 1.35 --- recentf.el 21 Apr 2005 17:08:50 -0000 *************** *** 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 "\n \n;;; Local Variables:\n" + (format ";;; coding: %s\n" recentf-save-file-coding-system) + ";;; End:\n") (write-file (expand-file-name recentf-save-file)) nil) (error *************** *** 1207,1212 **** (provide 'recentf) (run-hooks 'recentf-load-hook) ! ;;; arch-tag: 78f1eec9-0d16-4d19-a4eb-2e4529edb62a ;;; recentf.el ends here --- 1217,1222 ---- (provide 'recentf) (run-hooks 'recentf-load-hook) ! ;;; arch-tag: 78f1eec9-0d16-4d19-a4eb-2e4529edb62a ;;; recentf.el ends here