From: Deniz Dogan <deniz.a.m.dogan@gmail.com>
To: herring@lanl.gov
Cc: Emacs-Devel devel <emacs-devel@gnu.org>
Subject: Re: delete-file default to buffer-file-name if non-nil
Date: Sun, 16 May 2010 00:10:23 +0200 [thread overview]
Message-ID: <AANLkTinKnYpSV6odq5pEzAd8nBifpIUNWKAUbGzAL7jc@mail.gmail.com> (raw)
In-Reply-To: <56210.128.165.0.81.1273948225.squirrel@webmail.lanl.gov>
2010/5/15 Davis Herring <herring@lanl.gov>:
>> Could we change the behavior of delete-file so that it defaults to
>> buffer-file-name if non-nil, otherwise the current directory, if
>> called interactively?
>
> Doesn't it already do that? M-x delete-file RET does attempt to delete
> the current buffer's file or its directory if it has no file. Personally,
> I find this default sort of dangerous, although at least C-x C-w often
> fixes it.
>
> Davis
>
It seems you are right. The prompt confused me, as it defaults to the
directory which the file is in.
So new suggestion... :) Either the prompt displays the file name for
the current buffer OR the documentation for delete-file is updated to
describe this (in my opinion) non-intuitive behavior. The info node
which briefly describes delete-file says the following:
`M-x delete-file' deletes the specified file, like the `rm' command
in the shell. If you are deleting many files in one directory, it may
be more convenient to use Dired rather than `delete-file'. *Note
Dired::.
What do you say?
--
Deniz Dogan
next prev parent reply other threads:[~2010-05-15 22:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-15 18:05 delete-file default to buffer-file-name if non-nil Deniz Dogan
2010-05-15 18:30 ` Davis Herring
2010-05-15 22:10 ` Deniz Dogan [this message]
2010-05-16 20:04 ` Richard Stallman
2010-05-16 20:20 ` Drew Adams
2010-05-16 23:09 ` Juri Linkov
2010-05-17 0:28 ` Drew Adams
2010-05-17 13:51 ` Stefan Monnier
2010-05-17 14:56 ` Drew Adams
2010-05-17 16:15 ` Deniz Dogan
2010-05-17 23:09 ` Juri Linkov
2010-05-18 22:38 ` Juri Linkov
2010-05-17 14:40 ` Richard Stallman
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=AANLkTinKnYpSV6odq5pEzAd8nBifpIUNWKAUbGzAL7jc@mail.gmail.com \
--to=deniz.a.m.dogan@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=herring@lanl.gov \
/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).