* two dired questions
@ 2010-03-04 14:10 B. T. Raven
2010-03-04 14:15 ` David Kastrup
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: B. T. Raven @ 2010-03-04 14:10 UTC (permalink / raw)
To: help-gnu-emacs
i.
Is there a function or, better yet, a keychord that backspaces (by
erasing) subdirectory components in the minibuffer. So, if the current
directory is deeply embedded in the file hierarchy, can I hit a key
combo to move backwards (upwards toward the root) in the directory tree:
c:\abc\def\ghi\jkl
becomes
c:\abc\def\ghi
then
c:\abc\def
etc.
???
ii.
Is there a setting that overwrites the dired buffer with the new one
navigated to (or alternatively kills the one navigated from), so that
there is only one dired buffer at a time instead of a long trail of them?
Thanks for any help,
Ed
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: two dired questions
2010-03-04 14:10 two dired questions B. T. Raven
@ 2010-03-04 14:15 ` David Kastrup
2010-03-04 17:52 ` B. T. Raven
2010-03-04 17:48 ` José A. Romero L.
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: David Kastrup @ 2010-03-04 14:15 UTC (permalink / raw)
To: help-gnu-emacs
"B. T. Raven" <nihil@nihilo.net> writes:
> i.
> Is there a function or, better yet, a keychord that backspaces (by
> erasing) subdirectory components in the minibuffer. So, if the current
> directory is deeply embedded in the file hierarchy, can I hit a key
> combo to move backwards (upwards toward the root) in the directory tree:
>
> c:\abc\def\ghi\jkl
> becomes
> c:\abc\def\ghi
> then
> c:\abc\def
>
M-DEL (translated from <M-backspace>) runs the command
backward-kill-word, which is an interactive compiled Lisp function in
`simple.el'.
It is bound to <C-backspace>, M-DEL.
(backward-kill-word ARG)
Kill characters backward until encountering the beginning of a word.
With argument ARG, do this that many times.
> ii.
> Is there a setting that overwrites the dired buffer with the new one
> navigated to (or alternatively kills the one navigated from), so that
> there is only one dired buffer at a time instead of a long trail of them?
dired-find-alternate-file is an interactive compiled Lisp function in
`dired.el'.
(dired-find-alternate-file)
In Dired, visit this file or directory instead of the dired buffer.
[back]
Or more generally:
C-x C-v runs the command find-alternate-file, which is an interactive
compiled Lisp function in `files.el'.
It is bound to C-x C-v.
(find-alternate-file FILENAME &optional WILDCARDS)
Find file FILENAME, select its buffer, kill previous buffer.
--
David Kastrup
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: two dired questions
2010-03-04 14:10 two dired questions B. T. Raven
2010-03-04 14:15 ` David Kastrup
@ 2010-03-04 17:48 ` José A. Romero L.
2010-03-05 18:48 ` jpkotta
2010-03-07 19:27 ` Colin S. Miller
3 siblings, 0 replies; 9+ messages in thread
From: José A. Romero L. @ 2010-03-04 17:48 UTC (permalink / raw)
To: help-gnu-emacs
On 4 Mar, 15:10, "B. T. Raven" <ni...@nihilo.net> wrote:
> i.
> Is there a function or, better yet, a keychord that backspaces (by
> erasing) subdirectory components in the minibuffer. So, if the current
> directory is deeply embedded in the file hierarchy, can I hit a key
(...)
> Is there a setting that overwrites the dired buffer with the new one
> navigated to (or alternatively kills the one navigated from), so that
> there is only one dired buffer at a time instead of a long trail of them?
There is find-alternate-file (C-x C-v), then you can use the that
appears by default in the minibuffer, and press C-backspace until you
reach the directory you want to visit, then press Enter.
For more sofisticated usecases you may want to have a look at:
http://www.emacswiki.org/emacs/Sunrise_Commander
Cheers,
--
José A. Romero L.
escherdragon at gmail.com
"We who cut mere stones must always be envisioning cathedrals."
(Quarry worker's creed)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: two dired questions
2010-03-04 14:15 ` David Kastrup
@ 2010-03-04 17:52 ` B. T. Raven
2010-05-04 16:50 ` Drew Adams
0 siblings, 1 reply; 9+ messages in thread
From: B. T. Raven @ 2010-03-04 17:52 UTC (permalink / raw)
To: help-gnu-emacs
David Kastrup wrote:
> "B. T. Raven" <nihil@nihilo.net> writes:
>
>> i.
>> Is there a function or, better yet, a keychord that backspaces (by
>> erasing) subdirectory components in the minibuffer. So, if the current
>> directory is deeply embedded in the file hierarchy, can I hit a key
>> combo to move backwards (upwards toward the root) in the directory tree:
>>
>> c:\abc\def\ghi\jkl
>> becomes
>> c:\abc\def\ghi
>> then
>> c:\abc\def
>>
>
> M-DEL (translated from <M-backspace>) runs the command
> backward-kill-word, which is an interactive compiled Lisp function in
> `simple.el'.
>
> It is bound to <C-backspace>, M-DEL.
>
> (backward-kill-word ARG)
>
> Kill characters backward until encountering the beginning of a word.
> With argument ARG, do this that many times.
Thanks, David. I think I knew this once but learning something new
knocked it out of my mind. I have customized use-file-dialog t for a
long time but now I want use the keyboad as much as possible. To punish
my obliviousness, I ran another 10 minute session of keywiz.el.
>
>
>> ii.
>> Is there a setting that overwrites the dired buffer with the new one
>> navigated to (or alternatively kills the one navigated from), so that
>> there is only one dired buffer at a time instead of a long trail of them?
>
> dired-find-alternate-file is an interactive compiled Lisp function in
> `dired.el'.
>
> (dired-find-alternate-file)
>
> In Dired, visit this file or directory instead of the dired buffer.
>
> [back]
>
> Or more generally:
>
> C-x C-v runs the command find-alternate-file, which is an interactive
> compiled Lisp function in `files.el'.
>
> It is bound to C-x C-v.
>
> (find-alternate-file FILENAME &optional WILDCARDS)
>
> Find file FILENAME, select its buffer, kill previous buffer.
I know that I can press 'a' instead of RET on a directory line in dired
to overwrite the buffer with the new directory but I wanted something like:
(put 'dired-find-alternate-file 'disabled nil)
to make the behavior more hard-wired. Unfortuneately this didn't work on
w32 22.3
dired+.el would probably work for me but that seems like overkill.
Thanks again,
Ed
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: two dired questions
2010-03-04 14:10 two dired questions B. T. Raven
2010-03-04 14:15 ` David Kastrup
2010-03-04 17:48 ` José A. Romero L.
@ 2010-03-05 18:48 ` jpkotta
2010-03-07 19:27 ` Colin S. Miller
3 siblings, 0 replies; 9+ messages in thread
From: jpkotta @ 2010-03-05 18:48 UTC (permalink / raw)
To: help-gnu-emacs
On Mar 4, 8:10 am, "B. T. Raven" <ni...@nihilo.net> wrote:
> i.
> Is there a function or, better yet, a keychord that backspaces (by
> erasing) subdirectory components in the minibuffer. So, if the current
> directory is deeply embedded in the file hierarchy, can I hit a key
> combo to move backwards (upwards toward the root) in the directory tree:
>
> c:\abc\def\ghi\jkl
> becomes
> c:\abc\def\ghi
> then
> c:\abc\def
>
> etc.
>
> ???
>
In ido-mode, this is the default behavior of backspace. ido-mode
isn't for everyone, though, so backward-kill-word a good
approximation.
> ii.
> Is there a setting that overwrites the dired buffer with the new one
> navigated to (or alternatively kills the one navigated from), so that
> there is only one dired buffer at a time instead of a long trail of them?
>
I use the dired+ package with (toggle-dired-find-file-reuse-dir 1).
> Thanks for any help,
>
> Ed
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: two dired questions
2010-03-04 14:10 two dired questions B. T. Raven
` (2 preceding siblings ...)
2010-03-05 18:48 ` jpkotta
@ 2010-03-07 19:27 ` Colin S. Miller
2010-03-08 4:02 ` B. T. Raven
3 siblings, 1 reply; 9+ messages in thread
From: Colin S. Miller @ 2010-03-07 19:27 UTC (permalink / raw)
To: help-gnu-emacs
B. T. Raven wrote:
> i.
> Is there a function or, better yet, a keychord that backspaces (by
> erasing) subdirectory components in the minibuffer. So, if the current
> directory is deeply embedded in the file hierarchy, can I hit a key
> combo to move backwards (upwards toward the root) in the directory tree:
>
Ed,
In any buffer (with a file), pressing C-x C-j will open a *dired* buffer
containing that file, and move the point to that file's entry.
In a *dired* buffer, it opens the parent directory.
I'm not sure how to replace the current *dired* buffer with its parent.
HTH,
Colin S. Miller
--
Replace the obvious in my email address with the first three letters of the hostname to reply.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: two dired questions
2010-03-07 19:27 ` Colin S. Miller
@ 2010-03-08 4:02 ` B. T. Raven
2010-03-08 22:28 ` Colin S. Miller
0 siblings, 1 reply; 9+ messages in thread
From: B. T. Raven @ 2010-03-08 4:02 UTC (permalink / raw)
To: help-gnu-emacs
Colin S. Miller wrote:
> B. T. Raven wrote:
>> i.
>> Is there a function or, better yet, a keychord that backspaces (by
>> erasing) subdirectory components in the minibuffer. So, if the current
>> directory is deeply embedded in the file hierarchy, can I hit a key
>> combo to move backwards (upwards toward the root) in the directory tree:
>>
>
> Ed,
> In any buffer (with a file), pressing C-x C-j will open a *dired* buffer
> containing that file, and move the point to that file's entry.
> In a *dired* buffer, it opens the parent directory.
>
> I'm not sure how to replace the current *dired* buffer with its parent.
>
> HTH,
> Colin S. Miller
>
>
>
Thanks, Colin. C-x C-j must be new in ver. 23 since it's undefined by
default in my 22.3 distro. In both versions you should be able to
replace the current dired buffer with its parent (unless you're in the
root) by navigating to the .. entry (e.g. with a series of < or >
presses) and then pressing 'a'
tnx,
Ed
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: two dired questions
2010-03-08 4:02 ` B. T. Raven
@ 2010-03-08 22:28 ` Colin S. Miller
0 siblings, 0 replies; 9+ messages in thread
From: Colin S. Miller @ 2010-03-08 22:28 UTC (permalink / raw)
To: help-gnu-emacs
B. T. Raven wrote:
> Colin S. Miller wrote:
>
> Thanks, Colin. C-x C-j must be new in ver. 23 since it's undefined by
> default in my 22.3 distro. In both versions you should be able to
> replace the current dired buffer with its parent (unless you're in the
> root) by navigating to the .. entry (e.g. with a series of < or >
> presses) and then pressing 'a'
>
> tnx,
>
> Ed
Ed,
Ah. I normally use xemacs, not GNU emacs, and assumed that
it also works in emacs.
In emacs 22.2.1, the function you want is dired-jump [under xemacs it's
dired-jump-back]. For some reason it's not bound by default in GNU emacs,
but binds itself the first time you use it.
SFAC,
Colin S. Miller
--
Replace the obvious in my email address with the first three letters of the hostname to reply.
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: two dired questions
2010-03-04 17:52 ` B. T. Raven
@ 2010-05-04 16:50 ` Drew Adams
0 siblings, 0 replies; 9+ messages in thread
From: Drew Adams @ 2010-05-04 16:50 UTC (permalink / raw)
To: 'B. T. Raven', help-gnu-emacs
> > It is bound to <C-backspace>, M-DEL.
> > (backward-kill-word ARG)
1. Remember too that you can use `../ TAB' to move up the directory hierarchy
during file-name completion.
2. In Icicles, `C-backspace' also moves up the hierarchy.
> dired+.el would probably work for me but that seems like overkill.
Overkill, underkill, Goldilocks-kill.
Different Goldilocks have different needs. ;-)
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2010-05-04 16:50 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-04 14:10 two dired questions B. T. Raven
2010-03-04 14:15 ` David Kastrup
2010-03-04 17:52 ` B. T. Raven
2010-05-04 16:50 ` Drew Adams
2010-03-04 17:48 ` José A. Romero L.
2010-03-05 18:48 ` jpkotta
2010-03-07 19:27 ` Colin S. Miller
2010-03-08 4:02 ` B. T. Raven
2010-03-08 22:28 ` Colin S. Miller
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).