From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: Ignore patterns for find-file tab completion? Date: Sun, 29 Oct 2006 10:38:27 -0800 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" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1162147136 24391 80.91.229.2 (29 Oct 2006 18:38:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 29 Oct 2006 18:38:56 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Oct 29 19:38:52 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 1GeFYa-0005Ox-8i for geh-help-gnu-emacs@m.gmane.org; Sun, 29 Oct 2006 19:38:52 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GeFYZ-0001Xx-RK for geh-help-gnu-emacs@m.gmane.org; Sun, 29 Oct 2006 13:38:51 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GeFYL-0001Xs-3G for help-gnu-emacs@gnu.org; Sun, 29 Oct 2006 13:38:37 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GeFYJ-0001XC-Ia for help-gnu-emacs@gnu.org; Sun, 29 Oct 2006 13:38:36 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GeFYJ-0001X3-AC for help-gnu-emacs@gnu.org; Sun, 29 Oct 2006 13:38:35 -0500 Original-Received: from [141.146.126.228] (helo=agminet01.oracle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GeFYJ-0000ht-7s for help-gnu-emacs@gnu.org; Sun, 29 Oct 2006 13:38:35 -0500 Original-Received: from rgmsgw02.us.oracle.com (rgmsgw02.us.oracle.com [138.1.186.52]) by agminet01.oracle.com (Switch-3.2.4/Switch-3.1.7) with ESMTP id k9TIcWtc023272; Sun, 29 Oct 2006 12:38:32 -0600 Original-Received: from dradamslap (dhcp-amer-whq-csvpn-gw3-141-144-80-244.vpn.oracle.com [141.144.80.244]) by rgmsgw02.us.oracle.com (Switch-3.2.4/Switch-3.2.4) with SMTP id k9TIcVM4017195; Sun, 29 Oct 2006 11:38:31 -0700 Original-To: "Andy Gimblett" , X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: <20061029175833.GA8389@cspcag2.swan.ac.uk> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Importance: Normal X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE 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:38386 Archived-At: .hi files are not something I would ever, ever, want to load into emacs. Thus, I'd like to ignore them when trying to open a file. Surely this is a common thing to want to do? Is this a solved problem? Yes, it is a common thing to do. You can customize option `completion-ignored-extensions' so that files with a given extension (e.g. hi) are ignored for completion. That should do exactly what you want. FYI - If you use Icicles (http://www.emacswiki.org/cgi-bin/wiki/Icicles), you can, in addition, exclude completion candidates in a few additional ways. 1. You can use `C-~' on the fly to complement the current set of completion candidates (file names, buffer names, etc.). For example, type `C-x b foo' and then `C-~' to match all buffers that do not start with `foo' (or do not contain `foo', if you complete with `S-TAB'). 2. You can exclude any number of different patterns by combining `C-~' with `M-*', which lets you match against additional patterns. For example, to exclude all completion candidates that match `toto', `titi', or `foobar', you would type this: `toto C-~ M-* titi C-~ M-* foobar' This is useful for apropos completion (`S-TAB'), where your input is matched against any part of a candidate name (actually, your input is taken as a regexp). 3. If you often want to exclude certain buffers as candidates, you can create and save a buffer configuration that uses variable `icicle-no-match-regexp' to exclude those buffers whenever that configuration is used. See commands `icicle-add-buffer-config' and `icicle-buffer-config'.