From unknown Mon Jun 23 23:49:32 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#14143 <14143@debbugs.gnu.org> To: bug#14143 <14143@debbugs.gnu.org> Subject: Status: [gmane.emacs.devel] Patch to ido.el Reply-To: bug#14143 <14143@debbugs.gnu.org> Date: Tue, 24 Jun 2025 06:49:32 +0000 retitle 14143 [gmane.emacs.devel] Patch to ido.el reassign 14143 emacs submitter 14143 Leo Liu severity 14143 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 05 03:45:58 2013 Received: (at submit) by debbugs.gnu.org; 5 Apr 2013 07:45:58 +0000 Received: from localhost ([127.0.0.1]:34673 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UO1LR-0002fz-J2 for submit@debbugs.gnu.org; Fri, 05 Apr 2013 03:45:58 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38862) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UO1LM-0002fn-DI for submit@debbugs.gnu.org; Fri, 05 Apr 2013 03:45:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UO1ID-0005gk-67 for submit@debbugs.gnu.org; Fri, 05 Apr 2013 03:42:38 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-100.5 required=5.0 tests=BAYES_05,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,T_DKIM_INVALID,USER_IN_WHITELIST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:40241) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UO1ID-0005ge-2K for submit@debbugs.gnu.org; Fri, 05 Apr 2013 03:42:37 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50213) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UO1IB-0006ZL-DG for bug-gnu-emacs@gnu.org; Fri, 05 Apr 2013 03:42:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UO1I9-0005ff-Ug for bug-gnu-emacs@gnu.org; Fri, 05 Apr 2013 03:42:35 -0400 Received: from mail-pd0-f174.google.com ([209.85.192.174]:35549) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UO1I9-0005fR-Kq for bug-gnu-emacs@gnu.org; Fri, 05 Apr 2013 03:42:33 -0400 Received: by mail-pd0-f174.google.com with SMTP id p12so1870526pdj.5 for ; Fri, 05 Apr 2013 00:42:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:face:date:message-id:user-agent :mime-version:content-type; bh=SkRYZ/QOKiJKFK8nJK0GBMF65liCWJUmeCrSj3VbvZ8=; b=okmyjcRcBRGxxs64jzlwJ9huE+/aGWtZOX7Bi8CIztup8FlAFwqc++Csfb6nnfxZr9 0+H8cgcWIekd3/moQtwQiqAv+5gUXr6kEewiKETlrNSeka414gruytdRV+eiFMOQlckc fscvUtM1f/bnJddGJCeOkKz9sbWTnIu39w3LFl3msp5tYGMgXdiyTPfHvdY3yuRoYkTe lxr6NMbdWkioarZwoLXQX/+jQHofyevPyzufcJJQy8IgslsUU5GBFh/Uwto21MOlGJJJ ZZlBA+8tJkn5OT1xKhUQU+fhik1/SHRMfv0sYt+ti0f/NnQ7tWzNlQ7d/CAbBsB6B2zT vqZA== X-Received: by 10.68.138.193 with SMTP id qs1mr13256176pbb.9.1365147752876; Fri, 05 Apr 2013 00:42:32 -0700 (PDT) Received: from localhost ([61.148.244.73]) by mx.google.com with ESMTPS id 1sm13429615pbg.18.2013.04.05.00.42.29 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 05 Apr 2013 00:42:32 -0700 (PDT) From: Leo Liu To: bug-gnu-emacs@gnu.org Subject: [gmane.emacs.devel] Patch to ido.el Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoAgMAAADxkFD+AAAADFBMVEUvT09qWs3/pQD///+J kUVcAAAAAWJLR0QAiAUdSAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9cBBwMLOd3veKQA AACuSURBVBjTldE9CgIxEAXgB+lEyFUC2wo5ikdZ8DSypxhMY7H9VuIVwlqkGRgnm59VsHGafIQ3 CZlAtmKIRaHETgYa12lqvEsPYKf8wXHsPGfqPaUM0g9aJPKFXkmNQmSDqwzz4Fpgpz+6WAPY2z5o uPJJpu0uypcl4nyCibMLQ8lCiVjayLoQvw5LsVKQuHPRR958HZbOcVsKeepcLxpByjycGvnKmY+c MBvrtyjfe0vmuLvdq/kAAAAASUVORK5CYII= Date: Fri, 05 Apr 2013 15:42:28 +0800 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (OS X 10.8.3) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: submit Cc: Steven Degutis X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) --=-=-= Content-Type: text/plain M-x report-emacs-bug will send your email to the issue tracker. Thanks for the patch I'll take a look in 2 days. --=-=-= Content-Type: message/rfc822 Content-Disposition: inline Path: news.gmane.org!not-for-mail From: Steven Degutis Newsgroups: gmane.emacs.devel Subject: Patch to ido.el Date: Fri, 5 Apr 2013 01:31:57 -0500 Lines: 116 Approved: news@gmane.org Message-ID: NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1365143535 20209 80.91.229.3 (5 Apr 2013 06:32:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 5 Apr 2013 06:32:15 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 05 08:32:43 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UO0CX-0003R6-TT for ged-emacs-devel@m.gmane.org; Fri, 05 Apr 2013 08:32:42 +0200 Original-Received: from localhost ([::1]:48281 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UO0C8-00060c-Qo for ged-emacs-devel@m.gmane.org; Fri, 05 Apr 2013 02:32:16 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58037) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UO0Bx-0005zz-RN for emacs-devel@gnu.org; Fri, 05 Apr 2013 02:32:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UO0Br-0005Fw-0V for emacs-devel@gnu.org; Fri, 05 Apr 2013 02:32:05 -0400 Original-Received: from mail-da0-x231.google.com ([2607:f8b0:400e:c00::231]:34259) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UO0Bq-0005Fp-Me for emacs-devel@gnu.org; Fri, 05 Apr 2013 02:31:58 -0400 Original-Received: by mail-da0-f49.google.com with SMTP id t11so1449120daj.22 for ; Thu, 04 Apr 2013 23:31:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=Whxv24XxbEr79eM8ggEEj10Sn/rPWN9IXwSgNkY8cOk=; b=EAdv8fQkRnSgxQKALgL5Pd50TRh9hkACM4fLTPvIVhyWVCg5bABYHsgjf2aiYWXlEa hhpaE+6epyfei1Iby9qF/LUVFjFrXeNmK7VSWT9zBsaHYqWUVkJknaz5kd3JLpYWIqqU EuB/J3k5xqv5PTQBekiZ3tkd4xDYMGhwM0Eluc8pOZLOW445hvgO7W0nk9zLJEwevFw1 c7juoifjD2FIMA/ZDbUkNnSFv5JjVhr65T8erhwpsZlez0CCjV+SfxJhCHG35H77W226 MdTbIqag27rvGhrOE8dpZdDEWo/hoBEH/tqB75REyym9FuJzeO6S2l9P0jJ+kGjxqLtS D+RA== X-Received: by 10.66.228.105 with SMTP id sh9mr882389pac.65.1365143517633; Thu, 04 Apr 2013 23:31:57 -0700 (PDT) Original-Received: by 10.70.6.100 with HTTP; Thu, 4 Apr 2013 23:31:57 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c00::231 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:158672 Archived-At: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="====-=-=" --====-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Disclaimer: I have absolutely no idea how this process works. This patch makes ido.el slightly more configurable. In particular, when using ido-decorations that make ido-mode display vertically (per http://emacswiki.org/emacs/InteractivelyDoThings#toc20), a pair of decorations are being used in two different places with two different meanings, even though by happenstance they look the same. This patch splits them out into two different pairs of decorations (which currently have the same value), allowing the user to customize them with greater precision. diff --git ido.el ido2.el index cda4021..dfb5b0a 100644 --- ido.el +++ ido2.el @@ -763,7 +763,7 @@ Obsolete. Set 3rd element of `ido-decorations' instead." :type '(choice string (const nil)) :group 'ido) -(defcustom ido-decorations '( "{" "}" " | " " | ..." "[" "]" " [No match]" " [Matched]" " [Not readable]" " [Too big]" " [Confirm]") +(defcustom ido-decorations '( "{" "}" " | " " | ..." "[" "]" " [No match]" " [Matched]" " [Not readable]" " [Too big]" " [Confirm]" "[" "]") "List of strings used by ido to display the alternatives in the minibuffer. There are 11 elements in this list: 1st and 2nd elements are used as brackets around the prospect list, @@ -4570,9 +4570,9 @@ For details of keybindings, see `ido-find-file'." (ido-name (car comps)))) "" ;; when there is one match, show the matching file name in full - (concat (nth 4 ido-decorations) ;; [ ... ] + (concat (nth 11 ido-decorations) ;; [ ... ] (ido-name (car comps)) - (nth 5 ido-decorations))) + (nth 12 ido-decorations))) (if (not ido-use-faces) (nth 7 ido-decorations)))) ;; [Matched] (t ;multiple matches (let* ((items (if (> ido-max-prospects 0) (1+ ido-max-prospects) 999)) So, now that I've said everything that can probably be said on the topic, how do I go about submitting this patch for review to the official emacs repo? Does this email count? Or maybe someone in here knows how to do it in like 3 seconds flat and wouldn't mind? -Steven --====-=-= Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
Disclaimer: I have absolutely no idea how this process wor= ks.

