all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lennart Borgman <lennart.borgman@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
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 15:55:28 +0100	[thread overview]
Message-ID: <AANLkTi=4UJc6G3enjwqnA7bfcwFGTN8q0E3CARzpcW6Z@mail.gmail.com> (raw)
In-Reply-To: <jwvei7er65o.fsf-monnier+emacs@gnu.org>

On Fri, Feb 11, 2011 at 3:38 PM, Stefan Monnier
<monnier@iro.umontreal.ca> wrote:
>> +         (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?



  reply	other threads:[~2011-02-11 14:55 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 [this message]
2011-02-11 23:02     ` Stefan Monnier
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='AANLkTi=4UJc6G3enjwqnA7bfcwFGTN8q0E3CARzpcW6Z@mail.gmail.com' \
    --to=lennart.borgman@gmail.com \
    --cc=bastien.guerry@wikimedia.fr \
    --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 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.