emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: address@hidden: modeline doesn't divulge buffer will go bye bye]


From: Alex Schroeder
Subject: Re: address@hidden: modeline doesn't divulge buffer will go bye bye]
Date: Mon, 24 Jun 2002 09:41:02 +0200
User-agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2.90 (i686-pc-linux-gnu)

Richard Stallman <address@hidden> writes:

>                                 and set a new variable "buffer needs
>     file", so that Emacs will ask about saving changes (because there is a
>     file name associated with it), and then when the user hits C-x C-s,
>     Emacs recognizes that the fil name is still unknown, and asks the user
>     for it.
>
> C-x C-s already handles this, but maybe we ought to make C-x s do something
> for them.

My bad; I was talking about C-x C-c.

>     Maybe we should do just that -- set the buffer-file-name to
>     /nonexistingdrive/buffername,
>
> What is the point in that?  Why not just leave it nil?

Start emacs -q, create new buffer using C-x b test RET.  Type
something.  Quit using C-x C-c.  Emacs quits, your edit is lost.

With my fix:  Start emacs -q, create new buffer using C-x b test RET.
Set file name using M-: (setq buffer-file-name
"/nonexistingdrive/buffername").  Type something.  Quit using C-x C-c.
Emacs asks: "Save file /nonexistingdrive/buffername? (y, n, !, ., q,
C-r or C-h)".

I think this is the kind of behaviour users expect.  Emacs will not
discard their edits, unless they are typing at a temporary buffer --
and those are buffers with names starting and ending with an asterix.
Obviously my idea leads to a weird prompt.  Perhaps using (setq
buffer-file-name (buffer-name (current-buffer))) is better.  I just
tried it and the prompt looks great.  Perhaps fixing
save-buffers-kill-emacs and friends is better.  Perhaps what I want is
that C-x b with a nonexisting buffer is equivalent to C-x C-f with
that name.  I do not know.

Alex.
-- 
http://www.electronicintifada.net/diaries/index.html
http://www.us-israel.org/jsource/US-Israel/hr2506c.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]