From: Karl Fogel <kfogel@red-bean.com>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: emacs-devel@gnu.org
Subject: Re: Curious behavior in find-alternate-file.
Date: Tue, 08 Sep 2009 17:43:14 -0400 [thread overview]
Message-ID: <87tyzd864t.fsf@red-bean.com> (raw)
In-Reply-To: <jwvhbvdberd.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Tue, 08 Sep 2009 12:10:25 -0400")
Stefan Monnier <monnier@IRO.UMontreal.CA> writes:
> It's always worthwhile to use M-x vc-annotate and then `d' and/or `l' on
> the relevant lines, to see how we got there. In the present case you'll
> find the change described below, which indicates that your change
> wouldn't be right either. Maybe Chong remembers what was the motivation
> for that change?
Well, I wasn't sophisticated enough to use vc-annotate :-), but I saw
Chong's r1.878 via old-fashioned 'cvs log'. I assumed he was watching
the discussion here, and would have said something if there was an
important reason for the behavior, but perhaps that was too optimistic
-- he does get a lot of mail, after all. Should I maybe mail him
personally, or put "ATTN: Chong Yidong" in the subject, or something?
Chong, the relevant recent change is:
lisp/files.el: revision 1.1077
date: 2009-09-05 11:16:49 -0400; author: kfogel; state: Exp;
lines: +6 -6; commitid: RHZgxPghVlEnfv2u;
* lisp/files.el (find-alternate-file): If the old buffer is modified
and visiting a file, behave similarly to `kill-buffer' when killing
it, thus reverting to the pre-1.878 behavior; see
http://lists.gnu.org/archive/html/emacs-devel/2009-09/msg00101.html
for discussion. Also, consult `buffer-file-name' as a variable not
as a function, for consistency with the rest of the code.
-Karl
> revision 1.878
> date: 2007-01-20 14:00:10 -0500; author: cyd; state: Exp; lines: +4 -4;
> (find-alternate-file): Revert query message to Emacs 21 version.
>
>
> --- files.el 6 Jan 2007 21:50:14 -0000 1.877
> +++ files.el 20 Jan 2007 19:00:10 -0000 1.878
> @@ -1223,11 +1223,11 @@
> (unless (run-hook-with-args-until-failure 'kill-buffer-query-functions)
> (error "Aborted"))
> (when (and (buffer-modified-p) (buffer-file-name))
> - (if (yes-or-no-p (format "Buffer %s is modified; save it first? "
> + (if (yes-or-no-p (format "Buffer %s is modified; kill anyway? "
> (buffer-name)))
> - (save-buffer)
> (unless (yes-or-no-p "Kill and replace the buffer without saving it? ")
> - (error "Aborted"))))
> + (error "Aborted"))
> + (save-buffer)))
> (let ((obuf (current-buffer))
> (ofile buffer-file-name)
> (onum buffer-file-number)
prev parent reply other threads:[~2009-09-08 21:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-04 22:00 Curious behavior in find-alternate-file Karl Fogel
2009-09-05 7:03 ` Andreas Schwab
2009-09-08 16:10 ` Stefan Monnier
2009-09-08 21:43 ` Karl Fogel [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tyzd864t.fsf@red-bean.com \
--to=kfogel@red-bean.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@IRO.UMontreal.CA \
/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 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).