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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 12128 in the body.
You can then email your comments to 12128 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#12128; Package emacs. (Fri, 03 Aug 2012 01:06:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dani Moncayo <dmoncayo <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 03 Aug 2012 01:06:02 GMT) Full text and rfc822 format available.

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

From: Dani Moncayo <dmoncayo <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.1.50; Default argument for `save-buffer'
Date: Fri, 3 Aug 2012 02:57:27 +0200
Severity: wishlist

Hello,

Try this experiment from "emacs -Q":
  C-x b test RET hello C-x C-s M-n

(That is: create a new buffer, write something in it, try to save it and
use M-n to look for a default filename.)

The first time I try that, I see the error message "Source file
`c:/emacs/trunk/lisp/gnus/auth-source.el' newer than byte-compiled
file".  On subsequent attempts, the error message is more normal: "End of
history; no default available".

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.

TIA.


In GNU Emacs 24.1.50.1 (i386-mingw-nt6.1.7601)
 of 2012-08-03 on DANI-PC
Bzr revision: 109405 eggert <at> cs.ucla.edu-20120802205949-ej38mo43ymsf8nb3
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --with-gcc (4.7) --no-opt --enable-checking --cflags
 -I../../libs/libiconv-1.14-2-mingw32-dev/include
 -I../../libs/libxml2-2.7.8-w32-bin/include/libxml2
 -I../../libs/giflib-4.1.4-1/include
 -I../../emacs/libs/gnutls-3.0.16/include -I../../libs/jpeg-6b-4/include
 -I../../libs/libpng-1.4.10 -I../../libs/libxpm-3.5.8/include
 -I../../libs/libxpm-3.5.8/src -I../../libs/tiff-3.8.2-1/include
 -I../../libs/zlib-1.2.6'

Important settings:
  value of $EMACSDATA: C:/emacs/trunk/etc
  value of $EMACSDOC: C:/emacs/trunk/etc
  value of $EMACSLOADPATH: C:/emacs/trunk/lisp;C:/emacs/trunk/leim
  value of $EMACSPATH: C:/emacs/trunk/bin
  value of $LANG: ESN
  locale-coding-system: cp1252
  default enable-multibyte-characters: t

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
C-x b t e s t <return> h e l l o C-x C-s M-n C-g M-x
r e p o r t <tab> <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Source file `c:/emacs/trunk/lisp/gnus/auth-source.el' newer than
byte-compiled file
user-error: End of history; no default available
Quit

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message format-spec rfc822 mml easymenu
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mail-utils ffap
url-parse auth-source eieio byte-opt bytecomp byte-compile cconv
macroexp gnus-util mm-util mail-prsvr password-cache url-vars time-date
tooltip ediff-hook vc-hooks lisp-float-type mwheel dos-w32 disp-table
ls-lisp w32-win w32-vars tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment lisp-mode register page menu-bar rfn-eshadow
timer select scroll-bar mouse jit-lock font-lock syntax facemenu
font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan
thai tai-viet lao korean japanese hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer button faces cus-face files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
multi-tty emacs)


-- 
Dani Moncayo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12128; Package emacs. (Fri, 03 Aug 2012 06:48:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.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 09:40:08 +0300
> Date: Fri, 3 Aug 2012 02:57:27 +0200
> From: Dani Moncayo <dmoncayo <at> gmail.com>
> 
> Severity: wishlist
> 
> Hello,
> 
> Try this experiment from "emacs -Q":
>   C-x b test RET hello C-x C-s M-n
> 
> (That is: create a new buffer, write something in it, try to save it and
> use M-n to look for a default filename.)
> 
> The first time I try that, I see the error message "Source file
> `c:/emacs/trunk/lisp/gnus/auth-source.el' newer than byte-compiled
> file".

That's your local problem with byte compilation, I don't get that
message on my machine.  Just compile auth-source.el, and that message
will not appear anymore.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12128; Package emacs. (Fri, 03 Aug 2012 08:19:02 GMT) Full text and rfc822 format available.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12128; Package emacs. (Fri, 03 Aug 2012 08:55:02 GMT) Full text and rfc822 format available.

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

