GNU bug report logs - #12128
24.1.50; Default argument for `save-buffer'

Previous Next

Package: emacs;

Reported by: Dani Moncayo <dmoncayo <at> gmail.com>

Date: Fri, 3 Aug 2012 01:06:02 UTC

Severity: wishlist

Found in version 24.1.50

Done: Juri Linkov <juri <at> jurta.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 12128 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: Dani Moncayo <dmoncayo <at> gmail.com>
Cc: 12128 <at> debbugs.gnu.org
Subject: Re: bug#12128: 24.1.50; Default argument for `save-buffer'
Date: Fri, 03 Aug 2012 11:10:00 +0300
> In any case, what I what to request here is that "M-n", insetead of the
> error, brings to the minibuffer a default argument consisting in the
> concatenation of the current directory and the name of the buffer.

This patch implements this:

=== modified file 'lisp/files.el'
--- lisp/files.el	2012-07-17 18:01:44 +0000
+++ lisp/files.el	2012-08-03 08:04:07 +0000
@@ -4500,7 +4500,8 @@ (defun basic-save-buffer ()
 	  (or buffer-file-name
 	      (let ((filename
 		     (expand-file-name
-		      (read-file-name "File to save in: ") nil)))
+		      (read-file-name "File to save in: "
+				      nil (expand-file-name (buffer-name))))))
 		(if (file-exists-p filename)
 		    (if (file-directory-p filename)
 			;; Signal an error if the user specified the name of an




This bug report was last modified 12 years and 344 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.