From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Karl Fogel Newsgroups: gmane.emacs.devel Subject: Re: saveplace: don't ask for coding system Date: Sun, 02 Dec 2007 13:26:15 -0800 Message-ID: <87ve7gn5zc.fsf@red-bean.com> References: <198E2B70-D060-41D8-8BC2-A9614C2729CC@inf.ed.ac.uk> <06675819-C4A8-4D78-AD59-0A2AF296AC7E@inf.ed.ac.uk> Reply-To: Karl Fogel NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1196630794 14364 80.91.229.12 (2 Dec 2007 21:26:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 2 Dec 2007 21:26:34 +0000 (UTC) Cc: Juanma Barranquero , emacs-devel To: David Reitter Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 02 22:26:42 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IywKn-0001Fg-GG for ged-emacs-devel@m.gmane.org; Sun, 02 Dec 2007 22:26:41 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IywKX-0006lO-8k for ged-emacs-devel@m.gmane.org; Sun, 02 Dec 2007 16:26:25 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IywKT-0006kd-RZ for emacs-devel@gnu.org; Sun, 02 Dec 2007 16:26:21 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IywKS-0006jq-FS for emacs-devel@gnu.org; Sun, 02 Dec 2007 16:26:21 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IywKS-0006jn-Am for emacs-devel@gnu.org; Sun, 02 Dec 2007 16:26:20 -0500 Original-Received: from sanpietro.red-bean.com ([66.146.193.61]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IywKR-0002UF-SF for emacs-devel@gnu.org; Sun, 02 Dec 2007 16:26:20 -0500 Original-Received: from localhost ([127.0.0.1]:37525) by sanpietro.red-bean.com with esmtp (Exim 4.68) (envelope-from ) id 1IywKQ-00032Q-Dk; Sun, 02 Dec 2007 15:26:18 -0600 In-Reply-To: <06675819-C4A8-4D78-AD59-0A2AF296AC7E@inf.ed.ac.uk> (David Reitter's message of "Sun\, 2 Dec 2007 16\:51\:57 +0000") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) 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:84501 Archived-At: David Reitter writes: >> I think you should also add a "-*- coding: XXX -*-" line to the file. > > Good idea. I left the coding system at `utf-8', because that's what > ido seems to use. If there are characters not in utf-8 that file > systems accept for file names, it should probably be emacs-mule. I already committed a version of this change: $ head -7 lisp/ChangeLog 2007-12-02 Karl Fogel * saveplace.el (save-place-alist-to-file): Use `utf-8' coding system when writing, and set it in the first-line file variables. Based on a patch by David Reitter and a suggestion by Juanma Barranquero. $ cvs ci -F lisp/msg lisp/saveplace.el lisp/ChangeLog /cvsroot/emacs/emacs/lisp/saveplace.el,v <-- lisp/saveplace.el new revision: 1.40; previous revision: 1.39 /cvsroot/emacs/emacs/lisp/ChangeLog,v <-- lisp/ChangeLog new revision: 1.12354; previous revision: 1.12353 Mailing notification to emacs-commit@gnu.org... sent. Mailing diffs to emacs-diffs@gnu.org... 2 sent. $ I think utf-8 will be fine, practically speaking. Just now, I've made a followup tweak based on your most recent patch: $ head -6 lisp/ChangeLog 2007-12-02 Karl Fogel * saveplace.el (save-place-alist-to-file): Set coding-system-for-write once and refer to it throughout. Based on a patch by David Reitter . $ cvs ci -F lisp/msg lisp/saveplace.el lisp/ChangeLog /cvsroot/emacs/emacs/lisp/saveplace.el,v <-- lisp/saveplace.el new revision: 1.41; previous revision: 1.40 /cvsroot/emacs/emacs/lisp/ChangeLog,v <-- lisp/ChangeLog new revision: 1.12355; previous revision: 1.12354 Mailing notification to emacs-commit@gnu.org... sent. Mailing diffs to emacs-diffs@gnu.org... 2 sent. $ > I'll post a separate patch for log level based message filtering > another time. I already committed a version of that today too: $ head -9 lisp/ChangeLog 2007-12-02 Karl Fogel Offer option for saveplace to be quiet about loading and saving. Suggested by: David Reitter * lisp/saveplace.el (save-place-quiet): New customizable boolean. (save-place-alist-to-file, load-save-place-alist-from-file): Use it to determine whether to print loading/saving messages. $ cvs ci -F m lisp/saveplace.el lisp/ChangeLog /cvsroot/emacs/emacs/lisp/saveplace.el,v <-- lisp/saveplace.el new revision: 1.39; previous revision: 1.38 /cvsroot/emacs/emacs/lisp/ChangeLog,v <-- lisp/ChangeLog new revision: 1.12351; previous revision: 1.12350 Mailing notification to emacs-commit@gnu.org... sent. Mailing diffs to emacs-diffs@gnu.org... 2 sent. $ Best, -Karl