From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#5524: 23.1.92; `initials' completion style doesn't work as documented Date: Thu, 04 Feb 2010 23:22:26 -0500 Message-ID: References: <87wrysogwr.fsf@thinkpad.tsdh.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1265365948 17072 80.91.229.12 (5 Feb 2010 10:32:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 5 Feb 2010 10:32:28 +0000 (UTC) To: Tassilo Horn Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Feb 05 11:32:21 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1NdLTr-00034y-OI for geb-bug-gnu-emacs@m.gmane.org; Fri, 05 Feb 2010 11:32:07 +0100 Original-Received: from localhost ([127.0.0.1]:38929 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NdFnF-0000CX-2D for geb-bug-gnu-emacs@m.gmane.org; Thu, 04 Feb 2010 23:27:45 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NdFnA-0000C5-Nz for bug-gnu-emacs@gnu.org; Thu, 04 Feb 2010 23:27:40 -0500 Original-Received: from [199.232.76.173] (port=47106 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NdFn9-0000Bx-Dp for bug-gnu-emacs@gnu.org; Thu, 04 Feb 2010 23:27:39 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NdFn7-0003J3-Tm for bug-gnu-emacs@gnu.org; Thu, 04 Feb 2010 23:27:39 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38527) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NdFn7-0003Iv-K4 for bug-gnu-emacs@gnu.org; Thu, 04 Feb 2010 23:27:37 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1NdFkb-0004qk-SH for bug-gnu-emacs@gnu.org; Thu, 04 Feb 2010 23:25:01 -0500 Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 Feb 2010 04:25:01 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org Mail-Followup-To: 5524@debbugs.gnu.org, Stefan Monnier X-Emacs-PR-Message: cc-closed 5524 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 5524-done@debbugs.gnu.org id=D5524.126534388618632 (code D ref 5524); Fri, 05 Feb 2010 04:25:01 +0000 Original-Received: (at 5524-done) by debbugs.gnu.org; 5 Feb 2010 04:24:46 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NdFkA-0004qO-Ki for submit@debbugs.gnu.org; Thu, 04 Feb 2010 23:24:46 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NdFiA-0004p3-96 for 5524-done@debbugs.gnu.org; Thu, 04 Feb 2010 23:22:30 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuoEAD4ra0tFpaN9/2dsb2JhbACBM9ZahEwEimY X-IronPort-AV: E=Sophos;i="4.49,409,1262581200"; d="scan'208";a="55367618" Original-Received: from 69-165-163-125.dsl.teksavvy.com (HELO ceviche.home) ([69.165.163.125]) by ironport2-out.pppoe.ca with ESMTP; 04 Feb 2010 23:22:26 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id 6472EB4270; Thu, 4 Feb 2010 23:22:26 -0500 (EST) In-Reply-To: <87wrysogwr.fsf@thinkpad.tsdh.de> (Tassilo Horn's message of "Thu, 04 Feb 2010 22:00:20 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) X-Mailman-Approved-At: Thu, 04 Feb 2010 23:24:33 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 04 Feb 2010 23:25:01 -0500 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:34905 Archived-At: > Completion of acronyms and initialisms. > E.g. can complete M-x lch to list-command-history > and C-x C-f ~/sew to ~/src/emacs/work. > While the M-x example works, the find-file example doesn't (with emacs > -Q). For example, I have ~/repos/org/uni.org, but > C-x C-f ~/rou TAB > says [no match]. Same for Thanks for using this feature ;-) Indeed, it broke recently, but the patch below should make it work again, Stefan === modified file 'lisp/minibuffer.el' --- lisp/minibuffer.el 2010-01-13 08:35:10 +0000 +++ lisp/minibuffer.el 2010-02-05 04:17:38 +0000 @@ -2063,9 +2063,12 @@ ;; Complete /ums to /usr/monnier/src or lch to list-command-history. (defun completion-initials-expand (str table pred) - (unless (or (zerop (length str)) - (string-match completion-pcm--delim-wild-regex str)) (let ((bounds (completion-boundaries str table pred ""))) + (unless (or (zerop (length str)) + ;; Only check within the boundaries, since the + ;; boundary char (e.g. /) might be in delim-regexp. + (string-match completion-pcm--delim-wild-regex str + (car bounds))) (if (zerop (car bounds)) (mapconcat 'string str "-") ;; If there's a boundary, it's trickier. The main use-case