From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.emacs.help Subject: dynamic completion-ignored-extensions Date: Fri, 18 Jul 2008 10:51:57 +1000 Organization: Bah Humbug Message-ID: <873am8m2tu.fsf@blah.blah> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1216354442 22231 80.91.229.12 (18 Jul 2008 04:14:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 18 Jul 2008 04:14:02 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jul 18 06:14:50 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KJhMm-0001zf-AR for geh-help-gnu-emacs@m.gmane.org; Fri, 18 Jul 2008 06:14:48 +0200 Original-Received: from localhost ([127.0.0.1]:51362 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KJhLt-0007aN-C0 for geh-help-gnu-emacs@m.gmane.org; Fri, 18 Jul 2008 00:13:53 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KJeDY-0004h8-0F for help-gnu-emacs@gnu.org; Thu, 17 Jul 2008 20:53:04 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KJeDW-0004gD-Iu for help-gnu-emacs@gnu.org; Thu, 17 Jul 2008 20:53:03 -0400 Original-Received: from [199.232.76.173] (port=50761 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KJeDW-0004gA-Gd for help-gnu-emacs@gnu.org; Thu, 17 Jul 2008 20:53:02 -0400 Original-Received: from mailout2-6.pacific.net.au ([61.8.2.229]:50712 helo=mailout2.pacific.net.au) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KJeDV-0003SX-O9 for help-gnu-emacs@gnu.org; Thu, 17 Jul 2008 20:53:02 -0400 Original-Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout2.pacific.net.au (Postfix) with ESMTP id 083B0CD9D1 for ; Fri, 18 Jul 2008 10:52:06 +1000 (EST) Original-Received: from blah.blah (ppp208F.dyn.pacific.net.au [61.8.32.143]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id 954918C1E for ; Fri, 18 Jul 2008 10:52:05 +1000 (EST) Original-Received: from gg by blah.blah with local (Exim 4.69) (envelope-from ) id 1KJeCT-0001Rf-Ht for help-gnu-emacs@gnu.org; Fri, 18 Jul 2008 10:51:57 +1000 User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.2 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-Mailman-Approved-At: Fri, 18 Jul 2008 00:12:39 -0400 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:55694 Archived-At: Is there a way to have a kind of dynamic completion-ignored-extensions so that for instance a .c file is ignored if there's a .xs of the same name? Or even a kind of programmatic ignore so Makefile is not offered if it seems to be in a build directory of some flavour (and therefore a generated file). I tried sticking a defadvice on file-name-completion, but in emacs22 it doesn't seem to be reached. I guess read-file-name is C code and bypasses advice, or something. Is there another filename reader that could be could be easily pressed into service and customized?