From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Gimblett Newsgroups: gmane.emacs.help Subject: Ignore patterns for find-file tab completion? Date: Sun, 29 Oct 2006 17:58:33 +0000 Message-ID: <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 1162144798 17470 80.91.229.2 (29 Oct 2006 17:59:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 29 Oct 2006 17:59:58 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Oct 29 18:59:56 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 1GeEwu-0004lW-IV for geh-help-gnu-emacs@m.gmane.org; Sun, 29 Oct 2006 18:59:56 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GeEwt-0004Rb-V5 for geh-help-gnu-emacs@m.gmane.org; Sun, 29 Oct 2006 12:59:56 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GeEvk-0003Wf-2J for help-gnu-emacs@gnu.org; Sun, 29 Oct 2006 12:58:44 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GeEvh-0003TF-NL for help-gnu-emacs@gnu.org; Sun, 29 Oct 2006 12:58:43 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GeEvh-0003Sn-DD for help-gnu-emacs@gnu.org; Sun, 29 Oct 2006 12:58:41 -0500 Original-Received: from [137.44.1.33] (helo=mhs.swan.ac.uk) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GeEvh-0001sM-8u for help-gnu-emacs@gnu.org; Sun, 29 Oct 2006 12:58:41 -0500 Original-Received: from [137.44.2.59] (helo=cs-svr1.swan.ac.uk) by mhs.swan.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1GeEva-0006dW-8l for help-gnu-emacs@gnu.org; Sun, 29 Oct 2006 17:58:34 +0000 Original-Received: from cspcag2.swan.ac.uk (cspcag2 [137.44.2.21]) by cs-svr1.swan.ac.uk (Postfix) with ESMTP id 3863629897 for ; Sun, 29 Oct 2006 17:58:34 +0000 (GMT) Original-Received: from cspcag2.swan.ac.uk (gimbo@localhost.swan.ac.uk [127.0.0.1]) by cspcag2.swan.ac.uk (8.13.3/8.13.3) with ESMTP id k9THwXmh021250 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 29 Oct 2006 17:58:33 GMT Original-Received: (from gimbo@localhost) by cspcag2.swan.ac.uk (8.13.3/8.13.3/Submit) id k9THwXnE029354 for help-gnu-emacs@gnu.org; Sun, 29 Oct 2006 17:58:33 GMT Original-To: help-gnu-emacs@gnu.org Content-Disposition: inline User-Agent: Mutt/1.4.2i 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:38383 Archived-At: 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/