From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Lennart Borgman <lennart.borgman@gmail.com>
Cc: emacs-devel@gnu.org, Bastien <bastien.guerry@wikimedia.fr>
Subject: Re: [PATCH] Save unmodified buffer when file has been deleted
Date: Fri, 11 Feb 2011 18:02:30 -0500 [thread overview]
Message-ID: <jwvr5bep44y.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <AANLkTi=4UJc6G3enjwqnA7bfcwFGTN8q0E3CARzpcW6Z@mail.gmail.com> (Lennart Borgman's message of "Fri, 11 Feb 2011 15:55:28 +0100")
>>> + (and (buffer-file-name)
>>> + (not (file-exists-p (buffer-file-name)))))
>>
>> Please just use the buffer-file-name variable rather than the function.
>> Other than that, it looks like a good change (I've gotten used to
>> hitting SPC Backspace C-x C-s, and I also use this when I just want to
>> `touch' the file, so I probably won't use this feature much, tho).
> Why is the variable buffer-file-name preferred over the function?
Because IMHO the function is just a historical accident.
And the variable is slightly more efficient.
Stefan
next prev parent reply other threads:[~2011-02-11 23:02 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-11 9:19 [PATCH] Save unmodified buffer when file has been deleted Bastien
2011-02-11 9:29 ` Eli Zaretskii
2011-02-11 9:48 ` Bastien
2011-02-11 15:13 ` Eli Zaretskii
2011-02-11 17:56 ` Bastien
2011-02-11 18:50 ` Eli Zaretskii
2011-02-11 19:01 ` Bastien
2011-02-11 19:29 ` Eli Zaretskii
2011-02-11 14:38 ` Stefan Monnier
2011-02-11 14:55 ` Lennart Borgman
2011-02-11 23:02 ` Stefan Monnier [this message]
2011-02-11 17:37 ` Bastien
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=jwvr5bep44y.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=bastien.guerry@wikimedia.fr \
--cc=emacs-devel@gnu.org \
--cc=lennart.borgman@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.