unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* saveplace: don't ask for coding system
@ 2007-11-28 14:46 David Reitter
  2007-11-28 21:47 ` Eli Zaretskii
  2007-11-29  9:05 ` Juanma Barranquero
  0 siblings, 2 replies; 35+ messages in thread
From: David Reitter @ 2007-11-28 14:46 UTC (permalink / raw)
  To: emacs- devel

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)

^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2007-12-06 12:38 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-28 14:46 saveplace: don't ask for coding system David Reitter
2007-11-28 21:47 ` Eli Zaretskii
2007-11-29  0:25   ` David Reitter
2007-12-03  1:04     ` General variable for verbosity level. (was: saveplace: don't ask for coding system) Karl Fogel
2007-12-03 20:22       ` David Reitter
2007-12-03 21:44         ` General variable for verbosity level Karl Fogel
2007-12-03 22:34       ` Reiner Steib
2007-11-29  9:04   ` saveplace: don't ask for coding system Juanma Barranquero
2007-11-29 21:04     ` Eli Zaretskii
2007-11-30  9:17       ` Juanma Barranquero
2007-11-29  9:05 ` Juanma Barranquero
2007-12-02 16:51   ` David Reitter
2007-12-02 21:26     ` Karl Fogel
2007-12-02 21:31       ` David Reitter
2007-12-02 23:23         ` Karl Fogel
2007-12-03  4:18           ` Eli Zaretskii
2007-12-03 10:59             ` Karl Fogel
2007-12-03 11:06               ` Juanma Barranquero
2007-12-03 21:02                 ` Stephen J. Turnbull
2007-12-03 20:48               ` Eli Zaretskii
2007-12-03 21:32                 ` Karl Fogel
2007-12-04  4:20                   ` Eli Zaretskii
2007-12-04  6:17                     ` Karl Fogel
2007-12-04 20:57                       ` Eli Zaretskii
2007-12-04 16:40                     ` Juanma Barranquero
2007-12-04 21:32                       ` Eli Zaretskii
2007-12-04 22:24                         ` Stefan Monnier
2007-12-05  4:52                           ` Eli Zaretskii
2007-12-05  8:49                             ` Juanma Barranquero
2007-12-05 18:25                               ` Eli Zaretskii
2007-12-05 20:05                                 ` Juanma Barranquero
2007-12-06  4:21                                   ` Eli Zaretskii
2007-12-06 12:38                                     ` Juanma Barranquero
2007-12-04 22:51                         ` Juanma Barranquero
2007-12-04 16:55                   ` Richard Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).