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:58:17 -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 1111424765 30577 80.91.229.2 (21 Mar 2005 17:06:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 21 Mar 2005 17:06:05 +0000 (UTC) Cc: emacs-devel@gnu.org, teirllm@dms.auburn.edu, rms@gnu.org, miles@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 21 18:06:04 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DDQFy-0005qn-2J for ged-emacs-devel@m.gmane.org; Mon, 21 Mar 2005 17:59:59 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DDQX6-0005Q6-3Z for ged-emacs-devel@m.gmane.org; Mon, 21 Mar 2005 12:17:40 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DDQWG-00051s-MH for emacs-devel@gnu.org; Mon, 21 Mar 2005 12:16:53 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DDQW6-0004vG-SB for emacs-devel@gnu.org; Mon, 21 Mar 2005 12:16:40 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DDQW6-0004tP-KC for emacs-devel@gnu.org; Mon, 21 Mar 2005 12:16:38 -0500 Original-Received: from [132.204.24.67] (helo=mercure.iro.umontreal.ca) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DDQEU-0001V4-Iq; Mon, 21 Mar 2005 11:58:27 -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 E30DC34000D; Mon, 21 Mar 2005 11:58:21 -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 DFF364AC256; Mon, 21 Mar 2005 11:58:17 -0500 (EST) Original-Received: by asado.iro.umontreal.ca (Postfix, from userid 20848) id D14DBE6A41; Mon, 21 Mar 2005 11:58:17 -0500 (EST) Original-To: snogglethorpe@gmail.com In-Reply-To: (Miles Bader's message of "Mon, 21 Mar 2005 23:26:20 +0900") 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:34898 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:34898 >> How 'bout the patch below which makes no assumption (that I know of) about >> substitute-in-file-name, and will thus correctly even with weird >> magic file name handlers. > Um, I should note that the original code was designed to be fast and > not cons unnecessarily, because it runs on every keystroke -- that's > the reason it uses just a regexp match and a move-overlay. Your > suggested replacement looks ... less careful. I'm fully aware of it, of course. Given the binary search, it should around the loop about 5-7 times, and substitute-in-file-name shouldn't do that much consing itself, so I figured it was worth trying. Also we could easily optimize the common case (where the overlay is not moved) using a total of 3 calls to substitute-in-file-name in the common case. But given the fact that icomplete.el has been usable for a long time already, I suspect that the performance issue is only in our heads, Stefan