* Simple minibuffer completion question
@ 2007-04-14 11:33 bmaron2
2007-04-14 11:52 ` Eli Zaretskii
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: bmaron2 @ 2007-04-14 11:33 UTC (permalink / raw)
To: help-gnu-emacs
Hello folks,
I've always wondered how to do this for ages now, and I'm hopeful
there is a simple solution which I haven't figured out.
Lets say you're editing a file named reallylongfilename.foo. You want
to save a copy and call it reallylongfilename2.foo.
If I do a C-x C-w, emacs prompts me for the new file name. Now, how
can I get it to insert the default file name (reallylongfilename.foo),
but still allow me to edit the text? If i just press RET it submits
the default name, not allowing me to add the '2'. TAB and SPC give me
a list of all the files in the directory, so I still have to type out
reallylongfilename.foo.
An analogous question is if I'm editing reallylongfilename.foo and I
want to open reallylongfilename.bar. How can I do that without typing
manually all of reallylongfilename?
Thanks in advance!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Simple minibuffer completion question
2007-04-14 11:33 Simple minibuffer completion question bmaron2
@ 2007-04-14 11:52 ` Eli Zaretskii
[not found] ` <mailman.2069.1176551798.7795.help-gnu-emacs@gnu.org>
2007-04-14 19:47 ` Dieter Wilhelm
2 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2007-04-14 11:52 UTC (permalink / raw)
To: help-gnu-emacs
> From: bmaron2@hotmail.com
> Date: 14 Apr 2007 04:33:04 -0700
>
> Lets say you're editing a file named reallylongfilename.foo. You want
> to save a copy and call it reallylongfilename2.foo.
>
> If I do a C-x C-w, emacs prompts me for the new file name. Now, how
> can I get it to insert the default file name (reallylongfilename.foo),
> but still allow me to edit the text?
Press either down-arrow or M-n, and Emacs will do what you want.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Simple minibuffer completion question
[not found] ` <mailman.2069.1176551798.7795.help-gnu-emacs@gnu.org>
@ 2007-04-14 13:18 ` bmaron2
0 siblings, 0 replies; 4+ messages in thread
From: bmaron2 @ 2007-04-14 13:18 UTC (permalink / raw)
To: help-gnu-emacs
On Apr 14, 6:52 am, Eli Zaretskii <e...@gnu.org> wrote:
> > From: bmar...@hotmail.com
> > Date: 14 Apr 2007 04:33:04 -0700
>
> > Lets say you're editing a file named reallylongfilename.foo. You want
> > to save a copy and call it reallylongfilename2.foo.
>
> > If I do a C-x C-w, emacs prompts me for the new file name. Now, how
> > can I get it to insert the default file name (reallylongfilename.foo),
> > but still allow me to edit the text?
>
> Press either down-arrow or M-n, and Emacs will do what you want.
Brilliant, thanks Eli!!!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Simple minibuffer completion question
2007-04-14 11:33 Simple minibuffer completion question bmaron2
2007-04-14 11:52 ` Eli Zaretskii
[not found] ` <mailman.2069.1176551798.7795.help-gnu-emacs@gnu.org>
@ 2007-04-14 19:47 ` Dieter Wilhelm
2 siblings, 0 replies; 4+ messages in thread
From: Dieter Wilhelm @ 2007-04-14 19:47 UTC (permalink / raw)
To: bmaron2; +Cc: help-gnu-emacs
bmaron2@hotmail.com writes:
>
> Lets say you're editing a file named reallylongfilename.foo. You want
> to save a copy and call it reallylongfilename2.foo.
>
> If I do a C-x C-w, emacs prompts me for the new file name. Now, how
> can I get it to insert the default file name (reallylongfilename.foo),
> but still allow me to edit the text? If i just press RET it submits
> the default name, not allowing me to add the '2'. TAB and SPC give me
> a list of all the files in the directory, so I still have to type out
> reallylongfilename.foo.
Not exactly, you only have to type the ambiguous part, TAB completes
the rest for you. Most often one has to type only few chars and TAB.
> An analogous question is if I'm editing reallylongfilename.foo and I
> want to open reallylongfilename.bar. How can I do that without typing
> manually all of reallylongfilename?
Either with (1) M-p, or (2) typing the ambiguous part and then TAB, or
try (3) ido-mode. With this mode you would just type "C-x C-f .bar"
and then you can select with C-s between all files ending in .bar.
--
Best wishes
H. Dieter Wilhelm
Darmstadt, Germany
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-04-14 19:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-14 11:33 Simple minibuffer completion question bmaron2
2007-04-14 11:52 ` Eli Zaretskii
[not found] ` <mailman.2069.1176551798.7795.help-gnu-emacs@gnu.org>
2007-04-14 13:18 ` bmaron2
2007-04-14 19:47 ` Dieter Wilhelm
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.