unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* ignoring subdirectory in find-file completion
@ 2005-06-01 13:01 Albert Reiner
  2005-06-01 16:07 ` J. David Boyd
  0 siblings, 1 reply; 7+ messages in thread
From: Albert Reiner @ 2005-06-01 13:01 UTC (permalink / raw)


Hi,

I am looking for some way to make completion when using find-file
ignore any directory named _darcs; i.e., if I have a directory
structure

    foo/
      _darcs/
        ...
      bar/
        ...

then `M-x find-file f o o / TAB' should complete to `foo/bar/'.

>From the documentation I thought that

    (add-to-list 'completion-ignored-extensions "_darcs")

should do what I want, but that does not seem to be the case.

Any help would be appreciated.

Albert.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ignoring subdirectory in find-file completion
  2005-06-01 13:01 ignoring subdirectory in find-file completion Albert Reiner
@ 2005-06-01 16:07 ` J. David Boyd
  2005-06-01 16:19   ` Albert Reiner
  0 siblings, 1 reply; 7+ messages in thread
From: J. David Boyd @ 2005-06-01 16:07 UTC (permalink / raw)


Albert Reiner <areiner@tph.tuwien.ac.at> writes:

> Hi,
> 
> I am looking for some way to make completion when using find-file
> ignore any directory named _darcs; i.e., if I have a directory
> structure
> 
>     foo/
>       _darcs/
>         ...
>       bar/
>         ...
> 
> then `M-x find-file f o o / TAB' should complete to `foo/bar/'.
> 
> From the documentation I thought that
> 
>     (add-to-list 'completion-ignored-extensions "_darcs")
> 
> should do what I want, but that does not seem to be the case.
> 
> Any help would be appreciated.
> 
> Albert.

The docs for completion-ignored-extensions say:

...Directories are ignored if they match any string in this list which
ends in a slash...

And your "_darcs" doesn't end in a slash...

Dave

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ignoring subdirectory in find-file completion
  2005-06-01 16:07 ` J. David Boyd
@ 2005-06-01 16:19   ` Albert Reiner
  2005-06-01 16:31     ` Stefan Monnier
                       ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Albert Reiner @ 2005-06-01 16:19 UTC (permalink / raw)


Thanks for your reply:

[dave@adboyd.com (J. David Boyd), Wed, 01 Jun 2005 16:07:26 GMT]:
> >     (add-to-list 'completion-ignored-extensions "_darcs")
> 
> The docs for completion-ignored-extensions say:
> 
> ...Directories are ignored if they match any string in this list which
> ends in a slash...
> 
> And your "_darcs" doesn't end in a slash...

But even with the slash I don't get the desired behavior.  Also, the
description seems to indicate that ignored items should end in that
string, but foo_darcs should not be skipped.

BTW, the version here is "GNU Emacs 21.3.1 (i386-redhat-linux-gnu, X
toolkit, Xaw3d scroll bars) of 2005-02-04 on bugs.build.redhat.com".

Thanks again,

Albert.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ignoring subdirectory in find-file completion
  2005-06-01 16:19   ` Albert Reiner
@ 2005-06-01 16:31     ` Stefan Monnier
  2005-06-01 16:52       ` Albert Reiner
  2005-06-01 20:09     ` Eli Zaretskii
       [not found]     ` <mailman.2832.1117657492.25862.help-gnu-emacs@gnu.org>
  2 siblings, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 2005-06-01 16:31 UTC (permalink / raw)


> Also, the description seems to indicate that ignored items should end in
> that string, but foo_darcs should not be skipped.

Sorry, can't do that,


        Stefan

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ignoring subdirectory in find-file completion
  2005-06-01 16:31     ` Stefan Monnier
@ 2005-06-01 16:52       ` Albert Reiner
  0 siblings, 0 replies; 7+ messages in thread
From: Albert Reiner @ 2005-06-01 16:52 UTC (permalink / raw)


[Stefan Monnier <monnier@iro.umontreal.ca>, Wed, 01 Jun 2005 12:31:56 -0400]:
> > Also, the description seems to indicate that ignored items should end in
> > that string, but foo_darcs should not be skipped.
> 
> Sorry, can't do that,

Well, I'll live with that.  Thanks for your help, though, and for
pointing out that support for this isn't built in.

Regards,

Albert.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ignoring subdirectory in find-file completion
  2005-06-01 16:19   ` Albert Reiner
  2005-06-01 16:31     ` Stefan Monnier
@ 2005-06-01 20:09     ` Eli Zaretskii
       [not found]     ` <mailman.2832.1117657492.25862.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 7+ messages in thread
From: Eli Zaretskii @ 2005-06-01 20:09 UTC (permalink / raw)


> From: Albert Reiner <areiner@tph.tuwien.ac.at>
> Date: 01 Jun 2005 18:19:36 +0200
> 
> But even with the slash I don't get the desired behavior.  Also, the
> description seems to indicate that ignored items should end in that
> string, but foo_darcs should not be skipped.
> 
> BTW, the version here is "GNU Emacs 21.3.1 (i386-redhat-linux-gnu, X
> toolkit, Xaw3d scroll bars) of 2005-02-04 on bugs.build.redhat.com".

IIRC, this feature has a bug in 21.3 (and older versions as well), and
will be only fixed in the next release.  (And even there foo_darcs
will be skipped too.)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: ignoring subdirectory in find-file completion
       [not found]     ` <mailman.2832.1117657492.25862.help-gnu-emacs@gnu.org>
@ 2005-06-01 20:42       ` Albert Reiner
  0 siblings, 0 replies; 7+ messages in thread
From: Albert Reiner @ 2005-06-01 20:42 UTC (permalink / raw)


[Eli Zaretskii <eliz@gnu.org>, Wed, 01 Jun 2005 23:09:36 +0300]:
> IIRC, this feature has a bug in 21.3 (and older versions as well), and
> will be only fixed in the next release.  (And even there foo_darcs
> will be skipped too.)

Ah, thanks for pointing that out!

Regards,

Albert.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-06-01 20:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-01 13:01 ignoring subdirectory in find-file completion Albert Reiner
2005-06-01 16:07 ` J. David Boyd
2005-06-01 16:19   ` Albert Reiner
2005-06-01 16:31     ` Stefan Monnier
2005-06-01 16:52       ` Albert Reiner
2005-06-01 20:09     ` Eli Zaretskii
     [not found]     ` <mailman.2832.1117657492.25862.help-gnu-emacs@gnu.org>
2005-06-01 20:42       ` Albert Reiner

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).