From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: [bojohan+mail@dd.chalmers.se: Partial completion] Date: Sun, 25 Feb 2007 10:31:48 +0100 Message-ID: <45E15784.8050603@gmx.at> References: <17888.10288.446902.230637@kahikatea.snap.net.nz> <45E0979B.2020006@gmx.at> <17889.3956.99614.392821@kahikatea.snap.net.nz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1172396030 14821 80.91.229.12 (25 Feb 2007 09:33:50 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 25 Feb 2007 09:33:50 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org To: Nick Roberts Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 25 10:33:43 2007 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.50) id 1HLFlE-0001EK-VM for ged-emacs-devel@m.gmane.org; Sun, 25 Feb 2007 10:33:41 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HLFlE-0002iK-Ml for ged-emacs-devel@m.gmane.org; Sun, 25 Feb 2007 04:33:40 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HLFkz-0002h5-1Y for emacs-devel@gnu.org; Sun, 25 Feb 2007 04:33:25 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HLFkx-0002ej-46 for emacs-devel@gnu.org; Sun, 25 Feb 2007 04:33:24 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HLFkw-0002eS-R0 for emacs-devel@gnu.org; Sun, 25 Feb 2007 04:33:22 -0500 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.52) id 1HLFkw-0002yJ-AK for emacs-devel@gnu.org; Sun, 25 Feb 2007 04:33:22 -0500 Original-Received: (qmail invoked by alias); 25 Feb 2007 09:33:21 -0000 X-Provags-ID: V01U2FsdGVkX1+9IPor9IW99IpAwq+895ak/xqzPR0R9NEkq9GuBz l+kw== User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en In-Reply-To: <17889.3956.99614.392821@kahikatea.snap.net.nz> X-Y-GMX-Trusted: 0 X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) 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:66786 Archived-At: > I don't use partial completion (complete.el) so the OP will have to test it. > However the above function is not equivalent to the old try-completion e.g > > old (try-completion "" '((""))) returns t > > (try-completion-old "" '((""))) returns "" Right. But complete.el has the following stretch of code: ... (if (and (not (eq mode 'help)) (setq prefix (try-completion (PC-chunk-after basestr skip) poss))) (let ((first t) i) ;; Retain capitalization of user input even if ;; completion-ignore-case is set. (if (eq mode 'word) (setq prefix (PC-chop-word prefix basestr))) ... where `PC-chop-word' is defined as (defun PC-chop-word (new old) (let ((i -1) (j -1)) (while (and (setq i (string-match PC-delim-regex old (1+ i))) (setq j (string-match PC-delim-regex new (1+ j))))) (if (and j (or (not PC-word-failed-flag) (setq j (string-match PC-delim-regex new (1+ j))))) (substring new 0 (1+ j)) new))) which, in my opinion, could choke on t with the old `try-completion' as well. I don't use partial completion either and hardly anyone else does (at least for completing Lisp symbols). Otherwise, the other bug where entire buffer contents could get erased would have been noticed earlier. In any case, people using PC mode for filename completion would have to test whether the `dirlength' change breaks anything for them. If it does, I'd opt for removing `PC-lisp-complete-symbol' altogether.