From: Dani Moncayo <dmoncayo <at> gmail.com>
To: Juri Linkov <juri <at> jurta.org>
Cc: 12128 <at> debbugs.gnu.org
Subject: Re: bug#12128: 24.1.50; Default argument for `save-buffer'
Date: Fri, 3 Aug 2012 10:46:55 +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:

It does the job.  Thank you so much.

-- 
Dani Moncayo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12128; Package emacs. (Fri, 03 Aug 2012 09:06:01 GMT) Full text and rfc822 format available.

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

From: Dani Moncayo <dmoncayo <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 12128 <at> debbugs.gnu.org
Subject: Re: bug#12128: 24.1.50; Default argument for `save-buffer'
Date: Fri, 3 Aug 2012 10:57:46 +0200
> That's your local problem with byte compilation, I don't get that
> message on my machine.  Just compile auth-source.el, and that message
> will not appear anymore.

Have the emacs build process a way of automatically compiling every
*.elc file which is older than its *.el counterpart?  (I thought that
the plain "make" took care of this)


-- 
Dani Moncayo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12128; Package emacs. (Fri, 03 Aug 2012 09:40:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.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 12:31:46 +0300
> Date: Fri, 3 Aug 2012 10:57:46 +0200
> From: Dani Moncayo <dmoncayo <at> gmail.com>
> Cc: 12128 <at> debbugs.gnu.org
> 
> > That's your local problem with byte compilation, I don't get that
> > message on my machine.  Just compile auth-source.el, and that message
> > will not appear anymore.
> 
> Have the emacs build process a way of automatically compiling every
> *.elc file which is older than its *.el counterpart?

Yes.

> (I thought that the plain "make" took care of this)

No.  The correct procedure for building on Windows after updating from
bzr is this:

  cd nt
  configure
  make
  cd ../lisp
  make bzr-update
  cd ../nt
  make
  make info

The 'configure' step can be omitted if none of the configury files
changed (that includes makefile.w32-in files, nt/config.nt, and
nt/configure.bat itself).

Some changes are too invasive, and make the "make bzr-update" stage
fail.  If the problems don't go away after re-running that stage
several times, your best bet is a full bootstrap.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#12128; Package emacs. (Fri, 03 Aug 2012 09:47:02 GMT) Full text and rfc822 format available.

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

From: Dani Moncayo <dmoncayo <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 12128 <at> debbugs.gnu.org
Subject: Re: bug#12128: 24.1.50; Default argument for `save-buffer'
Date: Fri, 3 Aug 2012 11:38:39 +0200
>> Have the emacs build process a way of automatically compiling every
>> *.elc file which is older than its *.el counterpart?
>
> Yes.
>
>> (I thought that the plain "make" took care of this)
>
> No.  The correct procedure for building on Windows after updating from
> bzr is this:
>
>   cd nt
>   configure
>   make
>   cd ../lisp
>   make bzr-update
>   cd ../nt
>   make
>   make info
>
> The 'configure' step can be omitted if none of the configury files
> changed (that includes makefile.w32-in files, nt/config.nt, and
> nt/configure.bat itself).
>
> Some changes are too invasive, and make the "make bzr-update" stage
> fail.  If the problems don't go away after re-running that stage
> several times, your best bet is a full bootstrap.

Thank you so much.

-- 
Dani Moncayo




Reply sent to Juri Linkov <juri <at> jurta.org>:
You have taken responsibility. (Wed, 08 Aug 2012 08:27:02 GMT) Full text and rfc822 format available.

Notification sent to Dani Moncayo <dmoncayo <at> gmail.com>:
bug acknowledged by developer. (Wed, 08 Aug 2012 08:27:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> jurta.org>
To: Dani Moncayo <dmoncayo <at> gmail.com>
Cc: 12128-done <at> debbugs.gnu.org
Subject: Re: bug#12128: 24.1.50; Default argument for `save-buffer'
Date: Wed, 08 Aug 2012 11:17:39 +0300
> It does the job.  Thank you so much.

Installed and closed.  Thanks for the suggestion.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 05 Sep 2012 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 256 days ago.

Previous Next


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