help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ignore patterns for find-file tab completion?


From: Leo
Subject: Re: Ignore patterns for find-file tab completion?
Date: Sun, 29 Oct 2006 18:04:06 +0000
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/23.0.0 (gnu/linux)

On Sun, 29/10/06, Andy Gimblett wrote:

> Hi there,
>
> I've been using emacs for about five years now; I know my way around
> reasonably well, but haven't done any elisp programming other than
> very simple stuff in my .emacs (a couple of lines at most).  I've just
> joined this list in order to ask a question regarding tab completion
> when opening a file using find-file (ie just with C-x C-f).
>
> In short: is it possible to specify a pattern for files to be
> _ignored_ in this context?
>
> Motivation:
>
>   1. I program in Haskell (sometimes).
>
>   2. Haskell source files have the suffix .hs (eg foo.hs)
>
>   3. A by-product of their compilation are .hi files (eg foo.hi), in
>      the same directory.
>
>   4. .hi files are not something I would ever, ever, want to load into
>      emacs.
>
>   5. Thus, I'd like to ignore them when trying to open a file.
>
> At the moment, given a directory containing a mix of .hs and .hi
> files, find-file's tab completion will typically get as far as ".h"
> (eg "foo.h") but then it has a choice between foo.hs and foo.hi, so it
> stops and I have to explicitly enter the "s".  This is annoying
> because:
>
>   a) I never want the .hi file, so it's a pointless question which I
>      would hope could be avoided;
>
>   b) If I forget, and just hit return, it tries to open "foo.h", which
>      almost certainly doesn't exist, so I get an empty buffer which I
>      then have to close before reattemting the find-file.
>
> Surely this is a common thing to want to do?  Is this a solved
> problem?
>
> Thanks!
>
> -Andy

It seems ido well suits your needs. it is located in
'emacs/23.0.0/lisp/ido.el.gz' in my system.

-- 
Leo





reply via email to

[Prev in Thread] Current Thread [Next in Thread]