* ignore CVS directories with tab complete
@ 2003-08-12 18:10 Phillip Lord
2003-08-13 6:34 ` Eli Zaretskii
` (2 more replies)
0 siblings, 3 replies; 18+ messages in thread
From: Phillip Lord @ 2003-08-12 18:10 UTC (permalink / raw)
Dear all
If I start a clean emacs (-q --no-site-file), and then change into a
directory with only two sub-dirs, one of which is CVS, and then hit
tab I get...
Completions
../ ./ CVS/ uk/
With java this is a pain as there are four or five levels of empty
directories before I get to the source. As I have to move up and down
these directories many times in a day, the ability to tab
automatically up and down would be fabulous.
Now before I set about writing code
a) is there any way of getting emacs to ignore the CVS directory all
together. That way I could move up five empty directories with five
tabs.
b) even better, have emacs realise that there are five empty
directories, and auto complete all the way up.
I know about completion-ignored-extensions. This includes CVS by
default, and doesn't seem to do what I need.
Cheers
Phil
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: ignore CVS directories with tab complete
2003-08-12 18:10 ignore CVS directories with tab complete Phillip Lord
@ 2003-08-13 6:34 ` Eli Zaretskii
2003-08-13 18:06 ` Kevin Rodgers
2003-08-17 17:05 ` Kai Großjohann
2 siblings, 0 replies; 18+ messages in thread
From: Eli Zaretskii @ 2003-08-13 6:34 UTC (permalink / raw)
> From: Phillip Lord <p.lord@russet.org.uk>
> Newsgroups: gnu.emacs.help
> Date: 12 Aug 2003 19:10:40 +0100
>
> If I start a clean emacs (-q --no-site-file), and then change into a
> directory with only two sub-dirs, one of which is CVS, and then hit
> tab I get...
>
> Completions
>
> ../ ./ CVS/ uk/
What command did you invoke before hitting TAB? Was that "C-x C-f" or
something else?
> a) is there any way of getting emacs to ignore the CVS directory all
> together. That way I could move up five empty directories with five
> tabs.
What version of Emacs is that? Emacs already has "CVS/" in the value
of the variable `completion-ignored-extensions' (together with "./"
and "../", which you also see on your system), so it should ignore
those by default, unless they are the only files in the directory.
But some past versions of Emacs had a bug that would cause the
ignored directories to show anyhow.
What you ask in a) above already works for me in the CVS version of
Emacs; I'm not sure if Emacs 21.2 or 21.3 has that bug fixed, though.
> b) even better, have emacs realise that there are five empty
> directories, and auto complete all the way up.
I don't think it is a good idea to have such a feature: a user could
have in mind creation of a file in one of the empty directories on the
way down.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: ignore CVS directories with tab complete
2003-08-12 18:10 ignore CVS directories with tab complete Phillip Lord
2003-08-13 6:34 ` Eli Zaretskii
@ 2003-08-13 18:06 ` Kevin Rodgers
2003-08-14 11:01 ` Phillip Lord
2003-08-17 17:05 ` Kai Großjohann
2 siblings, 1 reply; 18+ messages in thread
From: Kevin Rodgers @ 2003-08-13 18:06 UTC (permalink / raw)
Phillip Lord wrote:
> Dear all
>
> If I start a clean emacs (-q --no-site-file), and then change into a
> directory with only two sub-dirs, one of which is CVS, and then hit
> tab I get...
>
> Completions
>
> ../ ./ CVS/ uk/
>
>
> With java this is a pain as there are four or five levels of empty
> directories before I get to the source. As I have to move up and down
> these directories many times in a day, the ability to tab
> automatically up and down would be fabulous.
How about using dired to navigate the directories?
Or using filecache.el to cache your files' locations?
> Now before I set about writing code
>
> a) is there any way of getting emacs to ignore the CVS directory all
> together. That way I could move up five empty directories with five
> tabs.
>
> b) even better, have emacs realise that there are five empty
> directories, and auto complete all the way up.
>
> I know about completion-ignored-extensions. This includes CVS by
> default, and doesn't seem to do what I need.
Does complete.el help?
--
Kevin Rodgers
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: ignore CVS directories with tab complete
2003-08-13 18:06 ` Kevin Rodgers
@ 2003-08-14 11:01 ` Phillip Lord
0 siblings, 0 replies; 18+ messages in thread
From: Phillip Lord @ 2003-08-14 11:01 UTC (permalink / raw)
>>>>> "Kevin" == Kevin Rodgers <ihs_4664@yahoo.com> writes:
Kevin> Phillip Lord wrote:
>> Dear all If I start a clean emacs (-q --no-site-file), and then
>> change into a
>> directory with only two sub-dirs, one of which is CVS, and then
>> hit tab I get... Completions
>> ../ ./ CVS/ uk/
>> With java this is a pain as there are four or five levels of
>> empty
Kevin> How about using dired to navigate the directories?
My experience with dired, is that it's slower than using tab
completion, which is not good.
Kevin> Or using filecache.el to cache your files' locations?
filecache.el I didn't know about. It looks potentially useful though,
so I shall investigate.
>> Now before I set about writing code
>> a) is there any way of getting emacs to ignore the CVS directory
>> all
>> together. That way I could move up five empty directories with
>> five tabs.
>> b) even better, have emacs realise that there are five empty
>> directories, and auto complete all the way up. I know about
>> completion-ignored-extensions. This includes CVS by
>> default, and doesn't seem to do what I need.
Kevin> Does complete.el help?
Not that I can see. Am I missing something?
Phil
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: ignore CVS directories with tab complete
2003-08-12 18:10 ignore CVS directories with tab complete Phillip Lord
2003-08-13 6:34 ` Eli Zaretskii
2003-08-13 18:06 ` Kevin Rodgers
@ 2003-08-17 17:05 ` Kai Großjohann
2003-08-18 10:04 ` Phillip Lord
2 siblings, 1 reply; 18+ messages in thread
From: Kai Großjohann @ 2003-08-17 17:05 UTC (permalink / raw)
Phillip Lord <p.lord@russet.org.uk> writes:
> a) is there any way of getting emacs to ignore the CVS directory all
> together. That way I could move up five empty directories with five
> tabs.
Depending on your version of Emacs, C-h v
completion-ignored-extensions RET might mention directories marked
with trailing slashes.
(add-to-list 'completion-ignored-extensions "CVS/")
--
Two cafe au lait please, but without milk.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: ignore CVS directories with tab complete
2003-08-17 17:05 ` Kai Großjohann
@ 2003-08-18 10:04 ` Phillip Lord
2003-08-18 12:33 ` Kai Großjohann
0 siblings, 1 reply; 18+ messages in thread
From: Phillip Lord @ 2003-08-18 10:04 UTC (permalink / raw)
>>>>> "Kai" == Kai Großjohann <kai.grossjohann@gmx.net> writes:
Kai> Phillip Lord <p.lord@russet.org.uk> writes:
>> a) is there any way of getting emacs to ignore the CVS directory
>> all
>> together. That way I could move up five empty directories with
>> five tabs.
Kai> Depending on your version of Emacs, C-h v
Kai> completion-ignored-extensions RET might mention directories
Kai> marked with trailing slashes.
Kai> (add-to-list 'completion-ignored-extensions "CVS/")
It doesn't seem to make any difference to me. I've tried putting both
"CVS" and "CVS/" into the path, and it still fails.
Phil
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: ignore CVS directories with tab complete
2003-08-18 10:04 ` Phillip Lord
@ 2003-08-18 12:33 ` Kai Großjohann
2003-08-18 12:37 ` Phillip Lord
0 siblings, 1 reply; 18+ messages in thread
From: Kai Großjohann @ 2003-08-18 12:33 UTC (permalink / raw)
Phillip Lord <p.lord@russet.org.uk> writes:
> It doesn't seem to make any difference to me. I've tried putting both
> "CVS" and "CVS/" into the path, and it still fails.
Yeah, but please do C-h v completion-ignored-extensions RET and see
if that explicitly mentions subdirs, like mine does:
Directories are ignored if they match any string in this list which
ends in a slash.
If the above is not there, your Emacs is too old.
--
Two cafe au lait please, but without milk.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: ignore CVS directories with tab complete
2003-08-18 12:33 ` Kai Großjohann
@ 2003-08-18 12:37 ` Phillip Lord
2003-08-18 13:15 ` Kai Großjohann
0 siblings, 1 reply; 18+ messages in thread
From: Phillip Lord @ 2003-08-18 12:37 UTC (permalink / raw)
>>>>> "Kai" == Kai Großjohann <kai.grossjohann@gmx.net> writes:
Kai> Phillip Lord <p.lord@russet.org.uk> writes:
>> It doesn't seem to make any difference to me. I've tried putting
>> both "CVS" and "CVS/" into the path, and it still fails.
Kai> Yeah, but please do C-h v completion-ignored-extensions RET and
Kai> see if that explicitly mentions subdirs, like mine does:
Kai> Directories are ignored if they match any string in this
Kai> list which ends in a slash.
I'm sorry Kai, I misunderstood.
My Emacs does not have this paragraph in. I am running on 21.2.93.1,
which is relatively recent though.
Phil
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: ignore CVS directories with tab complete
2003-08-18 12:37 ` Phillip Lord
@ 2003-08-18 13:15 ` Kai Großjohann
2003-08-18 13:31 ` Johan Bockgård
` (2 more replies)
0 siblings, 3 replies; 18+ messages in thread
From: Kai Großjohann @ 2003-08-18 13:15 UTC (permalink / raw)
Phillip Lord <p.lord@russet.org.uk> writes:
> My Emacs does not have this paragraph in. I am running on 21.2.93.1,
> which is relatively recent though.
Ah. I just looked, it's not in 21.3, either. So it's just in the
CVS version of Emacs.
Oh, well. Not sure what to do now.
--
Two cafe au lait please, but without milk.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: ignore CVS directories with tab complete
2003-08-18 13:15 ` Kai Großjohann
@ 2003-08-18 13:31 ` Johan Bockgård
2003-08-18 14:37 ` Phillip Lord
2003-08-18 14:24 ` Phillip Lord
2003-08-19 10:00 ` Dryice Liu
2 siblings, 1 reply; 18+ messages in thread
From: Johan Bockgård @ 2003-08-18 13:31 UTC (permalink / raw)
kai.grossjohann@gmx.net (Kai Großjohann) writes:
> Phillip Lord <p.lord@russet.org.uk> writes:
>
>> My Emacs does not have this paragraph in. I am running on 21.2.93.1,
>> which is relatively recent though.
>
> Ah. I just looked, it's not in 21.3, either. So it's just in the
> CVS version of Emacs.
>
> Oh, well. Not sure what to do now.
Strange. Emacs 21.2. The docstring does indeed not mention
directories, but "CVS/" is in the list, and it *does* work here.
--
Johan Bockgård
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: ignore CVS directories with tab complete
2003-08-18 13:15 ` Kai Großjohann
2003-08-18 13:31 ` Johan Bockgård
@ 2003-08-18 14:24 ` Phillip Lord
2003-08-19 10:00 ` Dryice Liu
2 siblings, 0 replies; 18+ messages in thread
From: Phillip Lord @ 2003-08-18 14:24 UTC (permalink / raw)
>>>>> "Kai" == Kai Großjohann <kai.grossjohann@gmx.net> writes:
Kai> Phillip Lord <p.lord@russet.org.uk> writes:
>> My Emacs does not have this paragraph in. I am running on
>> 21.2.93.1, which is relatively recent though.
Kai> Ah. I just looked, it's not in 21.3, either. So it's just in
Kai> the CVS version of Emacs.
Kai> Oh, well. Not sure what to do now.
Wait, is I suspect, the answer!
Phil
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: ignore CVS directories with tab complete
2003-08-18 13:31 ` Johan Bockgård
@ 2003-08-18 14:37 ` Phillip Lord
2003-08-18 15:49 ` Robert Epprecht
2003-08-18 17:34 ` Johan Bockgård
0 siblings, 2 replies; 18+ messages in thread
From: Phillip Lord @ 2003-08-18 14:37 UTC (permalink / raw)
>>>>> "Johan" == Johan Bockgård <bojohan> writes:
Johan> kai.grossjohann@gmx.net (Kai Großjohann) writes:
>> Phillip Lord <p.lord@russet.org.uk> writes:
>>
>>> My Emacs does not have this paragraph in. I am running on
>>> 21.2.93.1, which is relatively recent though.
>>
>> Ah. I just looked, it's not in 21.3, either. So it's just in
>> the CVS version of Emacs.
>>
>> Oh, well. Not sure what to do now.
Johan> Strange. Emacs 21.2. The docstring does indeed not mention
Johan> directories, but "CVS/" is in the list, and it *does* work
Johan> here.
I've tried it with emacs -q, and it definitely does not work for me.
Just to make sure we are talking about the same thing....
1) C-xC-f to open a file
2) Move to a directory containing two sub-dirs, one of which is CVS/
3) Hit "tab".
4) I get *Completions* with "CVS/" offered as one of the options. What
I want is for it to ignore CVS, and offer me the other directory.
Is this what you have?
Phil
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: ignore CVS directories with tab complete
2003-08-18 14:37 ` Phillip Lord
@ 2003-08-18 15:49 ` Robert Epprecht
2003-08-18 16:57 ` Phillip Lord
2003-08-18 17:34 ` Johan Bockgård
1 sibling, 1 reply; 18+ messages in thread
From: Robert Epprecht @ 2003-08-18 15:49 UTC (permalink / raw)
Phillip Lord <p.lord@russet.org.uk> writes:
> 1) C-xC-f to open a file
>
> 2) Move to a directory containing two sub-dirs, one of which is CVS/
>
> 3) Hit "tab".
>
> 4) I get *Completions* with "CVS/" offered as one of the options. What
> I want is for it to ignore CVS, and offer me the other directory.
>
> Is this what you have?
GNU Emacs 21.2: Yes, same here.
But: C-h v completion-ignored-extensions RET also says:
| Documentation:
| *Completion ignores filenames ending in any string in this list.
| This variable does not affect lists of possible completions,
| but does affect the commands that actually do completions.
hmm, maybe I'm a bit dense, but I do not fully understand...
Any way it *does not* affect the presented list of completions like
the documentation says...
Robert
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: ignore CVS directories with tab complete
2003-08-18 15:49 ` Robert Epprecht
@ 2003-08-18 16:57 ` Phillip Lord
0 siblings, 0 replies; 18+ messages in thread
From: Phillip Lord @ 2003-08-18 16:57 UTC (permalink / raw)
>>>>> "Robert" == Robert Epprecht <epprecht@solnet.ch> writes:
Robert> Phillip Lord <p.lord@russet.org.uk> writes:
>> 1) C-xC-f to open a file
>>
>> 2) Move to a directory containing two sub-dirs, one of which is
>> CVS/
>>
>> 3) Hit "tab".
>>
>> 4) I get *Completions* with "CVS/" offered as one of the
>> options. What
>> I want is for it to ignore CVS, and offer me the other directory.
>>
>> Is this what you have?
Robert> GNU Emacs 21.2: Yes, same here.
Robert> But: C-h v completion-ignored-extensions RET also says:
Robert> | Documentation: | *Completion ignores filenames ending in
Robert> any string in this list. | This variable does not affect
Robert> lists of possible completions, | but does affect the
Robert> commands that actually do completions.
Robert> hmm, maybe I'm a bit dense, but I do not fully understand...
Robert> Any way it *does not* affect the presented list of
Robert> completions like the documentation says...
Yeah, I know. I'm just not sure what it means by "does affect the
commands that actually do completions". If I change into a directory
with only a single sub dir, for instance, TAB will automatically
complete this directory, which is what I want to happen!
Phil
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: ignore CVS directories with tab complete
2003-08-18 14:37 ` Phillip Lord
2003-08-18 15:49 ` Robert Epprecht
@ 2003-08-18 17:34 ` Johan Bockgård
2003-08-19 11:42 ` Phillip Lord
1 sibling, 1 reply; 18+ messages in thread
From: Johan Bockgård @ 2003-08-18 17:34 UTC (permalink / raw)
Phillip Lord <p.lord@russet.org.uk> writes:
> 1) C-x C-f to open a file
>
> 2) Move to a directory containing two sub-dirs, one of which is CVS/
>
> 3) Hit "tab".
4) It immediatly fills in the other directory.
However, I also noticed now that it is because I use
`partial-completion-mode' (as a side effect).
,----[ C-h f partial-completion-mode RET ]
| [...]
| For example, M-x p-c-m expands to M-x partial-completion-mode since
| no other command begins with that sequence of characters, and M-x
| find-file f_b.c TAB might complete to foo_bar.c if that file existed
| and no other file in that directory begin with that sequence of
| characters.
| [...]
`----
--
Johan Bockgård
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: ignore CVS directories with tab complete
2003-08-18 13:15 ` Kai Großjohann
2003-08-18 13:31 ` Johan Bockgård
2003-08-18 14:24 ` Phillip Lord
@ 2003-08-19 10:00 ` Dryice Liu
2003-08-19 11:44 ` Phillip Lord
2 siblings, 1 reply; 18+ messages in thread
From: Dryice Liu @ 2003-08-19 10:00 UTC (permalink / raw)
kai.grossjohann@gmx.net (Kai Großjohann) wrote:
> Ah. I just looked, it's not in 21.3, either. So it's just in the
> CVS version of Emacs.
>
> Oh, well. Not sure what to do now.
Looks like ido-mode obey this and do what Phillip what.
,----[ ido mode from http://www.cua.dk/ ]
| (defcustom ido-ignore-extensions t
| "*Non-nil means ignore files in completion-ignored-extensions list."
| :type 'boolean
| :group 'ido)
`----
--
Dryice Liu
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: ignore CVS directories with tab complete
2003-08-18 17:34 ` Johan Bockgård
@ 2003-08-19 11:42 ` Phillip Lord
0 siblings, 0 replies; 18+ messages in thread
From: Phillip Lord @ 2003-08-19 11:42 UTC (permalink / raw)
>>>>> "Johan" == Johan Bockgård <bojohan> writes:
Johan> Phillip Lord <p.lord@russet.org.uk> writes:
>> 1) C-x C-f to open a file
>>
>> 2) Move to a directory containing two sub-dirs, one of which is
>> CVS/
>>
>> 3) Hit "tab".
Johan> 4) It immediatly fills in the other directory.
Johan> However, I also noticed now that it is because I use
Johan> `partial-completion-mode' (as a side effect).
Okay, this explains things. If I turn partial completion mode, then it
behaves as you describe.
Phil
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: ignore CVS directories with tab complete
2003-08-19 10:00 ` Dryice Liu
@ 2003-08-19 11:44 ` Phillip Lord
0 siblings, 0 replies; 18+ messages in thread
From: Phillip Lord @ 2003-08-19 11:44 UTC (permalink / raw)
>>>>> "Dryice" == Dryice Liu <do@not.reply.this> writes:
Dryice> kai.grossjohann@gmx.net (Kai Großjohann) wrote:
>> Ah. I just looked, it's not in 21.3, either. So it's just in
>> the CVS version of Emacs.
>>
>> Oh, well. Not sure what to do now.
Dryice> Looks like ido-mode obey this and do what Phillip what.
Dryice> ,----[ ido mode from http://www.cua.dk/ ] | (defcustom
Dryice> ido-ignore-extensions t | "*Non-nil means ignore files in
Dryice> completion-ignored-extensions list." | :type 'boolean |
Dryice> :group 'ido) `----
So it does. I've been using ido mode for buffers for a while, but not
for files. Can't remember why I turned it off for files. I guess it's
time for me to give it a go again.
Thanks for the advice.
Phil
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2003-08-19 11:44 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-12 18:10 ignore CVS directories with tab complete Phillip Lord
2003-08-13 6:34 ` Eli Zaretskii
2003-08-13 18:06 ` Kevin Rodgers
2003-08-14 11:01 ` Phillip Lord
2003-08-17 17:05 ` Kai Großjohann
2003-08-18 10:04 ` Phillip Lord
2003-08-18 12:33 ` Kai Großjohann
2003-08-18 12:37 ` Phillip Lord
2003-08-18 13:15 ` Kai Großjohann
2003-08-18 13:31 ` Johan Bockgård
2003-08-18 14:37 ` Phillip Lord
2003-08-18 15:49 ` Robert Epprecht
2003-08-18 16:57 ` Phillip Lord
2003-08-18 17:34 ` Johan Bockgård
2003-08-19 11:42 ` Phillip Lord
2003-08-18 14:24 ` Phillip Lord
2003-08-19 10:00 ` Dryice Liu
2003-08-19 11:44 ` Phillip Lord
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).