all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: Dani Moncayo <dmoncayo@gmail.com>
Cc: 12128@debbugs.gnu.org
Subject: bug#12128: 24.1.50; Default argument for `save-buffer'
Date: Fri, 03 Aug 2012 11:10:00 +0300	[thread overview]
Message-ID: <87ipd0o0pz.fsf@mail.jurta.org> (raw)
In-Reply-To: <CAH8Pv0gTLp8WEehYBoVaBN1-RMRV=XM=Rca163CjntQaja0F4g@mail.gmail.com> (Dani Moncayo's message of "Fri, 3 Aug 2012 02:57:27 +0200")

> 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





  parent reply	other threads:[~2012-08-03  8:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-03  0:57 bug#12128: 24.1.50; Default argument for `save-buffer' Dani Moncayo
2012-08-03  6:40 ` Eli Zaretskii
2012-08-03  8:57   ` Dani Moncayo
2012-08-03  9:31     ` Eli Zaretskii
2012-08-03  9:38       ` Dani Moncayo
2012-08-03  8:10 ` Juri Linkov [this message]
2012-08-03  8:46   ` Dani Moncayo
2012-08-08  8:17     ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ipd0o0pz.fsf@mail.jurta.org \
    --to=juri@jurta.org \
    --cc=12128@debbugs.gnu.org \
    --cc=dmoncayo@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.