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 17:16:33 +0200 (CEST) Message-ID: <16131584.1114096593070.JavaMail.www@wwinf1101> Reply-To: david.ponce@wanadoo.fr NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1114096384 15387 80.91.229.2 (21 Apr 2005 15:13:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 21 Apr 2005 15:13:04 +0000 (UTC) Cc: david.reitter@gmail.com, rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Apr 21 17:13:01 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DOdMB-0001Hk-KH for ged-emacs-devel@m.gmane.org; Thu, 21 Apr 2005 17:12:44 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DOdQu-0006go-UE for ged-emacs-devel@m.gmane.org; Thu, 21 Apr 2005 11:17:37 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DOdQf-0006dy-BE for emacs-devel@gnu.org; Thu, 21 Apr 2005 11:17:21 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DOdQe-0006d5-CI for emacs-devel@gnu.org; Thu, 21 Apr 2005 11:17:20 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DOdQe-00027A-1S for emacs-devel@gnu.org; Thu, 21 Apr 2005 11:17:20 -0400 Original-Received: from [193.252.22.31] (helo=smtp11.wanadoo.fr) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DOdSB-0003Vs-O6 for emacs-devel@gnu.org; Thu, 21 Apr 2005 11:18:56 -0400 Original-Received: from me-wanadoo.net (unknown [127.0.0.1]) by mwinf1107.wanadoo.fr (SMTP Server) with ESMTP id 226C61C000EE for ; Thu, 21 Apr 2005 17:16:33 +0200 (CEST) Original-Received: from wwinf1101 (wwinf1101 [172.22.142.28]) by mwinf1107.wanadoo.fr (SMTP Server) with ESMTP id 145B91C000C1; Thu, 21 Apr 2005 17:16:33 +0200 (CEST) X-ME-UUID: 20050421151633835.145B91C000C1@mwinf1107.wanadoo.fr Original-To: handa@m17n.org X-Originating-IP: [205.167.7.18] X-WUM-FROM: |~| X-WUM-TO: |~| X-WUM-CC: |~||~||~| X-WUM-REPLYTO: |~| 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:36232 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:36232 Hi, > I think the attached patch will fix the problem. Shall I > install it? Thanks for your patch. I tried it and when I compiled recentf.el I got this message: Compiling /home/ponce/installs/emacs/lisp/recentf.el... File local-variables error: (error "Local variables list is not properly terminated") Wrote /home/ponce/installs/emacs/lisp/recentf.elc This is because the ";;; Local Variables:\n" string confused `hack-local-variables'! Here is a new patch that fix that. Sincerely, 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 15:10:52 -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,1164 ---- (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 + ;; Take care of not confusing `hack-local-variables' + ";;; Local " "Variables:\n" + (format ";;; coding: %s\n" recentf-save-file-coding-system) + ";;; End:\n") (write-file (expand-file-name recentf-save-file)) nil) (error