This patch makes ido.el slightly more configur= able.

In particular, when using ido-de= corations that make ido-mode display vertically (per http://emacswiki.org/emacs/Int= eractivelyDoThings#toc20), a pair of decorations are being used in two = different places with two different meanings, even though by happenstance t= hey look the same. This patch splits them out into two different pairs of d= ecorations (which currently have the same value), allowing the user to cust= omize them with greater precision.


diff --git ido.el= ido2.el
index cda4021..dfb5b0a 100644
--- ido.el
=
+++ ido2.el
@@ -763,7 +763,7 @@ Obsolete. =A0Set 3rd element= of `ido-decorations' instead."
=A0 =A0:type '(choice string (const nil))
=A0 =A0:group = 'ido)
=A0
-(defcustom ido-decorations '( "= {" "}" " | " " | ..." "[" &quo= t;]" " [No match]" " [Matched]" " [Not readab= le]" " [Too big]" " [Confirm]")
+(defcustom ido-decorations '( "{" "}" " = | " " | ..." "[" "]" " [No match]&q= uot; " [Matched]" " [Not readable]" " [Too big]&qu= ot; " [Confirm]" "[" "]")
=A0 =A0"List of strings used by ido to display the alternatives i= n the minibuffer.
=A0There are 11 elements in this list:
=A01st and 2nd elements are used as brackets around the prospect list,
@@ -4570,9 +4570,9 @@ For details of keybindings, see `ido-find-file'.&= quot;
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 (ido-name (car comps))))
=A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 ""
=A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 ;; when there is one match, show the matching file nam= e in full
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (concat (nth 4 ido-decoratio= ns) =A0;; [ ... ]
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (conc= at (nth 11 ido-decorations) =A0;; [ ... ]
=A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (ido-name (car comps))
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (nth 5 ido-decora= tions)))
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 (nth 12 ido-decorations)))
=A0 =A0 (if (not ido-use-faces) (nth 7 ido-decorations)))= ) =A0;; [Matched]
=A0 =A0(t ;multiple matches
=A0= =A0 (let* ((items (if (= > ido-max-prospects 0) (1+ ido-max-prospects) 999))



S= o, now that I've said everything that can probably be said on the topic= , how do I go about submitting this patch for review to the official emacs = repo? Does this email count? Or maybe someone in here knows how to do it in= like 3 seconds flat and wouldn't mind?

-Steven
--====-=-=-- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 05 10:07:45 2013 Received: (at 14143-done) by debbugs.gnu.org; 5 Apr 2013 14:07:45 +0000 Received: from localhost ([127.0.0.1]:35600 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UO7Iu-0005Pu-S7 for submit@debbugs.gnu.org; Fri, 05 Apr 2013 10:07:45 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:54458) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UO7Is-0005Pl-CC for 14143-done@debbugs.gnu.org; Fri, 05 Apr 2013 10:07:43 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFFxLSu/2dsb2JhbABEvw4Xc4IfAQVWIxALDiYSFBgNJBMah2UDD8EtjBKEeAOkeoFegxM X-IPAS-Result: Av4EABK/CFFFxLSu/2dsb2JhbABEvw4Xc4IfAQVWIxALDiYSFBgNJBMah2UDD8EtjBKEeAOkeoFegxM X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="6559898" Received: from 69-196-180-174.dsl.teksavvy.com (HELO pastel.home) ([69.196.180.174]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 05 Apr 2013 10:04:22 -0400 Received: by pastel.home (Postfix, from userid 20848) id 8A7C367862; Fri, 5 Apr 2013 10:04:25 -0400 (EDT) From: Stefan Monnier To: Steven Degutis Subject: Re: bug#14143: [gmane.emacs.devel] Patch to ido.el Message-ID: References: Date: Fri, 05 Apr 2013 10:04:25 -0400 In-Reply-To: (Leo Liu's message of "Fri, 05 Apr 2013 15:42:28 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 14143-done Cc: 14143-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Thanks for your bug-report, Steven [ by now, it seems you've been told plenty of times how/where to send your patch, right? ]. I installed your patch with a few changes. The most important one is to make sure that people who have customized their ido-decorations still get the same behavior as before. See the final patch below. Stefan === modified file 'etc/NEWS' --- etc/NEWS 2013-03-30 13:49:00 +0000 +++ etc/NEWS 2013-04-05 13:54:30 +0000 @@ -87,6 +87,8 @@ * Changes in Specialized Modes and Packages in Emacs 24.4 +** `ido-decorations' has been slightly extended to give a bit more control. + ** More packages look for ~/.emacs.d/ additionally to ~/.. Affected files: ~/.emacs.d/timelog replaces ~/.timelog === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-04-05 10:18:43 +0000 +++ lisp/ChangeLog 2013-04-05 13:55:28 +0000 @@ -1,3 +1,9 @@ +2013-04-05 Stefan Monnier + + * ido.el (ido-completions): Use extra elements of ido-decorations + (bug#14143). + (ido-decorations): Update docstring. + 2013-04-05 Michael Albinus * autorevert.el (auto-revert-mode, auto-revert-tail-mode) === modified file 'lisp/ido.el' --- lisp/ido.el 2013-03-20 03:05:34 +0000 +++ lisp/ido.el 2013-04-05 13:49:23 +0000 @@ -765,7 +765,7 @@ (defcustom ido-decorations '( "{" "}" " | " " | ..." "[" "]" " [No match]" " [Matched]" " [Not readable]" " [Too big]" " [Confirm]") "List of strings used by ido to display the alternatives in the minibuffer. -There are 11 elements in this list: +There are between 11 and 13 elements in this list: 1st and 2nd elements are used as brackets around the prospect list, 3rd element is the separator between prospects (ignored if `ido-separator' is set), 4th element is the string inserted at the end of a truncated list of prospects, @@ -775,7 +775,9 @@ 8th element is displayed if there is a single match (and faces are not used), 9th element is displayed when the current directory is non-readable, 10th element is displayed when directory exceeds `ido-max-directory-size', -11th element is displayed to confirm creating new file or buffer." +11th element is displayed to confirm creating new file or buffer. +12th and 13th elements (if present) are used as brackets around the sole +remaining completion. If absent, elements 5 and 6 are used instead." :type '(repeat string) :group 'ido) @@ -4581,10 +4583,12 @@ (string-equal (match-string 0 (ido-name (car comps))) (ido-name (car comps)))) "" - ;; when there is one match, show the matching file name in full - (concat (nth 4 ido-decorations) ;; [ ... ] + ;; When there is only one match, show the matching file + ;; name in full wrapped in [ ... ]. + (concat + (or (nth 11 ido-decorations) (nth 4 ido-decorations)) (ido-name (car comps)) - (nth 5 ido-decorations))) + (or (nth 12 ido-decorations) (nth 5 ido-decorations)))) (if (not ido-use-faces) (nth 7 ido-decorations)))) ;; [Matched] (t ;multiple matches (let* ((items (if (> ido-max-prospects 0) (1+ ido-max-prospects) 999)) From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 05 13:22:07 2013 Received: (at 14143-done) by debbugs.gnu.org; 5 Apr 2013 17:22:07 +0000 Received: from localhost ([127.0.0.1]:35795 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UOAL0-0002rT-2l for submit@debbugs.gnu.org; Fri, 05 Apr 2013 13:22:07 -0400 Received: from mail-pb0-f51.google.com ([209.85.160.51]:54993) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UO8nY-0000IH-Ku for 14143-done@debbugs.gnu.org; Fri, 05 Apr 2013 11:43:31 -0400 Received: by mail-pb0-f51.google.com with SMTP id rr4so2063107pbb.38 for <14143-done@debbugs.gnu.org>; Fri, 05 Apr 2013 08:40:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=gomLo30cNqOltc2U1r0VWVf+nKlrQuzLcVeOzKIcUjI=; b=0DiQ/QKkfHN3QupMZ64og1xtj7SP2hOv3Lmk6+JzKr5ROFQMskPuAYxvn+Y+LI7LIq 1ZWi6G0MK7NNPFbLMLct7pSDwxqA6xhJJIRUWHJdMCuil/1DQAUFsXBcBZC5VFQYMMTK ue+ENjnoEb+bJzgkJKtbwnKCIP2PAnRK44Qmth5aip7+OXm+1iWtg7A3sqczflSKxWUX gTufbykCX3sap5bTxMibkwdx4AixZQLEJByr+/rHLbJ5Gqy5XspX1vP1q/H+qycuDf33 gec1BVsPaTDSPSx59Fp0azvVKE83/G0B6C757+Rg76HNZRY+6jjIXbtu8Sf4kU8xRsjm aU7A== MIME-Version: 1.0 X-Received: by 10.68.59.8 with SMTP id v8mr12185916pbq.218.1365176411746; Fri, 05 Apr 2013 08:40:11 -0700 (PDT) Received: by 10.70.6.100 with HTTP; Fri, 5 Apr 2013 08:40:11 -0700 (PDT) In-Reply-To: References: Date: Fri, 5 Apr 2013 10:40:11 -0500 Message-ID: Subject: Re: bug#14143: [gmane.emacs.devel] Patch to ido.el From: Steven Degutis To: Stefan Monnier Content-Type: multipart/alternative; boundary=bcaec544ece013fd2404d99ee7c3 X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 14143-done X-Mailman-Approved-At: Fri, 05 Apr 2013 13:22:05 -0400 Cc: 14143-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) --bcaec544ece013fd2404d99ee7c3 Content-Type: text/plain; charset=ISO-8859-1 Your patch is mostly perfect, except there's one more thing needed, namely that the inner-if on line 4563 has to be wrapped with an (and (not (ido-show-when-exact-single-match)) ...) and the defcustom created above it defaulting to nil. I didn't apply this to your patch because to be honest, I have no idea how to apply your patch to my copy of ido.el. So I submitted a bug report just now via M-x report-emacs-bug, and included as much information as I can. -Steven On Fri, Apr 5, 2013 at 9:04 AM, Stefan Monnier wrote: > Thanks for your bug-report, Steven [ by now, it seems you've been told > plenty of times how/where to send your patch, right? ]. > > I installed your patch with a few changes. The most important one is to > make sure that people who have customized their ido-decorations still > get the same behavior as before. See the final patch below. > > > Stefan > > > === modified file 'etc/NEWS' > --- etc/NEWS 2013-03-30 13:49:00 +0000 > +++ etc/NEWS 2013-04-05 13:54:30 +0000 > @@ -87,6 +87,8 @@ > > * Changes in Specialized Modes and Packages in Emacs 24.4 > > +** `ido-decorations' has been slightly extended to give a bit more > control. > + > ** More packages look for ~/.emacs.d/ additionally to ~/.. > Affected files: > ~/.emacs.d/timelog replaces ~/.timelog > > === modified file 'lisp/ChangeLog' > --- lisp/ChangeLog 2013-04-05 10:18:43 +0000 > +++ lisp/ChangeLog 2013-04-05 13:55:28 +0000 > @@ -1,3 +1,9 @@ > +2013-04-05 Stefan Monnier > + > + * ido.el (ido-completions): Use extra elements of ido-decorations > + (bug#14143). > + (ido-decorations): Update docstring. > + > 2013-04-05 Michael Albinus > > * autorevert.el (auto-revert-mode, auto-revert-tail-mode) > > === modified file 'lisp/ido.el' > --- lisp/ido.el 2013-03-20 03:05:34 +0000 > +++ lisp/ido.el 2013-04-05 13:49:23 +0000 > @@ -765,7 +765,7 @@ > > (defcustom ido-decorations '( "{" "}" " | " " | ..." "[" "]" " [No > match]" " [Matched]" " [Not readable]" " [Too big]" " [Confirm]") > "List of strings used by ido to display the alternatives in the > minibuffer. > -There are 11 elements in this list: > +There are between 11 and 13 elements in this list: > 1st and 2nd elements are used as brackets around the prospect list, > 3rd element is the separator between prospects (ignored if > `ido-separator' is set), > 4th element is the string inserted at the end of a truncated list of > prospects, > @@ -775,7 +775,9 @@ > 8th element is displayed if there is a single match (and faces are not > used), > 9th element is displayed when the current directory is non-readable, > 10th element is displayed when directory exceeds `ido-max-directory-size', > -11th element is displayed to confirm creating new file or buffer." > +11th element is displayed to confirm creating new file or buffer. > +12th and 13th elements (if present) are used as brackets around the sole > +remaining completion. If absent, elements 5 and 6 are used instead." > :type '(repeat string) > :group 'ido) > > @@ -4581,10 +4583,12 @@ > (string-equal (match-string 0 (ido-name (car > comps))) > (ido-name (car comps)))) > "" > - ;; when there is one match, show the matching file > name in full > - (concat (nth 4 ido-decorations) ;; [ ... ] > + ;; When there is only one match, show the matching > file > + ;; name in full wrapped in [ ... ]. > + (concat > + (or (nth 11 ido-decorations) (nth 4 > ido-decorations)) > (ido-name (car comps)) > - (nth 5 ido-decorations))) > + (or (nth 12 ido-decorations) (nth 5 > ido-decorations)))) > (if (not ido-use-faces) (nth 7 ido-decorations)))) ;; > [Matched] > (t ;multiple matches > (let* ((items (if (> ido-max-prospects 0) (1+ > ido-max-prospects) 999)) > > --bcaec544ece013fd2404d99ee7c3 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Your patch is mostly perfect, except there'= s one more thing needed, namely that the inner-if on line 4563 has to be wr= apped with an (and (not (ido-show-when-exact-single-match)) ...) and the de= fcustom created above it defaulting to nil. I didn't apply this to your= patch because to be honest, I have no idea how to apply your patch to my c= opy of ido.el.

So I submitted a bug report just now via M-= x report-emacs-bug, and included as much information as I can.
-Steven


On Fri, Apr 5, 2013 at 9:04 AM, Stefan Monni= er <monnier@iro.umontreal.ca> wrote:
Thanks for your bug-report, Steven [ by now, it seems you've been told<= br> plenty of times how/where to send your patch, right? =A0].

I installed your patch with a few changes. =A0The most important one is to<= br> make sure that people who have customized their ido-decorations still
get the same behavior as before. =A0See the final patch below.


=A0 =A0 =A0 =A0 Stefan


=3D=3D=3D modified file 'etc/NEWS'
--- etc/NEWS =A0 =A02013-03-30 13:49:00 +0000
+++ etc/NEWS =A0 =A02013-04-05 13:54:30 +0000
@@ -87,6 +87,8 @@

=A0* Changes in Specialized Modes and Packages in Emacs 24.4

+** `ido-decorations' has been slightly extended to give a bit more con= trol.
+
=A0** More packages look for ~/.emacs.d/<foo> additionally to ~/.<= foo>.
=A0Affected files:
=A0~/.emacs.d/timelog =A0 =A0 replaces =A0~/.timelog

=3D=3D=3D modified file 'lisp/ChangeLog'
--- lisp/ChangeLog =A0 =A0 =A02013-04-05 10:18:43 +0000
+++ lisp/ChangeLog =A0 =A0 =A02013-04-05 13:55:28 +0000
@@ -1,3 +1,9 @@
+2013-04-05 =A0Stefan Monnier =A0<monnier@iro.umontreal.ca>
+
+ =A0 =A0 =A0 * ido.el (ido-completions): Use extra elements of ido-decorat= ions
+ =A0 =A0 =A0 (bug#14143).
+ =A0 =A0 =A0 (ido-decorations): Update docstring.
+
=A02013-04-05 =A0Michael Albinus =A0<michael.albinus@gmx.de>

=A0 =A0 =A0 =A0 * autorevert.el (auto-revert-mode, auto-revert-tail-mode)
=3D=3D=3D modified file 'lisp/ido.el'
--- lisp/ido.el 2013-03-20 03:05:34 +0000
+++ lisp/ido.el 2013-04-05 13:49:23 +0000
@@ -765,7 +765,7 @@

=A0(defcustom ido-decorations '( "{" "}" " | &= quot; " | ..." "[" "]" " [No match]"= ; " [Matched]" " [Not readable]" " [Too big]"= " [Confirm]")
=A0 =A0"List of strings used by ido to display the alternatives in the= minibuffer.
-There are 11 elements in this list:
+There are between 11 and 13 elements in this list:
=A01st and 2nd elements are used as brackets around the prospect list,
=A03rd element is the separator between prospects (ignored if `ido-separato= r' is set),
=A04th element is the string inserted at the end of a truncated list of pro= spects,
@@ -775,7 +775,9 @@
=A08th element is displayed if there is a single match (and faces are not u= sed),
=A09th element is displayed when the current directory is non-readable,
=A010th element is displayed when directory exceeds `ido-max-directory-size= ',
-11th element is displayed to confirm creating new file or buffer." +11th element is displayed to confirm creating new file or buffer.
+12th and 13th elements (if present) are used as brackets around the sole +remaining completion. =A0If absent, elements 5 and 6 are used instead.&quo= t;
=A0 =A0:type '(repeat string)
=A0 =A0:group 'ido)

@@ -4581,10 +4583,12 @@
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (string-equal (match-st= ring 0 (ido-name (car comps)))
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 (ido-name (car comps))))
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ""
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ;; when there is one match, show = the matching file name in full
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (concat (nth 4 ido-decorations) = =A0;; [ ... ]
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ;; When there is only one match, = show the matching file
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ;; name in full wrapped in [ ... = ].
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (concat
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(or (nth 11 ido-decorations) (= nth 4 ido-decorations))
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (ido-name (car = comps))
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (nth 5 ido-decora= tions)))
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(or (nth 12 ido-decorations) (= nth 5 ido-decorations))))
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(if (not ido-use-faces) (nth 7 ido-d= ecorations)))) =A0;; [Matched]
=A0 =A0 =A0 =A0 =A0 (t =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0;multiple matches
=A0 =A0 =A0 =A0 =A0 =A0(let* ((items (if (> ido-max-prospects 0) (1+ ido= -max-prospects) 999))


--bcaec544ece013fd2404d99ee7c3-- From unknown Mon Jun 23 23:49:32 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 04 May 2013 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator