From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: file-name-shadow-mode Date: Mon, 21 Mar 2005 11:48:05 -0500 Message-ID: References: <200503180435.j2I4Z2R18621@raven.dms.auburn.edu> <87is3p5zp2.fsf-monnier+emacs@gnu.org> <200503191521.j2JFL8901509@raven.dms.auburn.edu> <87r7ibziw6.fsf-monnier+emacs@gnu.org> <200503200230.j2K2UvS03067@raven.dms.auburn.edu> <87is3lw2yk.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1111424957 31302 80.91.229.2 (21 Mar 2005 17:09:17 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 21 Mar 2005 17:09:17 +0000 (UTC) Cc: miles@gnu.org, snogglethorpe@gmail.com, teirllm@dms.auburn.edu, rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 21 18:09:16 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DDQIn-0006Li-7z for ged-emacs-devel@m.gmane.org; Mon, 21 Mar 2005 18:02:53 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DDQZv-0007d6-9M for ged-emacs-devel@m.gmane.org; Mon, 21 Mar 2005 12:20:35 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DDQWj-0005LE-WB for emacs-devel@gnu.org; Mon, 21 Mar 2005 12:17:18 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DDQWR-00057M-IC for emacs-devel@gnu.org; Mon, 21 Mar 2005 12:17:01 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DDQWP-0004tP-Vb for emacs-devel@gnu.org; Mon, 21 Mar 2005 12:16:58 -0500 Original-Received: from [132.204.24.67] (helo=mercure.iro.umontreal.ca) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DDQ4Y-0000rR-L2; Mon, 21 Mar 2005 11:48:10 -0500 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id 27E4C34000D; Mon, 21 Mar 2005 11:48:10 -0500 (EST) Original-Received: from asado.iro.umontreal.ca (asado.iro.umontreal.ca [132.204.24.84]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id 1FBB34AC257; Mon, 21 Mar 2005 11:48:06 -0500 (EST) Original-Received: by asado.iro.umontreal.ca (Postfix, from userid 20848) id 071FDE6A41; Mon, 21 Mar 2005 11:48:05 -0500 (EST) Original-To: David Kastrup In-Reply-To: (David Kastrup's message of "Mon, 21 Mar 2005 15:05:38 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-4.822, requis 5, autolearn=not spam, AWL 0.08, BAYES_00 -4.90) 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 X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: news.gmane.org gmane.emacs.devel:34899 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:34899 > Cute. It makes the assumption, however, that there is a unique point > where that equivalence occurs. Not quite, it makes the assumption that if (substitute-in-file-name (buffer-substring N END)) == (substitute-in-file-name (buffer-substring START END)) and (< START N) then (substitute-in-file-name (buffer-substring (1- N) END)) == (substitute-in-file-name (buffer-substring START END)) This assumption is inded not always verified. But the only counter-example I can think of is with the "/:" oddity that I mentioned in another message (a similar one occurs with http://). I was thinking of adding a check to eliminate those very special cases. In any case, the good side of my patch is that even if doesn't do quite what you want, it guarantees that `substitute-in-file-name' returns the same thing when passed the whole minibuffer's content or just the non-shadowed part. I.e. it never gives a *wrong* result. > I don't think that this is correct: whenever you split in the middle of an > environment variable name, you'll get a nonmatch that can turn into > a match if you happen to look further. Hmmm.... could you explain what concrete case you have in mind? Stefan