* Change default behavior of completion-ignored-extensions
@ 2003-12-01 23:59 Andrew Korty
0 siblings, 0 replies; 7+ messages in thread
From: Andrew Korty @ 2003-12-01 23:59 UTC (permalink / raw)
Greetings. How can I change the way completion-ignored-extensions is
used by find-file?
As it is, "lists of possible completions" aren't affected by this
variable:
,----[ C-h v completion-ignored-extensions RET ]
| 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.
`----
I'd like to add ./ and ../ to this variable and be able to
tab-complete right through a directory with only one interesting
entry. For example, if I have a directory ~/foo/ containing a
subdirectory bar/, I should be able to type
M-x find-file RET ~/foo TAB
and end up with ~/foo/bar/ in the minibuffer instead of first getting
"[Complete, but not unique]", hitting TAB again, getting
"Completion List" buffer containing ./, ../, and bar/, and having to
type "b TAB" to finally get what should have been obvious.
I understand that completion-ignored-extensions is not supposed to
work this way, but I want to change that behavior. It seems like I
should be able to advise minibuffer-complete, but I haven't figured
out how to do that successfully.
--
Andrew J. Korty, Principal Security Engineer, GCIA, GCFA
Office of the Vice President for Information Technology
Indiana University
^ permalink raw reply [flat|nested] 7+ messages in thread
* Change default behavior of completion-ignored-extensions
@ 2003-12-02 0:00 Andrew Korty
0 siblings, 0 replies; 7+ messages in thread
From: Andrew Korty @ 2003-12-02 0:00 UTC (permalink / raw)
Greetings. How can I change the way completion-ignored-extensions is
used by find-file?
As it is, "lists of possible completions" aren't affected by this
variable:
,----[ C-h v completion-ignored-extensions RET ]
| 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.
`----
I'd like to add ./ and ../ to this variable and be able to
tab-complete right through a directory with only one interesting
entry. For example, if I have a directory ~/foo/ containing a
subdirectory bar/, I should be able to type
M-x find-file RET ~/foo TAB
and end up with ~/foo/bar/ in the minibuffer instead of first getting
"[Complete, but not unique]", hitting TAB again, getting
"Completion List" buffer containing ./, ../, and bar/, and having to
type "b TAB" to finally get what should have been obvious.
I understand that completion-ignored-extensions is not supposed to
work this way, but I want to change that behavior. It seems like I
should be able to advise minibuffer-complete, but I haven't figured
out how to do that successfully.
--
Andrew J. Korty, Principal Security Engineer, GCIA, GCFA
Office of the Vice President for Information Technology
Indiana University
^ permalink raw reply [flat|nested] 7+ messages in thread
* Change default behavior of completion-ignored-extensions
@ 2003-12-02 0:00 Andrew Korty
2003-12-02 6:19 ` Eli Zaretskii
0 siblings, 1 reply; 7+ messages in thread
From: Andrew Korty @ 2003-12-02 0:00 UTC (permalink / raw)
Greetings. How can I change the way completion-ignored-extensions is
used by find-file?
As it is, "lists of possible completions" aren't affected by this
variable:
,----[ C-h v completion-ignored-extensions RET ]
| 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.
`----
I'd like to add ./ and ../ to this variable and be able to
tab-complete right through a directory with only one interesting
entry. For example, if I have a directory ~/foo/ containing a
subdirectory bar/, I should be able to type
M-x find-file RET ~/foo TAB
and end up with ~/foo/bar/ in the minibuffer instead of first getting
"[Complete, but not unique]", hitting TAB again, getting
"Completion List" buffer containing ./, ../, and bar/, and having to
type "b TAB" to finally get what should have been obvious.
I understand that completion-ignored-extensions is not supposed to
work this way, but I want to change that behavior. It seems like I
should be able to advise minibuffer-complete, but I haven't figured
out how to do that successfully.
--
Andrew J. Korty, Principal Security Engineer, GCIA, GCFA
Office of the Vice President for Information Technology
Indiana University
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Change default behavior of completion-ignored-extensions
2003-12-02 0:00 Andrew Korty
@ 2003-12-02 6:19 ` Eli Zaretskii
2003-12-02 14:43 ` Andrew Korty
0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2003-12-02 6:19 UTC (permalink / raw)
> From: Andrew Korty <ajk@iu.edu>
> Date: Mon, 01 Dec 2003 19:00:31 -0500
>
> I'd like to add ./ and ../ to this variable and be able to
> tab-complete right through a directory with only one interesting
> entry.
Emacs already filters out the uninteresting directory entries such as
"." and "..". This happens automatically; the value of
completion-ignored-extensions does not need to include them.
> For example, if I have a directory ~/foo/ containing a
> subdirectory bar/, I should be able to type
>
> M-x find-file RET ~/foo TAB
>
> and end up with ~/foo/bar/ in the minibuffer instead of first getting
> "[Complete, but not unique]", hitting TAB again, getting
> "Completion List" buffer containing ./, ../, and bar/, and having to
> type "b TAB" to finally get what should have been obvious.
What version of Emacs do you have there? In Emacs 21.2, I type "C-x
C-f ~/foo TAB" and Emacs completes it to "~/foo/". Another TAB gets
me "~/foo/bar/", just like I'd expect. There are no "[Complete, but
not unique]" messages and no need to wade through useless completion
lists.
(The reason that you need 2 TABs to get what you want is because you
might wish to create a new file in ~/foo. This is a well-documented
feature, unrelated to `completion-ignored-extensions'.)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Change default behavior of completion-ignored-extensions
2003-12-02 6:19 ` Eli Zaretskii
@ 2003-12-02 14:43 ` Andrew Korty
2003-12-02 17:38 ` Eli Zaretskii
0 siblings, 1 reply; 7+ messages in thread
From: Andrew Korty @ 2003-12-02 14:43 UTC (permalink / raw)
Eli Zaretskii <eliz@elta.co.il> writes:
>> From: Andrew Korty <ajk@iu.edu>
>> Date: Mon, 01 Dec 2003 19:00:31 -0500
>>
>> For example, if I have a directory ~/foo/ containing a
>> subdirectory bar/, I should be able to type
>>
>> M-x find-file RET ~/foo TAB
>>
>> and end up with ~/foo/bar/ in the minibuffer instead of first getting
>> "[Complete, but not unique]", hitting TAB again, getting
>> "Completion List" buffer containing ./, ../, and bar/, and having to
>> type "b TAB" to finally get what should have been obvious.
>
> What version of Emacs do you have there? In Emacs 21.2, I type "C-x
> C-f ~/foo TAB" and Emacs completes it to "~/foo/". Another TAB gets
> me "~/foo/bar/", just like I'd expect. There are no "[Complete, but
> not unique]" messages and no need to wade through useless completion
> lists.
Right you are -- I oversimplified the example. I should have mentioned
~/foo/ also has a CVS/ subdirectory. So I get a "Completion List"
containing ./, ../, CVS/, and bar/. I want CVS/ to be ignored like
./ and ../ normally are.
--
Andrew J. Korty, Principal Security Engineer, GCIA, GCFA
Office of the Vice President for Information Technology
Indiana University
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Change default behavior of completion-ignored-extensions
2003-12-02 14:43 ` Andrew Korty
@ 2003-12-02 17:38 ` Eli Zaretskii
2003-12-10 12:29 ` Andrew Korty
0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2003-12-02 17:38 UTC (permalink / raw)
> From: Andrew Korty <ajk@iu.edu>
> Date: Tue, 02 Dec 2003 09:43:44 -0500
>
> Right you are -- I oversimplified the example. I should have mentioned
> ~/foo/ also has a CVS/ subdirectory. So I get a "Completion List"
> containing ./, ../, CVS/, and bar/. I want CVS/ to be ignored like
> ./ and ../ normally are.
You still didn't tell what is your Emacs version :-(
I'm guessing it's 21.2 or some such, since that version (and all older
versions) had a bug in handling entries like "foo/" (meaning ignore
the directory `foo') in completion-ignored-extensions: they wouldn't
ignore these directories. You will see that "CVS/" is already in
completion-ignored-extensions.
This bug is fixed in the CVS, so a future version will be free of it.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Change default behavior of completion-ignored-extensions
2003-12-02 17:38 ` Eli Zaretskii
@ 2003-12-10 12:29 ` Andrew Korty
0 siblings, 0 replies; 7+ messages in thread
From: Andrew Korty @ 2003-12-10 12:29 UTC (permalink / raw)
"Eli Zaretskii" <eliz@elta.co.il> writes:
>> From: Andrew Korty <ajk@iu.edu>
>> Date: Tue, 02 Dec 2003 09:43:44 -0500
>>
>> Right you are -- I oversimplified the example. I should have mentioned
>> ~/foo/ also has a CVS/ subdirectory. So I get a "Completion List"
>> containing ./, ../, CVS/, and bar/. I want CVS/ to be ignored like
>> ./ and ../ normally are.
>
> You still didn't tell what is your Emacs version :-(
Sorry, forgot. It's 21.3.1.
> I'm guessing it's 21.2 or some such, since that version (and all older
> versions) had a bug in handling entries like "foo/" (meaning ignore
> the directory `foo') in completion-ignored-extensions: they wouldn't
> ignore these directories. You will see that "CVS/" is already in
> completion-ignored-extensions.
>
> This bug is fixed in the CVS, so a future version will be free of it.
Thanks, I'll try the CVS version.
--
Andrew J. Korty, Principal Security Engineer, GCIA, GCFA
Office of the Vice President for Information Technology
Indiana University
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2003-12-10 12:29 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-01 23:59 Change default behavior of completion-ignored-extensions Andrew Korty
-- strict thread matches above, loose matches on Subject: below --
2003-12-02 0:00 Andrew Korty
2003-12-02 0:00 Andrew Korty
2003-12-02 6:19 ` Eli Zaretskii
2003-12-02 14:43 ` Andrew Korty
2003-12-02 17:38 ` Eli Zaretskii
2003-12-10 12:29 ` Andrew Korty
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.