From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: completion-ignored-extensions: match full file names Date: Thu, 13 Jan 2011 20:51:06 -0500 Message-ID: References: <7E365780-0E85-4169-98B2-EB53D703A2BA@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1294969882 11830 80.91.229.12 (14 Jan 2011 01:51:22 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 14 Jan 2011 01:51:22 +0000 (UTC) Cc: emacs-devel@gnu.org To: David Reitter Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 14 02:51:18 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PdYov-0004gs-Ji for ged-emacs-devel@m.gmane.org; Fri, 14 Jan 2011 02:51:17 +0100 Original-Received: from localhost ([127.0.0.1]:46185 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PdYou-00088d-Tw for ged-emacs-devel@m.gmane.org; Thu, 13 Jan 2011 20:51:16 -0500 Original-Received: from [140.186.70.92] (port=53100 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PdYoq-00088O-3k for emacs-devel@gnu.org; Thu, 13 Jan 2011 20:51:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PdYoo-0003lf-Ny for emacs-devel@gnu.org; Thu, 13 Jan 2011 20:51:11 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]:48613) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PdYoo-0003lb-K1 for emacs-devel@gnu.org; Thu, 13 Jan 2011 20:51:10 -0500 Original-Received: from eliz by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1PdYok-0002X5-Pp; Thu, 13 Jan 2011 20:51:06 -0500 In-reply-to: <7E365780-0E85-4169-98B2-EB53D703A2BA@gmail.com> (message from David Reitter on Thu, 13 Jan 2011 19:54:49 -0500) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:134513 Archived-At: > From: David Reitter > Date: Thu, 13 Jan 2011 19:54:49 -0500 > > I gave several git repositories a ".git" ending in order to comply with the requirements of a program that comes with git (GitX). One repository in the same directory does not have the ".git" extension. > > Completion always choose the one directory without the extension, because `completion-ignored-extensions' contains ".git/". So, matching ".git/" is a bit too general - I'd rather match something like "^\.git" in order to just exclude the internal ".git" directories. Is that possible, and if not, would be it easy to realize? Each element of completion-ignored-extensions is matched at the _end_ of the file/directory name of the completion candidates. So I think currently what you want is not possible. Using regexp syntax is not a good idea, IMO, since that would require to rewrite all the customizations users out there have, to escape the dot. But I think we could make a change whereby if an element of completion-ignored-extensions begins with a slash, that means match at the beginning. Then we could have "/.git/" as an element, and that would ignore only the standard ".git" subdirectories, not any directory that happens to end in ".git". WDYT?