unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lennart Borgman <lennart.borgman@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 7747@debbugs.gnu.org
Subject: bug#7747: Please put current file name in the prompt for rename-file
Date: Sat, 1 Jan 2011 20:16:18 +0100	[thread overview]
Message-ID: <AANLkTimk-KPYGD3MW0EHTZYhz=Ng-+o60rAAmaTi-64H@mail.gmail.com> (raw)
In-Reply-To: <jwvbp46k539.fsf-monnier+emacs@gnu.org>

On Tue, Dec 28, 2010 at 3:24 AM, Stefan Monnier
<monnier@iro.umontreal.ca> wrote:
>>> You can use `rename-file' from anywhere in Emacs.  Yes, if you use it from a
>>> file buffer or from Dired then a reasonable default value is provided.  But
>>> that's all it is: a default value.
>> I did not think of that, but I am sure you understood me.
>
> Maybe he's lucky enough, but I must say I'm still lost.  Can someone
> turn this into an actual bug-report, please?

Sorry, I should have been thinking of that you all use Emacs for
almost everything so this idea might be unfamiliar to you ;-)

It is just a simple but useful thing I want - too eat the cake and
have the cake. Though I was not aware of that first.

It is very useful that the current filename is in the prompt history
when renaming a file. However one more thing can be done now:

- Put the old file name in the prompt + made it selected (if visual
regions are on).

This is what at least the w32 GUI does. If you then want to overwrite
that filename you just start typing the new file name. If you want to
edit the file name instead you move the point first. This aborts the
selection and you can now edit as usual.

The advantage is more clarity and less key strokes.

This would work very well in Emacs too - at least when cua-mode is on.
(And in the case it is not on I think we should reconsider how
self-insert is handled.)


I realize now that this bug is quite a bit more general than for
rename-file. Sorry for that.





  reply	other threads:[~2011-01-01 19:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-28  0:41 bug#7747: Please put current file name in the prompt for rename-file Lennart Borgman
2010-12-28  1:00 ` Drew Adams
2010-12-28  1:14   ` Lennart Borgman
2010-12-28  2:24     ` Stefan Monnier
2011-01-01 19:16       ` Lennart Borgman [this message]
2011-01-02  2:28         ` Lennart Borgman
2011-01-02  2:53           ` Stefan Monnier
2011-01-02  3:15             ` Lennart Borgman
2011-01-02 14:57         ` Juri Linkov
2010-12-28  1:47 ` Juri Linkov
2010-12-28  2:15   ` Lennart Borgman
2022-02-10  8:33     ` bug#7747: Allow choice of "default in M-n" vs "default in `initial'" Lars Ingebrigtsen
2022-02-12  3:57       ` 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='AANLkTimk-KPYGD3MW0EHTZYhz=Ng-+o60rAAmaTi-64H@mail.gmail.com' \
    --to=lennart.borgman@gmail.com \
    --cc=7747@debbugs.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).