From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 21 13:37:17 2013 Received: (at submit) by debbugs.gnu.org; 21 Mar 2013 17:37:17 +0000 Received: from localhost ([127.0.0.1]:39256 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UIjQS-0001gI-Jo for submit@debbugs.gnu.org; Thu, 21 Mar 2013 13:37:17 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60000) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UIjQO-0001g0-Nk for submit@debbugs.gnu.org; Thu, 21 Mar 2013 13:37:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UIjOQ-0007Aq-1V for submit@debbugs.gnu.org; Thu, 21 Mar 2013 13:35:20 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-101.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, USER_IN_WHITELIST autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:54604) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIjOP-0006us-TT for submit@debbugs.gnu.org; Thu, 21 Mar 2013 13:35:09 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40291) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIjDx-0006BP-CK for bug-gnu-emacs@gnu.org; Thu, 21 Mar 2013 13:24:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UIjDv-0002rm-Tk for bug-gnu-emacs@gnu.org; Thu, 21 Mar 2013 13:24:21 -0400 Received: from mtaout21.012.net.il ([80.179.55.169]:42158) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIjDv-0002rV-LT for bug-gnu-emacs@gnu.org; Thu, 21 Mar 2013 13:24:19 -0400 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0MK000300TGNUM00@a-mtaout21.012.net.il> for bug-gnu-emacs@gnu.org; Thu, 21 Mar 2013 19:23:44 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MK000316TNJP660@a-mtaout21.012.net.il> for bug-gnu-emacs@gnu.org; Thu, 21 Mar 2013 19:23:44 +0200 (IST) Date: Thu, 21 Mar 2013 19:24:00 +0200 From: Eli Zaretskii Subject: Feature request: highlight partial matches in Info's index-search X-012-Sender: halo1@inter.net.il To: bug-gnu-emacs@gnu.org Message-id: <83boaczmxb.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -6.7 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii 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: -9.4 (---------) When 'i foo RET' yields a partial match, e.g., finding "foobar" in the index, the stand-alone Info reader "highlights" the part that matched, like this: Found FOObar in Some Node. (`,' tries to find next.) (The stand-alone reader is a text-mode program, so it changes the letter-case to emphasize the part that matched.) It would be nice if Emacs did something similar, although it is probably better to use colors if available. (We could also use bold or italic, but at least bold might cause annoying movement of the mode line, to allow for slightly larger font.) From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 21 18:36:22 2013 Received: (at 14015) by debbugs.gnu.org; 21 Mar 2013 22:36:23 +0000 Received: from localhost ([127.0.0.1]:39467 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UIo5t-0000X1-RK for submit@debbugs.gnu.org; Thu, 21 Mar 2013 18:36:22 -0400 Received: from ps18281.dreamhost.com ([69.163.218.105]:34330 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UIo5r-0000Wt-5a for 14015@debbugs.gnu.org; Thu, 21 Mar 2013 18:36:20 -0400 Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 3DC49258B92960; Thu, 21 Mar 2013 15:34:24 -0700 (PDT) From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#14015: Feature request: highlight partial matches in Info's index-search Organization: JURTA References: <83boaczmxb.fsf@gnu.org> Date: Fri, 22 Mar 2013 00:31:56 +0200 In-Reply-To: <83boaczmxb.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 21 Mar 2013 19:24:00 +0200") Message-ID: <87a9pwidur.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 14015 Cc: 14015@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 (-) > When 'i foo RET' yields a partial match, e.g., finding "foobar" in the > index, the stand-alone Info reader "highlights" the part that matched, > like this: > > Found FOObar in Some Node. (`,' tries to find next.) > > (The stand-alone reader is a text-mode program, so it changes the > letter-case to emphasize the part that matched.) > > It would be nice if Emacs did something similar, although it is > probably better to use colors if available. info-look.el uses the following face to highlight found matches in the Info reader: (defcustom info-lookup-highlight-face 'match "Face for highlighting looked up help items. Setting this variable to nil disables highlighting." :group 'info-lookup :type 'face) Adding a similar face option to highlight the text matched by `Info-index' will change the output of `Info-virtual-index' and `info-apropos' to look exactly the same like as output of `occur' that is good for consistency of the UI. This is in addition to highlighting the matches in the each area that you asked for: === modified file 'lisp/info.el' --- lisp/info.el 2013-03-20 23:04:40 +0000 +++ lisp/info.el 2013-03-21 22:30:34 +0000 @@ -158,6 +158,13 @@ (defface info-header-node "Face for Info nodes in a node header." :group 'info) +(defcustom Info-index-match-face 'match + "Face used by \\[Info-index] to show the text that matches. +If the value is nil, don't highlight the matching portions specially." + :type 'face + :group 'info + :version "24.4") + ;; This is a defcustom largely so that we can get the benefit ;; of custom-initialize-delay. Perhaps it would work to make it a ;; defvar and explicitly give it a standard-value property, and @@ -3295,12 +3302,14 @@ (defun Info-index (topic) (progn (goto-char (point-min)) (while (re-search-forward pattern nil t) - (push (list (match-string-no-properties 1) - (match-string-no-properties 2) - Info-current-node - (string-to-number (concat "0" - (match-string 3)))) - matches)) + (let ((entry (match-string-no-properties 1)) + (nodename (match-string-no-properties 2)) + (line (string-to-number (concat "0" (match-string 3))))) + (when (and Info-index-match-face + (string-match (regexp-quote topic) entry)) + (add-text-properties (match-beginning 0) (match-end 0) + `(face ,Info-index-match-face) entry)) + (push (list entry nodename Info-current-node line) matches))) (setq nodes (cdr nodes) node (car nodes))) (Info-goto-node node)) (or matches @@ -3559,12 +3568,15 @@ (defun Info-apropos-matches (string) (progn (goto-char (point-min)) (while (re-search-forward pattern nil t) - (setq matches - (cons (list manual - (match-string-no-properties 1) - (match-string-no-properties 2) - (match-string-no-properties 3)) - matches))) + (let ((entry (match-string-no-properties 1)) + (nodename (match-string-no-properties 2)) + (line (match-string-no-properties 3))) + (when (and Info-index-match-face + (string-match (regexp-quote string) entry)) + (add-text-properties (match-beginning 0) (match-end 0) + `(face ,Info-index-match-face) entry)) + (setq matches (cons (list manual entry nodename line) + matches)))) (setq nodes (cdr nodes) node (car nodes))) (Info-goto-node node)))) (error From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 21 21:32:06 2013 Received: (at 14015) by debbugs.gnu.org; 22 Mar 2013 01:32:06 +0000 Received: from localhost ([127.0.0.1]:39676 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UIqpx-0005jK-Ne for submit@debbugs.gnu.org; Thu, 21 Mar 2013 21:32:06 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:14184) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UIqpw-0005j9-3f for 14015@debbugs.gnu.org; Thu, 21 Mar 2013 21:32:04 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFFxKvA/2dsb2JhbABEvw4Xc4IfAQVWIxALNBIUGA0kiCTBLZEKA6R6gV6DEw X-IPAS-Result: Av4EABK/CFFFxKvA/2dsb2JhbABEvw4Xc4IfAQVWIxALNBIUGA0kiCTBLZEKA6R6gV6DEw X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="5500842" Received: from 69-196-171-192.dsl.teksavvy.com (HELO pastel.home) ([69.196.171.192]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 21 Mar 2013 21:30:06 -0400 Received: by pastel.home (Postfix, from userid 20848) id 1EEA167AC3; Thu, 21 Mar 2013 21:29:50 -0400 (EDT) From: Stefan Monnier To: Juri Linkov Subject: Re: bug#14015: Feature request: highlight partial matches in Info's index-search Message-ID: References: <83boaczmxb.fsf@gnu.org> <87a9pwidur.fsf@mail.jurta.org> Date: Thu, 21 Mar 2013 21:29:50 -0400 In-Reply-To: <87a9pwidur.fsf@mail.jurta.org> (Juri Linkov's message of "Fri, 22 Mar 2013 00:31:56 +0200") 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: 14015 Cc: 14015@debbugs.gnu.org, Eli Zaretskii 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 (-) > +(defcustom Info-index-match-face 'match > + "Face used by \\[Info-index] to show the text that matches. > +If the value is nil, don't highlight the matching portions specially." > + :type 'face > + :group 'info > + :version "24.4") Nowadays, we usually prefer to define a new face that inherits from `match'. Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 22 06:10:58 2013 Received: (at 14015) by debbugs.gnu.org; 22 Mar 2013 10:10:58 +0000 Received: from localhost ([127.0.0.1]:40184 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UIyw6-0002tH-8Z for submit@debbugs.gnu.org; Fri, 22 Mar 2013 06:10:58 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:57610) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UIyw3-0002t7-Bb for 14015@debbugs.gnu.org; Fri, 22 Mar 2013 06:10:56 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MK20030043ENG00@a-mtaout22.012.net.il> for 14015@debbugs.gnu.org; Fri, 22 Mar 2013 12:08:57 +0200 (IST) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MK2003O546XEW70@a-mtaout22.012.net.il>; Fri, 22 Mar 2013 12:08:57 +0200 (IST) Date: Fri, 22 Mar 2013 12:08:59 +0200 From: Eli Zaretskii Subject: Re: bug#14015: Feature request: highlight partial matches in Info's index-search In-reply-to: <87a9pwidur.fsf@mail.jurta.org> X-012-Sender: halo1@inter.net.il To: Juri Linkov Message-id: <8338vn691g.fsf@gnu.org> References: <83boaczmxb.fsf@gnu.org> <87a9pwidur.fsf@mail.jurta.org> X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 14015 Cc: 14015@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii 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.2 (-) > From: Juri Linkov > Cc: 14015@debbugs.gnu.org > Date: Fri, 22 Mar 2013 00:31:56 +0200 > > > Found FOObar in Some Node. (`,' tries to find next.) > > > > (The stand-alone reader is a text-mode program, so it changes the > > letter-case to emphasize the part that matched.) > > > > It would be nice if Emacs did something similar, although it is > > probably better to use colors if available. > > info-look.el uses the following face to highlight found matches > in the Info reader: > > (defcustom info-lookup-highlight-face 'match > "Face for highlighting looked up help items. > Setting this variable to nil disables highlighting." > :group 'info-lookup :type 'face) > > Adding a similar face option to highlight the text matched by `Info-index' > will change the output of `Info-virtual-index' and `info-apropos' > to look exactly the same like as output of `occur' that is good > for consistency of the UI. This is in addition to highlighting > the matches in the each area that you asked for: Thanks, I like the result very much. I think it warrants a NEWS entry. From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 22 20:44:52 2013 Received: (at 14015-done) by debbugs.gnu.org; 23 Mar 2013 00:44:52 +0000 Received: from localhost ([127.0.0.1]:41365 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UJCZn-0000BJ-NU for submit@debbugs.gnu.org; Fri, 22 Mar 2013 20:44:52 -0400 Received: from ps18281.dreamhost.com ([69.163.218.105]:55312 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UJCZk-0000B7-Oe for 14015-done@debbugs.gnu.org; Fri, 22 Mar 2013 20:44:50 -0400 Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 00A61258B92960; Fri, 22 Mar 2013 17:42:47 -0700 (PDT) From: Juri Linkov To: Stefan Monnier Subject: Re: bug#14015: Feature request: highlight partial matches in Info's index-search Organization: JURTA References: <83boaczmxb.fsf@gnu.org> <87a9pwidur.fsf@mail.jurta.org> Date: Sat, 23 Mar 2013 02:40:11 +0200 In-Reply-To: (Stefan Monnier's message of "Thu, 21 Mar 2013 21:29:50 -0400") Message-ID: <87k3oz2bms.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 14015-done Cc: 14015-done@debbugs.gnu.org, Eli Zaretskii 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 (-) >> +(defcustom Info-index-match-face 'match >> + "Face used by \\[Info-index] to show the text that matches. >> +If the value is nil, don't highlight the matching portions specially." >> + :type 'face >> + :group 'info >> + :version "24.4") > > Nowadays, we usually prefer to define a new face that inherits from > `match'. I installed with defface that inherits from `match' instead of using defcustom. All other Info faces are defined with defface too, so a new defface will be consistent with other Info faces. However, a new face `list-matching-lines-prefix-face' that I proposed in bug#14017 is better to define with defcustom for consistency with other occur-related faces `list-matching-lines-buffer-name-face' and `list-matching-lines-face' that are defined with defcustom: (defcustom list-matching-lines-face 'match "Face used by \\[list-matching-lines] to show the text that matches. If the value is nil, don't highlight the matching portions specially." :type 'face :group 'matching) (defcustom list-matching-lines-buffer-name-face 'underline "Face used by \\[list-matching-lines] to show the names of buffers. If the value is nil, don't highlight the buffer names specially." :type 'face :group 'matching) I'm not sure whether they should be turned info defface as well because this will also require converting more related faces to defface, e.g. grep faces: (defvar grep-match-face 'match "Face name to use for grep matches.") (defvar grep-context-face 'shadow "Face name to use for grep context lines.") And even after adding deffaces for them these old variables should still remain for backward compatibility with definitions like: (defcustom list-matching-lines-face 'occur-match (defvar grep-match-face 'grep-match From unknown Fri Aug 15 18:12:09 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, 20 Apr 2013 11:24:03 +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