From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?=C3=93scar_Fuentes?= Newsgroups: gmane.emacs.devel Subject: Re: Patch to ido.el Date: Fri, 05 Apr 2013 12:30:09 +0200 Message-ID: <871uapqngu.fsf@wanadoo.es> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1365278402 26684 80.91.229.3 (6 Apr 2013 20:00:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 6 Apr 2013 20:00:02 +0000 (UTC) Cc: Steven Degutis To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Apr 06 22:00:01 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 1UOZHD-0007UX-Jb for ged-emacs-devel@m.gmane.org; Sat, 06 Apr 2013 21:59:51 +0200 Original-Received: from localhost ([::1]:34798 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UOYTU-0006D8-PW for ged-emacs-devel@m.gmane.org; Sat, 06 Apr 2013 15:08:28 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:37933) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UOYTN-0006CM-Fe for emacs-devel@gnu.org; Sat, 06 Apr 2013 15:08:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UOYTG-0003GU-Js for emacs-devel@gnu.org; Sat, 06 Apr 2013 15:08:21 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:51383) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UOYTG-0003GL-Bx for emacs-devel@gnu.org; Sat, 06 Apr 2013 15:08:14 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UOYRj-0005gM-On for emacs-devel@gnu.org; Sat, 06 Apr 2013 21:06:39 +0200 Original-Received: from 255.red-83-32-114.dynamicip.rima-tde.net ([83.32.114.255]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 06 Apr 2013 21:06:39 +0200 Original-Received: from ofv by 255.red-83-32-114.dynamicip.rima-tde.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 06 Apr 2013 21:06:39 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 90 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 255.red-83-32-114.dynamicip.rima-tde.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:dXi1JhQ4qJA/VOE5Rebd6bgexzw= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:158681 Archived-At: Hello Steven. Some comments below Steven Degutis writes: > 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 There is something wrong with that link. Tried it with Opera and Firefox and, after entering the URL, both show the page's table of contents, with the index line for toc20 highlighted as "visited", but you need to click on the entry itself for jumping to the linked section. It must be something with emacswiki. Apart from that, the code contained on that section has a bug: (defun ido-define-keys () ;; C-n/p is more intuitive in vertical layout (define-key ido-completion-map (kbd "C-n") 'ido-next-match) (define-key ido-completion-map (kbd "C-p") 'ido-prev-match)) (add-hook 'ido-setup-hook 'jf-ido-define-keys) `jf-ido-define-keys' is not defined anywhere. I guess that it is supposed to be `ido-define-keys'. > 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? When submitting patches inline, please watch for line-wrapping. When in doubt, attach the patch. Also you should mention the base revision or version of the code you used for creating your patch. In this case it seems to be against some stable release instead of Emacs' development sources. Usually the right place for submitting patches is the bug mailing list. Just do M-x report-emacs-bug. This way it will not disappear in the developer's mailing list chatter. Finally, for significant modifications the FSF requires to sign a document about copyright. I think that your modification is small enough to not requiring that paperwork. You might be interested on reading $EMACS/etc/CONTRIBUTE, where all this is more is explained in detail.