From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Leo Newsgroups: gmane.emacs.help Subject: Re: Ignore patterns for find-file tab completion? Date: Sun, 29 Oct 2006 18:04:06 +0000 Message-ID: References: <20061029175833.GA8389@cspcag2.swan.ac.uk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1162145111 18512 80.91.229.2 (29 Oct 2006 18:05:11 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 29 Oct 2006 18:05:11 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Oct 29 19:05:10 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GeF1q-0005yQ-4X for geh-help-gnu-emacs@m.gmane.org; Sun, 29 Oct 2006 19:05:02 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GeF1p-0007L0-La for geh-help-gnu-emacs@m.gmane.org; Sun, 29 Oct 2006 13:05:01 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GeF1U-0007JK-2Q for help-gnu-emacs@gnu.org; Sun, 29 Oct 2006 13:04:40 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GeF1S-0007Hw-Dp for help-gnu-emacs@gnu.org; Sun, 29 Oct 2006 13:04:39 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GeF1S-0007Hm-4a for help-gnu-emacs@gnu.org; Sun, 29 Oct 2006 13:04:38 -0500 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GeF1R-0002zl-ED for help-gnu-emacs@gnu.org; Sun, 29 Oct 2006 13:04:37 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1GeF1A-0005md-1T for help-gnu-emacs@gnu.org; Sun, 29 Oct 2006 19:04:20 +0100 Original-Received: from sl392.st-edmunds.cam.ac.uk ([131.111.223.202]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 29 Oct 2006 19:04:20 +0100 Original-Received: from sdl.web by sl392.st-edmunds.cam.ac.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 29 Oct 2006 19:04:20 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: help-gnu-emacs@gnu.org Original-Lines: 52 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: sl392.st-edmunds.cam.ac.uk Face: iVBORw0KGgoAAAANSUhEUgAAAEAAAAASCAMAAADc8SgQAAAAwFBMVEUCBQEJDAgTFRIaHBof IB4jJCIrLCotLywyNDE3OTY8Pjs/QD5FRkRJS0hRU1BWV1VbXVpiZGFnaWZrbWptb2xvcW52eHV5 enh+gH2Bg4CHiYaLjYqNj4yRk5CXmZaanJmdn5ygop+mqKWqrKmsrqutr6yxs7CztbK4ure7vbq/ wb7DxcLHycbJy8jNz8vQ0s/T1dLW2NXc3tvf4d7h5ODl5+Po6ufr7enu8O3x8/Dz9fL1+PT4+vf6 /Pn7/fr+//wGuxWtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH1gIaAyMw1+FInQAAAXxJ REFUOMulk+tygjAQhalFWodYvIwyiNUKA95QVLwQhLPv/1ZNAKWX8Yd6ZsLAZvdL9iQo9KSUx0v3 0wV/BjDSzZY6exxw0BJgrqaPApBtQeDK6eEdAGJ4DQhAZjFmWVZf798LmTUi6QGgmQCysHtfeWa1 OXITj8pMYrh9Vz03vmQbEuArMeETSZBPpIdKvMg9B2faL2NKgl3R/zZIuFZnjDW5bKGnrVfmROLk 5LhWqVmEbEcfu8u3+XD14YrvjeEsWRrlyj3QDN/To6u96VVJmkdO40AJAVU4ZQqfInWDhcpRSABi ZQ4MQYusPJ9KRSDhtgEclROBjQhGK8+hfMgdeMICSpGaRf6iU8kuiUzwnXdQ/BJleJ38/pnQ0yUJ g8JDbOxKbnlgtZDQ7Ql/GGzUxZnR7ngBxEHdCMP1rKOD/rVQhlY18aL5BMuczmncTmJnkF4AO9/3 PN9z3e3tW3uciodzFm58LcUCwWgS4drC39Vu3XsqbMu7/Zn8DYna+irHnqnQAAAAAElFTkSuQmCC User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/23.0.0 (gnu/linux) Cancel-Lock: sha1:fdr9lLAaedBjLvLAh0nXDLOXf+w= X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:38384 Archived-At: 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