unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#12128: 24.1.50; Default argument for `save-buffer'
@ 2012-08-03  0:57 Dani Moncayo
  2012-08-03  6:40 ` Eli Zaretskii
  2012-08-03  8:10 ` Juri Linkov
  0 siblings, 2 replies; 8+ messages in thread
From: Dani Moncayo @ 2012-08-03  0:57 UTC (permalink / raw)
  To: 12128

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@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





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

* bug#12128: 24.1.50; Default argument for `save-buffer'
  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  8:10 ` Juri Linkov
  1 sibling, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2012-08-03  6:40 UTC (permalink / raw)
  To: Dani Moncayo; +Cc: 12128

> Date: Fri, 3 Aug 2012 02:57:27 +0200
> From: Dani Moncayo <dmoncayo@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.





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

* bug#12128: 24.1.50; Default argument for `save-buffer'
  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:10 ` Juri Linkov
  2012-08-03  8:46   ` Dani Moncayo
  1 sibling, 1 reply; 8+ messages in thread
From: Juri Linkov @ 2012-08-03  8:10 UTC (permalink / raw)
  To: Dani Moncayo; +Cc: 12128

> 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





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

* bug#12128: 24.1.50; Default argument for `save-buffer'
  2012-08-03  8:10 ` Juri Linkov
@ 2012-08-03  8:46   ` Dani Moncayo
  2012-08-08  8:17     ` Juri Linkov
  0 siblings, 1 reply; 8+ messages in thread
From: Dani Moncayo @ 2012-08-03  8:46 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 12128

>> 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





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

* bug#12128: 24.1.50; Default argument for `save-buffer'
  2012-08-03  6:40 ` Eli Zaretskii
@ 2012-08-03  8:57   ` Dani Moncayo
  2012-08-03  9:31     ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Dani Moncayo @ 2012-08-03  8:57 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 12128

> 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





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

* bug#12128: 24.1.50; Default argument for `save-buffer'
  2012-08-03  8:57   ` Dani Moncayo
@ 2012-08-03  9:31     ` Eli Zaretskii
  2012-08-03  9:38       ` Dani Moncayo
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2012-08-03  9:31 UTC (permalink / raw)
  To: Dani Moncayo; +Cc: 12128

> Date: Fri, 3 Aug 2012 10:57:46 +0200
> From: Dani Moncayo <dmoncayo@gmail.com>
> Cc: 12128@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.





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

* bug#12128: 24.1.50; Default argument for `save-buffer'
  2012-08-03  9:31     ` Eli Zaretskii
@ 2012-08-03  9:38       ` Dani Moncayo
  0 siblings, 0 replies; 8+ messages in thread
From: Dani Moncayo @ 2012-08-03  9:38 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 12128

>> 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





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

* bug#12128: 24.1.50; Default argument for `save-buffer'
  2012-08-03  8:46   ` Dani Moncayo
@ 2012-08-08  8:17     ` Juri Linkov
  0 siblings, 0 replies; 8+ messages in thread
From: Juri Linkov @ 2012-08-08  8:17 UTC (permalink / raw)
  To: Dani Moncayo; +Cc: 12128-done

> It does the job.  Thank you so much.

Installed and closed.  Thanks for the suggestion.





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

end of thread, other threads:[~2012-08-08  8:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2012-08-03  8:46   ` Dani Moncayo
2012-08-08  8:17     ` Juri Linkov

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).