From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Reitter Newsgroups: gmane.emacs.devel Subject: saveplace: don't ask for coding system Date: Wed, 28 Nov 2007 14:46:08 +0000 Message-ID: <198E2B70-D060-41D8-8BC2-A9614C2729CC@inf.ed.ac.uk> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v915) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1196284467 29106 80.91.229.12 (28 Nov 2007 21:14:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 28 Nov 2007 21:14:27 +0000 (UTC) To: emacs- devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 28 22:14:35 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 1IxUEr-0000Dn-V6 for ged-emacs-devel@m.gmane.org; Wed, 28 Nov 2007 22:14:34 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IxUEc-0008Tq-D6 for ged-emacs-devel@m.gmane.org; Wed, 28 Nov 2007 16:14:18 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IxOBP-0003pc-Ch for emacs-devel@gnu.org; Wed, 28 Nov 2007 09:46:35 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IxOBO-0003os-41 for emacs-devel@gnu.org; Wed, 28 Nov 2007 09:46:34 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IxOBN-0003ol-RR for emacs-devel@gnu.org; Wed, 28 Nov 2007 09:46:33 -0500 Original-Received: from mandy.inf.ed.ac.uk ([129.215.218.49]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IxOBN-0004sS-NI for emacs-devel@gnu.org; Wed, 28 Nov 2007 09:46:33 -0500 Original-Received: from scarlett.inf.ed.ac.uk (scarlett.inf.ed.ac.uk [129.215.174.113]) (authenticated bits=0) by mandy.inf.ed.ac.uk (8.13.8/8.13.8) with ESMTP id lASEk91j011088 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Wed, 28 Nov 2007 14:46:10 GMT X-Mailer: Apple Mail (2.915) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-Mailman-Approved-At: Wed, 28 Nov 2007 16:13:52 -0500 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:84259 Archived-At: Can I suggest the following two changes to saveplace.el? - set the coding system so that the user isn't asked about a coding system for the places file every time they quit Emacs (when file names contain non-standard characters). - do not show a message about saving - it's not useful information for most users and contributes to information overload! (if the function was interactive, this would be a different story.) I have no write access to CVS, so if people like such changes, somebody will have to commit them. *** lisp/saveplace.el 25 Jul 2007 05:47:04 +0100 1.37.2.1 --- lisp/saveplace.el 28 Nov 2007 14:40:39 +0000 *************** *** 207,213 **** (defun save-place-alist-to-file () (let ((file (expand-file-name save-place-file))) (save-excursion ! (message "Saving places to %s..." file) (set-buffer (get-buffer-create " *Saved Places*")) (delete-region (point-min) (point-max)) (when save-place-forget-unreadable-files --- 207,213 ---- (defun save-place-alist-to-file () (let ((file (expand-file-name save-place-file))) (save-excursion ! ;; (message "Saving places to %s..." file) (set-buffer (get-buffer-create " *Saved Places*")) (delete-region (point-min) (point-max)) (when save-place-forget-unreadable-files *************** *** 224,233 **** t)))) (condition-case nil ;; Don't use write-file; we don't want this buffer to visit it. ! (write-region (point-min) (point-max) file) ! (file-error (message "Can't write %s" file))) (kill-buffer (current-buffer)) ! (message "Saving places to %s...done" file))))) (defun load-save-place-alist-from-file () (if (not save-place-loaded) --- 224,235 ---- t)))) (condition-case nil ;; Don't use write-file; we don't want this buffer to visit it. ! (let ((coding-system-for-write 'utf-8)) ! (write-region (point-min) (point-max) file)) ! (file-error (message "Saving places: Can't write %s" file))) (kill-buffer (current-buffer)) ! ;;(message "Saving places to %s...done" file) ! )))) (defun load-save-place-alist-from-file () (if (not save-place-loaded)