unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Ignore patterns for find-file tab completion?
@ 2006-10-29 17:58 Andy Gimblett
  2006-10-29 18:04 ` Leo
  2006-10-29 18:38 ` Drew Adams
  0 siblings, 2 replies; 4+ messages in thread
From: Andy Gimblett @ 2006-10-29 17:58 UTC (permalink / raw)


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

-- 
Andy Gimblett
Computer Science Department
University of Wales Swansea
http://www.cs.swan.ac.uk/~csandy/

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

end of thread, other threads:[~2006-10-29 19:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-29 17:58 Ignore patterns for find-file tab completion? Andy Gimblett
2006-10-29 18:04 ` Leo
2006-10-29 18:38 ` Drew Adams
2006-10-29 19:44   ` Andy Gimblett

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