From unknown Fri Aug 15 16:56:11 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#11095 <11095@debbugs.gnu.org> To: bug#11095 <11095@debbugs.gnu.org> Subject: Status: 24.0.94; hi-lock-face-buffer/unhighlight-regexp': Augment? Reply-To: bug#11095 <11095@debbugs.gnu.org> Date: Fri, 15 Aug 2025 23:56:11 +0000 retitle 11095 24.0.94; hi-lock-face-buffer/unhighlight-regexp': Augment? reassign 11095 emacs submitter 11095 Jambunathan K severity 11095 minor tag 11095 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 26 03:18:44 2012 Received: (at submit) by debbugs.gnu.org; 26 Mar 2012 07:18:44 +0000 Received: from localhost ([127.0.0.1]:39024 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SC4CP-0004PT-3Z for submit@debbugs.gnu.org; Mon, 26 Mar 2012 03:18:43 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42928) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SC4C8-0004P7-E9 for submit@debbugs.gnu.org; Mon, 26 Mar 2012 03:18:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SC3hy-0007qz-CE for submit@debbugs.gnu.org; Mon, 26 Mar 2012 02:47:15 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:41876) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SC3hy-0007qk-5F for submit@debbugs.gnu.org; Mon, 26 Mar 2012 02:47:14 -0400 Received: from eggs.gnu.org ([208.118.235.92]:48729) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SC3hw-0008Eb-8H for bug-gnu-emacs@gnu.org; Mon, 26 Mar 2012 02:47:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SC3ht-0007pI-Tf for bug-gnu-emacs@gnu.org; Mon, 26 Mar 2012 02:47:11 -0400 Received: from mail-yw0-f41.google.com ([209.85.213.41]:63578) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SC3ht-0007oG-L5 for bug-gnu-emacs@gnu.org; Mon, 26 Mar 2012 02:47:09 -0400 Received: by yhr47 with SMTP id 47so4216490yhr.0 for ; Sun, 25 Mar 2012 23:47:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version:content-type; bh=SdJm2w6D/idxxnq7Wpzby3meElpsOmw4kCXxexKpNe4=; b=jE5iTsh/nmnn/zj9ggoDQiai7iDuTLEPbKigP4H5FHGjlgQ8gzdlwWinnPNvWWrxwT 7P1lG2y33ft+SWiRw+TfWnXEl5KFbkYocGCBKbltzftH70ky6/2N3A/qB+Fa8pVgtRlg OmB9N9cLPXiOky0vFDCRnrlEDWv6bZlR7fElaorClZyFiZ4OOZpXnDbVxA+Q6vR2/ue5 0RrDIEuOO4zosCEa1+ra7Djjx1uEZwjfu3yZUOAoKs2E+DPxyH9sfEAQlBIRTpwWTP83 XqYG77rAzqQytYAOOpyktksi5AODMc8iEmOvLpkpx7MyiTMFEA/+zrI6G6S+2FKPpFr/ 6Chw== Received: by 10.68.201.65 with SMTP id jy1mr25695528pbc.5.1332744426342; Sun, 25 Mar 2012 23:47:06 -0700 (PDT) Received: from JAMBU-NETBOOK ([115.242.252.109]) by mx.google.com with ESMTPS id o9sm11838648pbe.60.2012.03.25.23.47.02 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 25 Mar 2012 23:47:05 -0700 (PDT) From: Jambunathan K To: bug-gnu-emacs@gnu.org Subject: 24.0.94; hi-lock-face-buffer/unhighlight-regexp': Augment? Date: Mon, 26 Mar 2012 12:16:55 +0530 Message-ID: <81d37z271c.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: submit 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 (------) Proposal is in two parts. Part-I deals with `hi-lock-face-buffer'. Part-II deals with `unhighlight-regexp'. Part-III has a dump of the current customization I have in my .emacs. I believe that my proposal is useful in general. So I request that it be folded in to Emacs-24.1. Part-I: `hi-lock-face-buffer' & Co. ---------------------------------- 1) Review the face names used in `hi-lock-face-defaults' and make the faces customizable. The defaults may not look good on a user's his own font-lock configuration. 2) Make `hi-lock-face-buffer' use a different face on each invocation. Here is a real-world usecase for the above request. As a programmer, I use highlighting to trace variable dependencies within a function. For example, in the example below, after highlighting the variables in __different__ faces, I will come to the conclusion that "a" depends on "d" and "tmp". c = d; b = c + tmp; a = b; And I use this very often to track variables and how they get their values from. If I were to use the default Emacs provided behaviour then I would have to press M-n multiple times as I highlight more and more symbols. (Typically I have 3-5 symbols highlighted before I turn off highlighting.) See elisp snippet at the end of the mail. Part-II: `unhighlight-regexp' ------------------------------ See usecase in Part-I/Item-2 1) I want to selectively turn-off highlighting for certain regexps (arguably) that _specific_ highlighted regexp cursor is stationed on. This would happen when I decide that I don't want to factor a particular variable for my current refactoring exercise. I find the current behaviour of `unhighlight-regexp' slightly tedious. 1. There is no completion for which regexp I want to unhighlight and I have to circle through `hi-lock-interactive-patterns'. 2. Browsing the `hi-lock-interactive-patterns' is tedious for the following reasons: - The order in which unhighlighting happens could totally be unrelated to the order in which highlighting happens. When I am analyzing the variable flow, I don't want to do a "context switch" trying to find out what item to choose from the `unhighlight-regexp' menu. 2) I want to unhighlight all regexps. This happens when I am done with variable analysis. ps: I am not questioning the current defaults. I am only saying that it the current behaviour is too generic to be immediately useful (atleast for my usecase) and so needs some sort of extra augmentation. Part-III: Elisp snippet ----------------------- ;; Why should the color of the faces be encoded in the variable name? ;; Seems counter-intutitive to me. I cannot relate to a hi-yellow ;; face customized to render in red. ;; (defvar hi-lock-face-defaults ;; '("hi-yellow" "hi-pink" "hi-green" "hi-blue" "hi-black-b" ;; "hi-blue-b" "hi-red-b" "hi-green-b" "hi-black-hb") ;; "Default faces for hi-lock interactive functions.") ;; So roll out my own face for highlighting. Make them ;; __customizable__. Note that the name of the face doesn't say what ;; the color of the highlight will be. Works for the color theme that ;; I have. (custom-set-faces '(highlight1 ((t (:background "yellow" :foreground "black")))) '(highlight2 ((t (:background "OrangeRed" :foreground "black")))) '(highlight3 ((((class color) (background dark)) (:background "AntiqueWhite" :foreground "black")))) '(highlight4 ((t (:background "SystemHotTrackingColor")))) '(highlight5 ((t (:background "VioletRed" :foreground "black"))))) ;; override the Emacs default (setq hi-lock-face-defaults '("highlight1" "highlight2" "highlight3" "highlight4" "highlight5")) (defvar hi-lock-faces (let ((l (copy-list hi-lock-face-defaults))) (setcdr (last l) l)) "Circular list of faces in `hi-lock-face-defaults'.") ;; make `hi-lock-faces' buffer local (make-variable-buffer-local 'hi-lock-faces) (defun highlight-symbol () "Highlight symbol at point. For illustartion only. Note the use of `hi-lock-face-buffer'. Choose a new face from `hi-lock-faces' on each invocation. Overrides the default behaviour in vanilla Emacs which is to use the face at the head of the list." (interactive) (hi-lock-face-buffer (concat "\\_<" (regexp-quote (thing-at-point 'symbol)) "\\_>") ;; rotate the face list (prog1 (car hi-lock-faces) (setq hi-lock-faces (cdr hi-lock-faces))))) (defun my-unhighlight-regexp (arg) "Wrapper around `unhighlight-regexp'. With a prefix argument, turn off all highlighting. TODO: Check if the symbol is right now on a highlighted regexp. If yes, unhighlight only that regexp." (interactive "P") (if arg (mapc (lambda (p) (unhighlight-regexp (car p))) hi-lock-interactive-patterns) (call-interactively 'unhighlight-regexp))) From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 10 16:20:31 2012 Received: (at 11095) by debbugs.gnu.org; 10 Oct 2012 20:20:31 +0000 Received: from localhost ([127.0.0.1]:38100 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TM2la-0003wd-Bg for submit@debbugs.gnu.org; Wed, 10 Oct 2012 16:20:31 -0400 Received: from mail-pb0-f44.google.com ([209.85.160.44]:44071) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TM2lW-0003wL-FF for 11095@debbugs.gnu.org; Wed, 10 Oct 2012 16:20:28 -0400 Received: by mail-pb0-f44.google.com with SMTP id ro8so1099687pbb.3 for <11095@debbugs.gnu.org>; Wed, 10 Oct 2012 13:19:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version:content-type; bh=7u4ttcuiBe1ES4PpVThyoMBBXcXpAoegFYAM7FxQcps=; b=mTEAn+vOj0znt8e4aqCRCEMCMK9g3HifGTOh+H/fmJsRySiJD833cVporpLbPFtpJD oXjguhtL1mZCFSZ8gSItFPpbDWFqnEN/vIY5CXLWIHXkdvLkFq7pOYrbxx4xO+FL7JCY qCvMcf9nsHICsyWGkeGr45j6p9xZoE2bvoB40m0UAHqMml2d5NJtFeP0MhLBgx79Y8v4 JROhirXXMvY60Jjgh/E8mjMeBcrBlsFolkqX+hTWsRAgyLefywqPrGAXMR6An+gJRuOf cSivyVItOTd3uMfLJtMaOw6+oQ+wHUvhVSQLq6TQd1tpic1auRFYd0CAXHY8QY3ebVY7 HWIg== Received: by 10.66.85.4 with SMTP id d4mr65275727paz.11.1349900379938; Wed, 10 Oct 2012 13:19:39 -0700 (PDT) Received: from debian-6.05 ([101.62.83.198]) by mx.google.com with ESMTPS id sj5sm1491979pbc.30.2012.10.10.13.19.35 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 10 Oct 2012 13:19:39 -0700 (PDT) From: Jambunathan K To: 11095@debbugs.gnu.org Subject: [PATCH] Re: bug#11095: 24.0.94; hi-lock-face-buffer/unhighlight-regexp': Augment? References: <81d37z271c.fsf@gmail.com> Date: Thu, 11 Oct 2012 01:51:08 +0530 In-Reply-To: <81d37z271c.fsf@gmail.com> (Jambunathan K.'s message of "Mon, 26 Mar 2012 12:16:55 +0530") Message-ID: <87626i2i4r.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 11095 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: 0.1 (/) --=-=-= Content-Type: text/plain I am attaching a patch that addresses Part-I/Item-1 below. The patch adds no functionality. It merely removes "color" from appearing verbatim in the face variables. I am using `hi-lock-' as prefix. Let me know if `highlight-' will be more appropriate (considering that there is a standard highlight face). --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=bug11095-part1.patch Content-Description: bug11095-part1.diff === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-10 14:45:26 +0000 +++ lisp/ChangeLog 2012-10-10 20:05:04 +0000 @@ -1,3 +1,14 @@ +2012-10-10 Jambunathan K + + * hi-lock.el (hi-yellow, hi-pink, hi-green, hi-blue, hi-black-b) + (hi-blue-b, hi-green-b, hi-red-b, hi-black-hb): Mark these faces + as obsolete. + (hi-lock-1, hi-lock-2, hi-lock-3, hi-lock-4, hi-lock-5, hi-lock-6) + (hi-lock-7, hi-lock-8, hi-lock-9): New faces. + (hi-lock-face-defaults, hi-lock-line-face-buffer) + (hi-lock-face-buffer, hi-lock-face-phrase-buffer): Propagate above + changes. + 2012-10-10 Kenichi Handa * select.el (xselect--encode-string): If a coding is specified for === modified file 'lisp/hi-lock.el' --- lisp/hi-lock.el 2012-10-07 00:27:31 +0000 +++ lisp/hi-lock.el 2012-10-10 20:01:23 +0000 @@ -140,7 +140,7 @@ patterns." :group 'hi-lock :group 'faces) -(defface hi-yellow +(defface hi-lock-1 '((((min-colors 88) (background dark)) (:background "yellow1" :foreground "black")) (((background dark)) (:background "yellow" :foreground "black")) @@ -149,13 +149,13 @@ patterns." "Default face for hi-lock mode." :group 'hi-lock-faces) -(defface hi-pink +(defface hi-lock-2 '((((background dark)) (:background "pink" :foreground "black")) (t (:background "pink"))) "Face for hi-lock mode." :group 'hi-lock-faces) -(defface hi-green +(defface hi-lock-3 '((((min-colors 88) (background dark)) (:background "green1" :foreground "black")) (((background dark)) (:background "green" :foreground "black")) @@ -164,40 +164,50 @@ patterns." "Face for hi-lock mode." :group 'hi-lock-faces) -(defface hi-blue +(defface hi-lock-4 '((((background dark)) (:background "light blue" :foreground "black")) (t (:background "light blue"))) "Face for hi-lock mode." :group 'hi-lock-faces) -(defface hi-black-b +(defface hi-lock-5 '((t (:weight bold))) "Face for hi-lock mode." :group 'hi-lock-faces) -(defface hi-blue-b +(defface hi-lock-6 '((((min-colors 88)) (:weight bold :foreground "blue1")) (t (:weight bold :foreground "blue"))) "Face for hi-lock mode." :group 'hi-lock-faces) -(defface hi-green-b +(defface hi-lock-7 '((((min-colors 88)) (:weight bold :foreground "green1")) (t (:weight bold :foreground "green"))) "Face for hi-lock mode." :group 'hi-lock-faces) -(defface hi-red-b +(defface hi-lock-8 '((((min-colors 88)) (:weight bold :foreground "red1")) (t (:weight bold :foreground "red"))) "Face for hi-lock mode." :group 'hi-lock-faces) -(defface hi-black-hb +(defface hi-lock-9 '((t (:weight bold :height 1.67 :inherit variable-pitch))) "Face for hi-lock mode." :group 'hi-lock-faces) +(define-obsolete-face-alias 'hi-yellow 'hi-lock-1 "24.3") +(define-obsolete-face-alias 'hi-pink 'hi-lock-2 "24.3") +(define-obsolete-face-alias 'hi-green 'hi-lock-3 "24.3") +(define-obsolete-face-alias 'hi-blue 'hi-lock-4 "24.3") +(define-obsolete-face-alias 'hi-black-b 'hi-lock-5 "24.3") +(define-obsolete-face-alias 'hi-blue-b 'hi-lock-6 "24.3") +(define-obsolete-face-alias 'hi-green-b 'hi-lock-7 "24.3") +(define-obsolete-face-alias 'hi-red-b 'hi-lock-8 "24.3") +(define-obsolete-face-alias 'hi-black-hb 'hi-lock-9 "24.3") + (defvar hi-lock-file-patterns nil "Patterns found in file for hi-lock. Should not be changed.") @@ -207,8 +217,8 @@ patterns." (define-obsolete-variable-alias 'hi-lock-face-history 'hi-lock-face-defaults "23.1") (defvar hi-lock-face-defaults - '("hi-yellow" "hi-pink" "hi-green" "hi-blue" "hi-black-b" - "hi-blue-b" "hi-red-b" "hi-green-b" "hi-black-hb") + '("hi-lock-1" "hi-lock-2" "hi-lock-3" "hi-lock-4" "hi-lock-5" + "hi-lock-6" "hi-lock-7" "hi-lock-8" "hi-lock-9") "Default faces for hi-lock interactive functions.") ;;(dolist (f hi-lock-face-defaults) @@ -410,7 +420,7 @@ updated as you type." (hi-lock-regexp-okay (read-regexp "Regexp to highlight line" (car regexp-history))) (hi-lock-read-face-name))) - (or (facep face) (setq face 'hi-yellow)) + (or (facep face) (setq face 'hi-lock-1)) (unless hi-lock-mode (hi-lock-mode 1)) (hi-lock-set-pattern ;; The \\(?:...\\) grouping construct ensures that a leading ^, +, * or ? @@ -435,7 +445,7 @@ updated as you type." (hi-lock-regexp-okay (read-regexp "Regexp to highlight" (car regexp-history))) (hi-lock-read-face-name))) - (or (facep face) (setq face 'hi-yellow)) + (or (facep face) (setq face 'hi-lock-1)) (unless hi-lock-mode (hi-lock-mode 1)) (hi-lock-set-pattern regexp face)) @@ -457,7 +467,7 @@ updated as you type." (hi-lock-process-phrase (read-regexp "Phrase to highlight" (car regexp-history)))) (hi-lock-read-face-name))) - (or (facep face) (setq face 'hi-yellow)) + (or (facep face) (setq face 'hi-lock-1)) (unless hi-lock-mode (hi-lock-mode 1)) (hi-lock-set-pattern regexp face)) --=-=-= Content-Type: text/plain > Proposal is in two parts. Part-I deals with `hi-lock-face-buffer'. > Part-II deals with `unhighlight-regexp'. Part-III has a dump of the > current customization I have in my .emacs. > > I believe that my proposal is useful in general. So I request that it > be folded in to Emacs-24.1. > > Part-I: `hi-lock-face-buffer' & Co. > ---------------------------------- > > 1) Review the face names used in `hi-lock-face-defaults' and make the > faces customizable. The defaults may not look good on a user's his > own font-lock configuration. > > 2) Make `hi-lock-face-buffer' use a different face on each invocation. > > Here is a real-world usecase for the above request. > > As a programmer, I use highlighting to trace variable dependencies > within a function. For example, in the example below, after > highlighting the variables in __different__ faces, I will come to the > conclusion that "a" depends on "d" and "tmp". > > c = d; > b = c + tmp; > a = b; > > And I use this very often to track variables and how they get their > values from. > > If I were to use the default Emacs provided behaviour then I would > have to press M-n multiple times as I highlight more and more > symbols. (Typically I have 3-5 symbols highlighted before I turn off > highlighting.) > > See elisp snippet at the end of the mail. > > > Part-II: `unhighlight-regexp' > ------------------------------ > > See usecase in Part-I/Item-2 > > 1) I want to selectively turn-off highlighting for certain regexps > (arguably) that _specific_ highlighted regexp cursor is stationed on. > This would happen when I decide that I don't want to factor a > particular variable for my current refactoring exercise. > > I find the current behaviour of `unhighlight-regexp' slightly > tedious. > > 1. There is no completion for which regexp I want to unhighlight and > I have to circle through `hi-lock-interactive-patterns'. > > 2. Browsing the `hi-lock-interactive-patterns' is tedious for the > following reasons: > > - The order in which unhighlighting happens could totally be > unrelated to the order in which highlighting happens. When I am > analyzing the variable flow, I don't want to do a "context > switch" trying to find out what item to choose from the > `unhighlight-regexp' menu. > > 2) I want to unhighlight all regexps. This happens when I am done with > variable analysis. > > > ps: I am not questioning the current defaults. I am only saying that it > the current behaviour is too generic to be immediately useful (atleast > for my usecase) and so needs some sort of extra augmentation. > > Part-III: Elisp snippet > ----------------------- > > ;; Why should the color of the faces be encoded in the variable name? > ;; Seems counter-intutitive to me. I cannot relate to a hi-yellow > ;; face customized to render in red. > > ;; (defvar hi-lock-face-defaults > ;; '("hi-yellow" "hi-pink" "hi-green" "hi-blue" "hi-black-b" > ;; "hi-blue-b" "hi-red-b" "hi-green-b" "hi-black-hb") > ;; "Default faces for hi-lock interactive functions.") > > ;; So roll out my own face for highlighting. Make them > ;; __customizable__. Note that the name of the face doesn't say what > ;; the color of the highlight will be. Works for the color theme that > ;; I have. > (custom-set-faces > '(highlight1 ((t (:background "yellow" :foreground "black")))) > '(highlight2 ((t (:background "OrangeRed" :foreground "black")))) > '(highlight3 ((((class color) (background dark)) (:background "AntiqueWhite" :foreground "black")))) > '(highlight4 ((t (:background "SystemHotTrackingColor")))) > '(highlight5 ((t (:background "VioletRed" :foreground "black"))))) > > ;; override the Emacs default > (setq hi-lock-face-defaults > '("highlight1" "highlight2" "highlight3" "highlight4" "highlight5")) > > (defvar hi-lock-faces > (let ((l (copy-list hi-lock-face-defaults))) > (setcdr (last l) l)) > "Circular list of faces in `hi-lock-face-defaults'.") > > ;; make `hi-lock-faces' buffer local > (make-variable-buffer-local 'hi-lock-faces) > > (defun highlight-symbol () > "Highlight symbol at point. > For illustartion only. Note the use of `hi-lock-face-buffer'. > Choose a new face from `hi-lock-faces' on each invocation. > Overrides the default behaviour in vanilla Emacs which is to use > the face at the head of the list." > (interactive) > (hi-lock-face-buffer > (concat "\\_<" (regexp-quote (thing-at-point 'symbol)) "\\_>") > ;; rotate the face list > (prog1 (car hi-lock-faces) > (setq hi-lock-faces (cdr hi-lock-faces))))) > > (defun my-unhighlight-regexp (arg) > "Wrapper around `unhighlight-regexp'. > With a prefix argument, turn off all highlighting. > > TODO: Check if the symbol is right now on a highlighted regexp. > If yes, unhighlight only that regexp." > (interactive "P") > (if arg > (mapc (lambda (p) > (unhighlight-regexp (car p))) > hi-lock-interactive-patterns) > (call-interactively 'unhighlight-regexp))) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 10 18:08:11 2012 Received: (at 11095) by debbugs.gnu.org; 10 Oct 2012 22:08:11 +0000 Received: from localhost ([127.0.0.1]:38218 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TM4Rm-0006R0-Ii for submit@debbugs.gnu.org; Wed, 10 Oct 2012 18:08:11 -0400 Received: from mail-pa0-f44.google.com ([209.85.220.44]:49429) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TM4Rj-0006Qm-Vf for 11095@debbugs.gnu.org; Wed, 10 Oct 2012 18:08:09 -0400 Received: by mail-pa0-f44.google.com with SMTP id fb11so1073452pad.3 for <11095@debbugs.gnu.org>; Wed, 10 Oct 2012 15:07:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version:content-type; bh=R9PrJMyUghVWi7bZ5FSoVTOtFlW0sFBKn0qZwX/WR5c=; b=R3hztJi4xZK/1joYwF9GfIcjIR8KCPMx6HRyvzsMPbY7taV881srULSAQN4aKyQbSa D1uwB0NbHUYn/8pmVasBv3fRpr0wNj20ibzJk3YgnokAIoC+6SFuUy0WgocwwrCaLFLw mQldMLmNgCCrFg/jcC6aNcfLlnIW3lIZYYywqeSvBzPg/XmHyxSpSXXfY/YSbXlQDaFz GLQiN6OdGsJFkhU0yycdspd5pdIRkni2wYF7FzNavVjb1bWaV4CPBERX05ewoYZKwN5o BvBYD620DyYR/mW4qeY6u8PtJ3CpTxuJqDt8x60gMkzb/0DHRxcl6J0w3hcRFWBy7/4r 0UiA== Received: by 10.66.85.133 with SMTP id h5mr66213631paz.10.1349906841112; Wed, 10 Oct 2012 15:07:21 -0700 (PDT) Received: from debian-6.05 ([115.241.51.153]) by mx.google.com with ESMTPS id qb2sm1609190pbb.15.2012.10.10.15.07.17 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 10 Oct 2012 15:07:20 -0700 (PDT) From: Jambunathan K To: 11095@debbugs.gnu.org Subject: Re: bug#11095: 24.0.94; hi-lock-face-buffer/unhighlight-regexp': Augment? References: <81d37z271c.fsf@gmail.com> Date: Thu, 11 Oct 2012 03:38:51 +0530 In-Reply-To: <81d37z271c.fsf@gmail.com> (Jambunathan K.'s message of "Mon, 26 Mar 2012 12:16:55 +0530") Message-ID: <87y5jec74c.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 11095 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: 0.1 (/) --=-=-= Content-Type: text/plain Here is a patch for Part-1/Item-2. This patch applies ON TOP OF bug11095-part1.patch attached with http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11095#8) --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=bug11095-part2.patch Content-Description: bug11095-part2.patch === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-10 20:23:49 +0000 +++ lisp/ChangeLog 2012-10-10 21:59:39 +0000 @@ -1,5 +1,11 @@ 2012-10-10 Jambunathan K + * hi-lock.el (hi-lock-auto-select-face): New user variable. + (hi-lock-auto-select-face-defaults): New buffer local variable. + (hi-lock-read-face-name): Honor `hi-lock-auto-select-face'. + +2012-10-10 Jambunathan K + * hi-lock.el (hi-yellow, hi-pink, hi-green, hi-blue, hi-black-b) (hi-blue-b, hi-green-b, hi-red-b, hi-black-hb): Mark these faces as obsolete. === modified file 'lisp/hi-lock.el' --- lisp/hi-lock.el 2012-10-10 20:23:49 +0000 +++ lisp/hi-lock.el 2012-10-10 21:44:28 +0000 @@ -135,6 +135,14 @@ patterns." ;; It can have a function value. (put 'hi-lock-file-patterns-policy 'risky-local-variable t) +(defcustom hi-lock-auto-select-face nil + "Non-nil if highlighting commands should not prompt for face names. +When non-nil, each hi-lock command will cycle through faces in +`hi-lock-face-defaults'." + :type 'boolean + :group 'hi-lock + :version "24.3") + (defgroup hi-lock-faces nil "Faces for hi-lock." :group 'hi-lock @@ -221,8 +229,15 @@ patterns." "hi-lock-6" "hi-lock-7" "hi-lock-8" "hi-lock-9") "Default faces for hi-lock interactive functions.") -;;(dolist (f hi-lock-face-defaults) -;; (unless (facep f) (error "%s not a face" f))) +(defvar hi-lock-auto-select-face-defaults + (let ((l (copy-sequence hi-lock-face-defaults))) + (setcdr (last l) l)) + "Circular list of faces used for interactive highlighting. +When `hi-lock-auto-select-face' is non-nil, use the face at the +head of this list for next interactive highlighting. See also +`hi-lock-read-face-name'.") + +(make-variable-buffer-local 'hi-lock-auto-select-face-defaults) (define-obsolete-variable-alias 'hi-lock-regexp-history 'regexp-history @@ -577,7 +592,15 @@ not suitable." regexp)) (defun hi-lock-read-face-name () - "Read face name from minibuffer with completion and history." + "Return face name for interactive highlighting. +When `hi-lock-auto-select-face' is non-nil, return head of +`hi-lock-auto-select-face-defaults'. Otherwise, read face name +from minibuffer with completion and history." + (if hi-lock-auto-select-face + ;; Return current head and rotate the face list. + (prog1 (car hi-lock-auto-select-face-defaults) + (setq hi-lock-auto-select-face-defaults + (cdr hi-lock-auto-select-face-defaults))) (intern (completing-read "Highlight using face: " obarray 'facep t @@ -590,7 +613,7 @@ not suitable." (not (equal prefix (car hi-lock-face-defaults)))) (length prefix) 0))) 'face-name-history - (cdr hi-lock-face-defaults)))) + (cdr hi-lock-face-defaults))))) (defun hi-lock-set-pattern (regexp face) "Highlight REGEXP with face FACE." --=-=-= Content-Type: text/plain > Proposal is in two parts. Part-I deals with `hi-lock-face-buffer'. > Part-II deals with `unhighlight-regexp'. Part-III has a dump of the > current customization I have in my .emacs. > > I believe that my proposal is useful in general. So I request that it > be folded in to Emacs-24.1. > > Part-I: `hi-lock-face-buffer' & Co. > ---------------------------------- > > 1) Review the face names used in `hi-lock-face-defaults' and make the > faces customizable. The defaults may not look good on a user's his > own font-lock configuration. > > 2) Make `hi-lock-face-buffer' use a different face on each invocation. > > Here is a real-world usecase for the above request. > > As a programmer, I use highlighting to trace variable dependencies > within a function. For example, in the example below, after > highlighting the variables in __different__ faces, I will come to the > conclusion that "a" depends on "d" and "tmp". > > c = d; > b = c + tmp; > a = b; > > And I use this very often to track variables and how they get their > values from. > > If I were to use the default Emacs provided behaviour then I would > have to press M-n multiple times as I highlight more and more > symbols. (Typically I have 3-5 symbols highlighted before I turn off > highlighting.) > > See elisp snippet at the end of the mail. > > > Part-II: `unhighlight-regexp' > ------------------------------ > > See usecase in Part-I/Item-2 > > 1) I want to selectively turn-off highlighting for certain regexps > (arguably) that _specific_ highlighted regexp cursor is stationed on. > This would happen when I decide that I don't want to factor a > particular variable for my current refactoring exercise. > > I find the current behaviour of `unhighlight-regexp' slightly > tedious. > > 1. There is no completion for which regexp I want to unhighlight and > I have to circle through `hi-lock-interactive-patterns'. > > 2. Browsing the `hi-lock-interactive-patterns' is tedious for the > following reasons: > > - The order in which unhighlighting happens could totally be > unrelated to the order in which highlighting happens. When I am > analyzing the variable flow, I don't want to do a "context > switch" trying to find out what item to choose from the > `unhighlight-regexp' menu. > > 2) I want to unhighlight all regexps. This happens when I am done with > variable analysis. > > > ps: I am not questioning the current defaults. I am only saying that it > the current behaviour is too generic to be immediately useful (atleast > for my usecase) and so needs some sort of extra augmentation. > > Part-III: Elisp snippet > ----------------------- > > ;; Why should the color of the faces be encoded in the variable name? > ;; Seems counter-intutitive to me. I cannot relate to a hi-yellow > ;; face customized to render in red. > > ;; (defvar hi-lock-face-defaults > ;; '("hi-yellow" "hi-pink" "hi-green" "hi-blue" "hi-black-b" > ;; "hi-blue-b" "hi-red-b" "hi-green-b" "hi-black-hb") > ;; "Default faces for hi-lock interactive functions.") > > ;; So roll out my own face for highlighting. Make them > ;; __customizable__. Note that the name of the face doesn't say what > ;; the color of the highlight will be. Works for the color theme that > ;; I have. > (custom-set-faces > '(highlight1 ((t (:background "yellow" :foreground "black")))) > '(highlight2 ((t (:background "OrangeRed" :foreground "black")))) > '(highlight3 ((((class color) (background dark)) (:background "AntiqueWhite" :foreground "black")))) > '(highlight4 ((t (:background "SystemHotTrackingColor")))) > '(highlight5 ((t (:background "VioletRed" :foreground "black"))))) > > ;; override the Emacs default > (setq hi-lock-face-defaults > '("highlight1" "highlight2" "highlight3" "highlight4" "highlight5")) > > (defvar hi-lock-faces > (let ((l (copy-list hi-lock-face-defaults))) > (setcdr (last l) l)) > "Circular list of faces in `hi-lock-face-defaults'.") > > ;; make `hi-lock-faces' buffer local > (make-variable-buffer-local 'hi-lock-faces) > > (defun highlight-symbol () > "Highlight symbol at point. > For illustartion only. Note the use of `hi-lock-face-buffer'. > Choose a new face from `hi-lock-faces' on each invocation. > Overrides the default behaviour in vanilla Emacs which is to use > the face at the head of the list." > (interactive) > (hi-lock-face-buffer > (concat "\\_<" (regexp-quote (thing-at-point 'symbol)) "\\_>") > ;; rotate the face list > (prog1 (car hi-lock-faces) > (setq hi-lock-faces (cdr hi-lock-faces))))) > > (defun my-unhighlight-regexp (arg) > "Wrapper around `unhighlight-regexp'. > With a prefix argument, turn off all highlighting. > > TODO: Check if the symbol is right now on a highlighted regexp. > If yes, unhighlight only that regexp." > (interactive "P") > (if arg > (mapc (lambda (p) > (unhighlight-regexp (car p))) > hi-lock-interactive-patterns) > (call-interactively 'unhighlight-regexp))) > > > > -- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 11 16:23:55 2012 Received: (at 11095) by debbugs.gnu.org; 11 Oct 2012 20:23:55 +0000 Received: from localhost ([127.0.0.1]:39949 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TMPIQ-0003mx-EX for submit@debbugs.gnu.org; Thu, 11 Oct 2012 16:23:55 -0400 Received: from mail-pb0-f44.google.com ([209.85.160.44]:53310) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TMPIN-0003me-SK for 11095@debbugs.gnu.org; Thu, 11 Oct 2012 16:23:54 -0400 Received: by mail-pb0-f44.google.com with SMTP id ro8so2215185pbb.3 for <11095@debbugs.gnu.org>; Thu, 11 Oct 2012 13:22:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version:content-type; bh=BKYoZORnWM7wrFf2wt+B/3D6/KYSFrEfbJSgQcI5iA4=; b=waIYsDUxhkwH1pusSlXKsXQtEZD2lph+8Y/2c2Tbpl4TA2N8Wf9AgIzZg/2Tpbmg3K J3s51ePcsq1faksTUgrJ6aGL9E0c8BpzFurSuVBScoRStvje5iid9CxcOqT03j3xcx6Q PzKJZw9v/2tABgyn/Pq5SWOALyIQURpt9WM90xExaLRiPmgPvsWTR6YcVO4UuPOerK+E K/hG0medj2ljBtyJMePyLnb0PEkJwF6ZVoFit2l+vePpwX7nhmSAB1VNtJk8QqIAt/90 xyfhENltCFel6JuEwwaJTtBBy5oI/POkbUEPwK5iUanyq5WxZrAIuLJW6CkO1xfjRxcW Xc+Q== Received: by 10.68.211.99 with SMTP id nb3mr7282186pbc.16.1349986978575; Thu, 11 Oct 2012 13:22:58 -0700 (PDT) Received: from debian-6.05 ([115.241.99.119]) by mx.google.com with ESMTPS id b10sm3087602pav.17.2012.10.11.13.22.54 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 11 Oct 2012 13:22:57 -0700 (PDT) From: Jambunathan K To: 11095@debbugs.gnu.org Subject: Re: bug#11095: 24.0.94; hi-lock-face-buffer/unhighlight-regexp': Augment? References: <81d37z271c.fsf@gmail.com> Date: Fri, 12 Oct 2012 01:54:30 +0530 In-Reply-To: <81d37z271c.fsf@gmail.com> (Jambunathan K.'s message of "Mon, 26 Mar 2012 12:16:55 +0530") Message-ID: <87y5jcvjsx.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 11095 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: 0.1 (/) --=-=-= Content-Type: text/plain The attached patch, applies on top of earlier two patches. See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11095#11 The patch allows highlighting of tag at point. (Note that for all practical purposes, tag at point is the symbol at point.) See Part_I/Item-2 below for a usecase. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=bug11095-part3.patch Content-Description: bug11095-part3.patch === modified file 'lisp/hi-lock.el' --- lisp/hi-lock.el 2012-10-10 22:01:18 +0000 +++ lisp/hi-lock.el 2012-10-11 20:02:17 +0000 @@ -433,7 +433,7 @@ updated as you type." (interactive (list (hi-lock-regexp-okay - (read-regexp "Regexp to highlight line" (car regexp-history))) + (read-regexp "Regexp to highlight line")) (hi-lock-read-face-name))) (or (facep face) (setq face 'hi-lock-1)) (unless hi-lock-mode (hi-lock-mode 1)) @@ -458,7 +458,7 @@ updated as you type." (interactive (list (hi-lock-regexp-okay - (read-regexp "Regexp to highlight" (car regexp-history))) + (read-regexp "Regexp to highlight")) (hi-lock-read-face-name))) (or (facep face) (setq face 'hi-lock-1)) (unless hi-lock-mode (hi-lock-mode 1)) @@ -480,7 +480,7 @@ updated as you type." (list (hi-lock-regexp-okay (hi-lock-process-phrase - (read-regexp "Phrase to highlight" (car regexp-history)))) + (read-regexp "Phrase to highlight"))) (hi-lock-read-face-name))) (or (facep face) (setq face 'hi-lock-1)) (unless hi-lock-mode (hi-lock-mode 1)) @@ -598,7 +598,7 @@ When `hi-lock-auto-select-face' is non-n from minibuffer with completion and history." (if hi-lock-auto-select-face ;; Return current head and rotate the face list. - (prog1 (car hi-lock-auto-select-face-defaults) + (prog1 (intern (car hi-lock-auto-select-face-defaults)) (setq hi-lock-auto-select-face-defaults (cdr hi-lock-auto-select-face-defaults))) (intern (completing-read === modified file 'lisp/replace.el' --- lisp/replace.el 2012-10-04 19:28:11 +0000 +++ lisp/replace.el 2012-10-11 19:46:42 +0000 @@ -585,27 +585,32 @@ of `history-length', which see.") When PROMPT doesn't end with a colon and space, it adds a final \": \". If DEFAULTS is non-nil, it displays the first default in the prompt. -Non-nil optional arg DEFAULTS is a string or a list of strings that -are prepended to a list of standard default values, which include the -string at point, the last isearch regexp, the last isearch string, and -the last replacement regexp. +Optional arg DEFAULTS is a string or a list of strings that are +prepended to a list of standard default values, which include the +tag at point, the last isearch regexp, the last isearch string, +and the last replacement regexp. Non-nil HISTORY is a symbol to use for the history list. If HISTORY is nil, `regexp-history' is used." - (let* ((default (if (consp defaults) (car defaults) defaults)) - (defaults + (let* ((defaults (append (if (listp defaults) defaults (list defaults)) - (list (regexp-quote - (or (funcall (or find-tag-default-function + (list + ;; Regexp for tag at point. + (let* ((tagf (or find-tag-default-function (get major-mode 'find-tag-default-function) 'find-tag-default)) - "")) + (tag (funcall tagf))) + (cond ((not tag) "") + ((eq tagf 'find-tag-default) + (format "\\_<%s\\_>" (regexp-quote tag))) + (t (regexp-quote tag)))) (car regexp-search-ring) (regexp-quote (or (car search-ring) "")) (car (symbol-value query-replace-from-history-variable))))) (defaults (delete-dups (delq nil (delete "" defaults)))) + (default (car defaults)) ;; Do not automatically add default to the history for empty input. (history-add-new-input nil) (input (read-from-minibuffer --=-=-= Content-Type: text/plain > Proposal is in two parts. Part-I deals with `hi-lock-face-buffer'. > Part-II deals with `unhighlight-regexp'. Part-III has a dump of the > current customization I have in my .emacs. > > I believe that my proposal is useful in general. So I request that it > be folded in to Emacs-24.1. > > Part-I: `hi-lock-face-buffer' & Co. > ---------------------------------- > > 1) Review the face names used in `hi-lock-face-defaults' and make the > faces customizable. The defaults may not look good on a user's his > own font-lock configuration. > > 2) Make `hi-lock-face-buffer' use a different face on each invocation. > > Here is a real-world usecase for the above request. > > As a programmer, I use highlighting to trace variable dependencies > within a function. For example, in the example below, after > highlighting the variables in __different__ faces, I will come to the > conclusion that "a" depends on "d" and "tmp". > > c = d; > b = c + tmp; > a = b; > > And I use this very often to track variables and how they get their > values from. > > If I were to use the default Emacs provided behaviour then I would > have to press M-n multiple times as I highlight more and more > symbols. (Typically I have 3-5 symbols highlighted before I turn off > highlighting.) > > See elisp snippet at the end of the mail. > > > Part-II: `unhighlight-regexp' > ------------------------------ > > See usecase in Part-I/Item-2 > > 1) I want to selectively turn-off highlighting for certain regexps > (arguably) that _specific_ highlighted regexp cursor is stationed on. > This would happen when I decide that I don't want to factor a > particular variable for my current refactoring exercise. > > I find the current behaviour of `unhighlight-regexp' slightly > tedious. > > 1. There is no completion for which regexp I want to unhighlight and > I have to circle through `hi-lock-interactive-patterns'. > > 2. Browsing the `hi-lock-interactive-patterns' is tedious for the > following reasons: > > - The order in which unhighlighting happens could totally be > unrelated to the order in which highlighting happens. When I am > analyzing the variable flow, I don't want to do a "context > switch" trying to find out what item to choose from the > `unhighlight-regexp' menu. > > 2) I want to unhighlight all regexps. This happens when I am done with > variable analysis. > > > ps: I am not questioning the current defaults. I am only saying that it > the current behaviour is too generic to be immediately useful (atleast > for my usecase) and so needs some sort of extra augmentation. > > Part-III: Elisp snippet > ----------------------- > > ;; Why should the color of the faces be encoded in the variable name? > ;; Seems counter-intutitive to me. I cannot relate to a hi-yellow > ;; face customized to render in red. > > ;; (defvar hi-lock-face-defaults > ;; '("hi-yellow" "hi-pink" "hi-green" "hi-blue" "hi-black-b" > ;; "hi-blue-b" "hi-red-b" "hi-green-b" "hi-black-hb") > ;; "Default faces for hi-lock interactive functions.") > > ;; So roll out my own face for highlighting. Make them > ;; __customizable__. Note that the name of the face doesn't say what > ;; the color of the highlight will be. Works for the color theme that > ;; I have. > (custom-set-faces > '(highlight1 ((t (:background "yellow" :foreground "black")))) > '(highlight2 ((t (:background "OrangeRed" :foreground "black")))) > '(highlight3 ((((class color) (background dark)) (:background "AntiqueWhite" :foreground "black")))) > '(highlight4 ((t (:background "SystemHotTrackingColor")))) > '(highlight5 ((t (:background "VioletRed" :foreground "black"))))) > > ;; override the Emacs default > (setq hi-lock-face-defaults > '("highlight1" "highlight2" "highlight3" "highlight4" "highlight5")) > > (defvar hi-lock-faces > (let ((l (copy-list hi-lock-face-defaults))) > (setcdr (last l) l)) > "Circular list of faces in `hi-lock-face-defaults'.") > > ;; make `hi-lock-faces' buffer local > (make-variable-buffer-local 'hi-lock-faces) > > (defun highlight-symbol () > "Highlight symbol at point. > For illustartion only. Note the use of `hi-lock-face-buffer'. > Choose a new face from `hi-lock-faces' on each invocation. > Overrides the default behaviour in vanilla Emacs which is to use > the face at the head of the list." > (interactive) > (hi-lock-face-buffer > (concat "\\_<" (regexp-quote (thing-at-point 'symbol)) "\\_>") > ;; rotate the face list > (prog1 (car hi-lock-faces) > (setq hi-lock-faces (cdr hi-lock-faces))))) > > (defun my-unhighlight-regexp (arg) > "Wrapper around `unhighlight-regexp'. > With a prefix argument, turn off all highlighting. > > TODO: Check if the symbol is right now on a highlighted regexp. > If yes, unhighlight only that regexp." > (interactive "P") > (if arg > (mapc (lambda (p) > (unhighlight-regexp (car p))) > hi-lock-interactive-patterns) > (call-interactively 'unhighlight-regexp))) > > > > -- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 11 16:32:33 2012 Received: (at 11095) by debbugs.gnu.org; 11 Oct 2012 20:32:33 +0000 Received: from localhost ([127.0.0.1]:39953 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TMPQm-0003zU-QI for submit@debbugs.gnu.org; Thu, 11 Oct 2012 16:32:33 -0400 Received: from mail-da0-f44.google.com ([209.85.210.44]:48799) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TMPQk-0003zF-8e for 11095@debbugs.gnu.org; Thu, 11 Oct 2012 16:32:31 -0400 Received: by mail-da0-f44.google.com with SMTP id h15so934748dan.3 for <11095@debbugs.gnu.org>; Thu, 11 Oct 2012 13:31:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version:content-type; bh=3qoxCBh2J/saNpCypDc3hhgGld61lkYM21hezy193OA=; b=staaFPSo4Vcpi/GUamXgLG9wKkCVXSr2w8RaZ+zMdCCTZbN2Ffa1YgEAcg6XvOmSGb jG1imaVKyOuVJzqFQ5jok008ki3FuRpawTtgKVSt586g0DW0yz5s2h8YtV/+W3iqmntq hGPzJffUVmcmDmTRqkqEUZ8DsvjMNvKag/OzY/QxXZ630pfr8Wawg9KDDpYH9cgbfdQK noKtiDbebEfPlgWrqcjY9dxDp4hiJ5kY309FM3MTsNc2dQxKscpwKw27UJB6t+zbzCrq PAE7C1hztx8/QWD/IQHSS38XfiLgnlaq47+OXgIOBe1UTzOiAPq5PoH+TT+PGj707Kng ELTw== Received: by 10.66.85.8 with SMTP id d8mr5443323paz.30.1349987498200; Thu, 11 Oct 2012 13:31:38 -0700 (PDT) Received: from debian-6.05 ([115.241.99.119]) by mx.google.com with ESMTPS id tt6sm3219085pbc.51.2012.10.11.13.31.36 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 11 Oct 2012 13:31:37 -0700 (PDT) From: Jambunathan K To: 11095@debbugs.gnu.org Subject: Re: bug#11095: 24.0.94; hi-lock-face-buffer/unhighlight-regexp': Augment? References: <81d37z271c.fsf@gmail.com> <87y5jcvjsx.fsf@gmail.com> Date: Fri, 12 Oct 2012 02:03:11 +0530 In-Reply-To: <87y5jcvjsx.fsf@gmail.com> (Jambunathan K.'s message of "Fri, 12 Oct 2012 01:54:30 +0530") Message-ID: <87k3uwda0o.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 11095 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: 0.1 (/) --=-=-= Content-Type: text/plain Jambunathan K writes: > The attached patch, applies on top of earlier two patches. See > http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11095#11 > > The patch allows highlighting of tag at point. (Note that for all > practical purposes, tag at point is the symbol at point.) See > Part_I/Item-2 below for a usecase. > [2. bug11095-part3.patch --- text/x-diff; bug11095-part3.patch]... Here is the Changelog entry for bug11095-part3.patch. (Sorry for the confusion, if any) --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=bug11095-part3-changelog.patch Content-Description: bug11095-part3-changelog.patch === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-10 22:01:18 +0000 +++ lisp/ChangeLog 2012-10-11 20:13:40 +0000 @@ -1,3 +1,15 @@ +2012-10-11 Jambunathan K + + * replace.el (read-regexp): Tighten the regexp that matches tag. + When tag is retrieved with `find-tag-default', use regexp that + matches symbol at point. Also update docstring. + * hi-lock.el (hi-lock-line-face-buffer, hi-lock-face-buffer) + (hi-lock-face-phrase-buffer): Don't provide a default to + `read-regexp'. Effectively the default regexp matches tag at + point. + (hi-lock-read-face-name): Return face as a symbol. Fix earlier + commit. + 2012-10-10 Jambunathan K * hi-lock.el (hi-lock-auto-select-face): New user variable. --=-=-= Content-Type: text/plain -- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 11 18:44:44 2012 Received: (at 11095) by debbugs.gnu.org; 11 Oct 2012 22:44:45 +0000 Received: from localhost ([127.0.0.1]:40020 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TMRUh-00072y-Ql for submit@debbugs.gnu.org; Thu, 11 Oct 2012 18:44:44 -0400 Received: from ps18281.dreamhost.com ([69.163.218.105]:44786 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TMRUe-00072q-LV for 11095@debbugs.gnu.org; Thu, 11 Oct 2012 18:44:42 -0400 Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 52B666FA02D; Thu, 11 Oct 2012 15:43:52 -0700 (PDT) From: Juri Linkov To: Jambunathan K Subject: Re: bug#11095: 24.0.94; hi-lock-face-buffer/unhighlight-regexp': Augment? Organization: JURTA References: <81d37z271c.fsf@gmail.com> <87y5jcvjsx.fsf@gmail.com> Date: Fri, 12 Oct 2012 01:41:04 +0300 In-Reply-To: <87y5jcvjsx.fsf@gmail.com> (Jambunathan K.'s message of "Fri, 12 Oct 2012 01:54:30 +0530") Message-ID: <87zk3s1vjz.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 11095 Cc: 11095@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: 0.8 (/) > The patch allows highlighting of tag at point. (Note that for all > practical purposes, tag at point is the symbol at point.) See > Part_I/Item-2 below for a usecase. > [...] > + (cond ((not tag) "") > + ((eq tagf 'find-tag-default) > + (format "\\_<%s\\_>" (regexp-quote tag))) > [...] >> As a programmer, I use highlighting to trace variable dependencies >> within a function. For example, in the example below, after >> highlighting the variables in __different__ faces, I will come to the >> conclusion that "a" depends on "d" and "tmp". >> >> c = d; >> b = c + tmp; >> a = b; >> >> And I use this very often to track variables and how they get their >> values from. >> >> If I were to use the default Emacs provided behaviour then I would >> have to press M-n multiple times as I highlight more and more >> symbols. (Typically I have 3-5 symbols highlighted before I turn off >> highlighting.) Would you agree that a better way to implement your proposal is to add a new command to hi-lock.el with a name like `highlight-symbol'? I mean there are already such hi-lock commands as: 1. highlight-lines-matching-regexp (that corresponds to occur) 2. highlight-regexp (that corresponds to isearch-forward-regexp) 3. highlight-phrase (that corresponds to isearch-forward-word) what is currently missing is this command: 4. highlight-symbol (that corresponds to isearch-forward-symbol) Then both highlight-phrase and highlight-symbol could use internally isearch functions that turn words and symbols into regexps and that will do the right thing using search-upper-case and search-whitespace-regexp. From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 12 00:29:31 2012 Received: (at 11095) by debbugs.gnu.org; 12 Oct 2012 04:29:31 +0000 Received: from localhost ([127.0.0.1]:40159 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TMWsN-00085h-DL for submit@debbugs.gnu.org; Fri, 12 Oct 2012 00:29:31 -0400 Received: from mail-pa0-f44.google.com ([209.85.220.44]:59743) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TMWsL-00085V-BG for 11095@debbugs.gnu.org; Fri, 12 Oct 2012 00:29:30 -0400 Received: by mail-pa0-f44.google.com with SMTP id fb11so2440600pad.3 for <11095@debbugs.gnu.org>; Thu, 11 Oct 2012 21:28:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=zDnwA9Yz4RRlq63KO2R0m04OUVypweJaCgOG5+ZmRXg=; b=iXep7z0XBQfdlMNd6y5ADKFGXu1FbqsIIGoyOemBsldW9fX6lw+xRqU5MVfy0a0X/B FVtWwIiwxUSzxRTJRK9CEPTnGoKTOXmDUilTVrczTwVIVVnPTCvoqT3WR1p2I+A2fweM I/mRd1ZqXYgIjdkh46EO9iNwcZhzK+wFMbcd3QsRoWlhjdkfvdT32p7n7zwYS0OvWHIv 7tJjlzVxKH2qp9pkwdcweEejtB0WW47rdfr/u0NDu5GeKIUnt+72nJn9L5j9EKft2sAa QWemCRCMFP9et1L46AcHj+MgnNFdsmfmTKXy0TCtpKDypMESg5fW5oAXpFuPO/dKFUwC HNYw== Received: by 10.68.252.133 with SMTP id zs5mr9945127pbc.152.1350016115424; Thu, 11 Oct 2012 21:28:35 -0700 (PDT) Received: from debian-6.05 ([115.242.179.178]) by mx.google.com with ESMTPS id qj6sm2997283pbb.69.2012.10.11.21.28.32 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 11 Oct 2012 21:28:34 -0700 (PDT) From: Jambunathan K To: Juri Linkov Subject: Re: bug#11095: 24.0.94; hi-lock-face-buffer/unhighlight-regexp': Augment? References: <81d37z271c.fsf@gmail.com> <87y5jcvjsx.fsf@gmail.com> <87zk3s1vjz.fsf@mail.jurta.org> Date: Fri, 12 Oct 2012 10:00:07 +0530 In-Reply-To: <87zk3s1vjz.fsf@mail.jurta.org> (Juri Linkov's message of "Fri, 12 Oct 2012 01:41:04 +0300") Message-ID: <87lifc71o0.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 11095 Cc: 11095@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: 0.1 (/) Juri Linkov writes: >> The patch allows highlighting of tag at point. (Note that for all >> practical purposes, tag at point is the symbol at point.) See >> Part_I/Item-2 below for a usecase. >> [...] >> + (cond ((not tag) "") >> + ((eq tagf 'find-tag-default) >> + (format "\\_<%s\\_>" (regexp-quote tag))) >> [...] >>> As a programmer, I use highlighting to trace variable dependencies >>> within a function. For example, in the example below, after >>> highlighting the variables in __different__ faces, I will come to the >>> conclusion that "a" depends on "d" and "tmp". >>> >>> c = d; >>> b = c + tmp; >>> a = b; >>> >>> And I use this very often to track variables and how they get their >>> values from. >>> >>> If I were to use the default Emacs provided behaviour then I would >>> have to press M-n multiple times as I highlight more and more >>> symbols. (Typically I have 3-5 symbols highlighted before I turn off >>> highlighting.) > > Would you agree that a better way to implement your proposal is to add a new > command to hi-lock.el with a name like `highlight-symbol'? I mean there are > already such hi-lock commands as: > > 1. highlight-lines-matching-regexp (that corresponds to occur) > 2. highlight-regexp (that corresponds to isearch-forward-regexp) > 3. highlight-phrase (that corresponds to isearch-forward-word) > > what is currently missing is this command: > > 4. highlight-symbol (that corresponds to isearch-forward-symbol) > > Then both highlight-phrase and highlight-symbol could use internally > isearch functions that turn words and symbols into regexps > and that will do the right thing using search-upper-case and > search-whitespace-regexp. Have you tried the patches? With my current patches, M-s h r will highlight symbol at point (more precisely tag at point). It may not be the best thing, but achieves the task at hand. Let me emphasize that the patches are mostly concerned with easy and hands-off highlighting and un-highlighting (i.e., the highlighting process itself - the "how" - rather than "what (regexp)" is highlighted and how those regexes are composed.) So the patches are valid candidates for consideration, irrespective of your observations above. As for handling of regexes themselves, I will rather leave it to more experienced hands. ps: I have one more patch to circulate - wrt unhighlighting - before I leave the table open for further discussion. Once I get some initial comments, I can rework the changes and provide a (revised) consolidated patch. From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 12 12:17:16 2012 Received: (at 11095) by debbugs.gnu.org; 12 Oct 2012 16:17:16 +0000 Received: from localhost ([127.0.0.1]:41250 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TMhvH-0001lt-LB for submit@debbugs.gnu.org; Fri, 12 Oct 2012 12:17:16 -0400 Received: from mail-pa0-f44.google.com ([209.85.220.44]:57239) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TMhvE-0001le-Qf for 11095@debbugs.gnu.org; Fri, 12 Oct 2012 12:17:14 -0400 Received: by mail-pa0-f44.google.com with SMTP id fb11so2960814pad.3 for <11095@debbugs.gnu.org>; Fri, 12 Oct 2012 09:16:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version:content-type; bh=YP8/ef4eYSuut73y0uq8RAuKtY7927bX6Kc91RlEd3k=; b=gY279JPoNYMe438s/xqEfhbQ2mgPXY6TsV/ecZC/sMUhpky8wiSvhuri30aJxQpFX8 4MKsr+i8KwZw1XM50oHpohnDuY6+o6SThpPkqkGpEhE1Sdk5eI+PK5Zy7CAvNhU01Qnw ol2es5AOcz0jYXevuUe4x8aibuijUMUti4TsoHNGjCSeW5N2qCMfPUbU+JF91NSN41rt vShUmMGnE0s6IxW2SLDI1g8BarpLJeGPcP39Vqd40ehQhBdd1kGE2/4wdwQ2RbEznO7s gv7nrN4B/kpZgDB9LlX+eE4m4T08gXI4FFM74ScfY4nUS2MWqS2bhVav4i0cf9dSYo3z lhWg== Received: by 10.68.190.71 with SMTP id go7mr15062107pbc.66.1350058575858; Fri, 12 Oct 2012 09:16:15 -0700 (PDT) Received: from debian-6.05 ([101.63.247.41]) by mx.google.com with ESMTPS id l6sm4556296pav.12.2012.10.12.09.16.12 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 12 Oct 2012 09:16:15 -0700 (PDT) From: Jambunathan K To: 11095@debbugs.gnu.org Subject: Re: bug#11095: 24.0.94; hi-lock-face-buffer/unhighlight-regexp': Augment? References: <81d37z271c.fsf@gmail.com> Date: Fri, 12 Oct 2012 21:47:47 +0530 In-Reply-To: <81d37z271c.fsf@gmail.com> (Jambunathan K.'s message of "Mon, 26 Mar 2012 12:16:55 +0530") Message-ID: <871uh3y89g.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 11095 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 (--) --=-=-= Content-Type: text/plain I am attaching a patch that addresses Part-II/Item-1 below. This patch is 4-th in the series and applies on top of the third patch seen here at http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11095#14. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=bug11095-part4.patch Content-Description: bug11095-part4.patch === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-11 20:39:05 +0000 +++ lisp/ChangeLog 2012-10-12 16:08:17 +0000 @@ -1,3 +1,10 @@ +2012-10-12 Jambunathan K + + * hi-lock.el (hi-lock-unface-buffer): Prompt user with useful + defaults. Specifically, if cursor is on an highlighted text, + offer a regexp that matches that text as the default. Update + docstring. + 2012-10-11 Jambunathan K * replace.el (read-regexp): Tighten the regexp that matches tag. === modified file 'lisp/hi-lock.el' --- lisp/hi-lock.el 2012-10-11 20:39:05 +0000 +++ lisp/hi-lock.el 2012-10-12 15:55:49 +0000 @@ -493,8 +493,15 @@ updated as you type." ;;;###autoload (defun hi-lock-unface-buffer (regexp) "Remove highlighting of each match to REGEXP set by hi-lock. -Interactively, prompt for REGEXP, accepting only regexps -previously inserted by hi-lock interactive functions." +Interactively, prompt for REGEXP. If the cursor is on a +previously highlighted text and if the associated regexp can be +inferred via simple heuristics, offer that regexp as default. +Otherwise, prompt for REGEXP with completion and limit the +choices to only those regexps used previously with hi-lock +commands. + +If this command is invoked via menu, make no attempt to infer +REGEXP from text at point." (interactive (if (and (display-popup-menus-p) (listp last-nonmenu-event) @@ -522,15 +529,51 @@ previously inserted by hi-lock interacti ;; To prevent that, we return an empty string, which will ;; effectively disable the rest of the function. (throw 'snafu '("")))) - (let ((history-list (mapcar (lambda (p) (car p)) - hi-lock-interactive-patterns))) + ;; Un-highlighting triggered via keyboard action. (unless hi-lock-interactive-patterns (error "No highlighting to remove")) + ;; Infer the regexp to un-highlight based on cursor position. + (let* (candidate-hi-lock-patterns + (default-regexp + (or + ;; When using overlays, there is no ambiguity on the best + ;; choice of regexp. + (let ((desired-serial (get-char-property + (point) 'hi-lock-overlay-regexp))) + (when desired-serial + (catch 'regexp + (maphash + (lambda (regexp serial) + (when (= serial desired-serial) + (throw 'regexp regexp))) + hi-lock-string-serialize-hash)))) + ;; With font-locking on, check if the cursor is on an + ;; highlighted text. Checking for hi-lock face is a + ;; good heuristic. + (and (string-match "\\`hi-lock-" (face-name (face-at-point))) + (let* ((hi-text + (buffer-substring-no-properties + (previous-single-property-change (point) 'face) + (next-single-property-change (point) 'face)))) + ;; Compute hi-lock patterns that match the + ;; highlighted text at point. Use this later in + ;; during completing-read. + (setq candidate-hi-lock-patterns + (delq nil + (mapcar + (lambda (hi-lock-pattern) + (let ((regexp (car hi-lock-pattern))) + (and (string-match regexp hi-text) + hi-lock-pattern))) + hi-lock-interactive-patterns))) + ;; Use regexp from the first matching pattern as + ;; a reasonable default. + (caar candidate-hi-lock-patterns)))))) (list (completing-read "Regexp to unhighlight: " - hi-lock-interactive-patterns nil t - (car (car hi-lock-interactive-patterns)) - (cons 'history-list 1)))))) + (or candidate-hi-lock-patterns + hi-lock-interactive-patterns) + nil t default-regexp))))) (let ((keyword (assoc regexp hi-lock-interactive-patterns))) (when keyword (font-lock-remove-keywords nil (list keyword)) --=-=-= Content-Type: text/plain > Proposal is in two parts. Part-I deals with `hi-lock-face-buffer'. > Part-II deals with `unhighlight-regexp'. Part-III has a dump of the > current customization I have in my .emacs. > > I believe that my proposal is useful in general. So I request that it > be folded in to Emacs-24.1. > > Part-I: `hi-lock-face-buffer' & Co. > ---------------------------------- > > 1) Review the face names used in `hi-lock-face-defaults' and make the > faces customizable. The defaults may not look good on a user's his > own font-lock configuration. > > 2) Make `hi-lock-face-buffer' use a different face on each invocation. > > Here is a real-world usecase for the above request. > > As a programmer, I use highlighting to trace variable dependencies > within a function. For example, in the example below, after > highlighting the variables in __different__ faces, I will come to the > conclusion that "a" depends on "d" and "tmp". > > c = d; > b = c + tmp; > a = b; > > And I use this very often to track variables and how they get their > values from. > > If I were to use the default Emacs provided behaviour then I would > have to press M-n multiple times as I highlight more and more > symbols. (Typically I have 3-5 symbols highlighted before I turn off > highlighting.) > > See elisp snippet at the end of the mail. > > > Part-II: `unhighlight-regexp' > ------------------------------ > > See usecase in Part-I/Item-2 > > 1) I want to selectively turn-off highlighting for certain regexps > (arguably) that _specific_ highlighted regexp cursor is stationed on. > This would happen when I decide that I don't want to factor a > particular variable for my current refactoring exercise. > > I find the current behaviour of `unhighlight-regexp' slightly > tedious. > > 1. There is no completion for which regexp I want to unhighlight and > I have to circle through `hi-lock-interactive-patterns'. > > 2. Browsing the `hi-lock-interactive-patterns' is tedious for the > following reasons: > > - The order in which unhighlighting happens could totally be > unrelated to the order in which highlighting happens. When I am > analyzing the variable flow, I don't want to do a "context > switch" trying to find out what item to choose from the > `unhighlight-regexp' menu. > > 2) I want to unhighlight all regexps. This happens when I am done with > variable analysis. > > > ps: I am not questioning the current defaults. I am only saying that it > the current behaviour is too generic to be immediately useful (atleast > for my usecase) and so needs some sort of extra augmentation. > > Part-III: Elisp snippet > ----------------------- > > ;; Why should the color of the faces be encoded in the variable name? > ;; Seems counter-intutitive to me. I cannot relate to a hi-yellow > ;; face customized to render in red. > > ;; (defvar hi-lock-face-defaults > ;; '("hi-yellow" "hi-pink" "hi-green" "hi-blue" "hi-black-b" > ;; "hi-blue-b" "hi-red-b" "hi-green-b" "hi-black-hb") > ;; "Default faces for hi-lock interactive functions.") > > ;; So roll out my own face for highlighting. Make them > ;; __customizable__. Note that the name of the face doesn't say what > ;; the color of the highlight will be. Works for the color theme that > ;; I have. > (custom-set-faces > '(highlight1 ((t (:background "yellow" :foreground "black")))) > '(highlight2 ((t (:background "OrangeRed" :foreground "black")))) > '(highlight3 ((((class color) (background dark)) (:background "AntiqueWhite" :foreground "black")))) > '(highlight4 ((t (:background "SystemHotTrackingColor")))) > '(highlight5 ((t (:background "VioletRed" :foreground "black"))))) > > ;; override the Emacs default > (setq hi-lock-face-defaults > '("highlight1" "highlight2" "highlight3" "highlight4" "highlight5")) > > (defvar hi-lock-faces > (let ((l (copy-list hi-lock-face-defaults))) > (setcdr (last l) l)) > "Circular list of faces in `hi-lock-face-defaults'.") > > ;; make `hi-lock-faces' buffer local > (make-variable-buffer-local 'hi-lock-faces) > > (defun highlight-symbol () > "Highlight symbol at point. > For illustartion only. Note the use of `hi-lock-face-buffer'. > Choose a new face from `hi-lock-faces' on each invocation. > Overrides the default behaviour in vanilla Emacs which is to use > the face at the head of the list." > (interactive) > (hi-lock-face-buffer > (concat "\\_<" (regexp-quote (thing-at-point 'symbol)) "\\_>") > ;; rotate the face list > (prog1 (car hi-lock-faces) > (setq hi-lock-faces (cdr hi-lock-faces))))) > > (defun my-unhighlight-regexp (arg) > "Wrapper around `unhighlight-regexp'. > With a prefix argument, turn off all highlighting. > > TODO: Check if the symbol is right now on a highlighted regexp. > If yes, unhighlight only that regexp." > (interactive "P") > (if arg > (mapc (lambda (p) > (unhighlight-regexp (car p))) > hi-lock-interactive-patterns) > (call-interactively 'unhighlight-regexp))) > > > > -- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 12 14:18:24 2012 Received: (at 11095) by debbugs.gnu.org; 12 Oct 2012 18:18:24 +0000 Received: from localhost ([127.0.0.1]:41348 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TMjoW-0004Xk-1R for submit@debbugs.gnu.org; Fri, 12 Oct 2012 14:18:24 -0400 Received: from mail-da0-f44.google.com ([209.85.210.44]:62486) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TMjoU-0004XX-2X for 11095@debbugs.gnu.org; Fri, 12 Oct 2012 14:18:23 -0400 Received: by mail-da0-f44.google.com with SMTP id h15so1431349dan.3 for <11095@debbugs.gnu.org>; Fri, 12 Oct 2012 11:17:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version:content-type; bh=f0PA9eRSxHkLbXKZ49EpN2E26PtQfSoeeTXa+kUU4Vc=; b=0Bba9sthCTlqbfs1oWebywJqJuF9SwOwctVF133aInIE7VBUiTfjpu2nG+ftCaSPdE PcouGWp7XBijvor9VZJf+zDOCUFYrpt7JUod4V3y26KdBe5Z3lOKA6MyfG9Ys0Q0kDpn PxfWrVGR8LQ10jZs2OEIB5S+L93Gp4acBZIhI34z2fuMAoySsFNLYK8SIgAjVv5XoAp2 f0mAAFggu3xMrYs8MNd8Bsn2bJi9uZ9TuYGluv4uL7gLRDUAGb+8ceVDC8JWTbrewIQa yX/syRmp8FJrCzRE3h5c6YEoBeK7Au1fuJLtvAfsEU7aUhLVj0OXFRn/5tKDnSiC2lMz OuTg== Received: by 10.66.75.162 with SMTP id d2mr13270431paw.27.1350065844984; Fri, 12 Oct 2012 11:17:24 -0700 (PDT) Received: from debian-6.05 ([115.184.0.74]) by mx.google.com with ESMTPS id kt2sm4777112pbc.73.2012.10.12.11.17.21 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 12 Oct 2012 11:17:23 -0700 (PDT) From: Jambunathan K To: 11095@debbugs.gnu.org Subject: Re: bug#11095: 24.0.94; hi-lock-face-buffer/unhighlight-regexp': Augment? References: <81d37z271c.fsf@gmail.com> Date: Fri, 12 Oct 2012 23:48:55 +0530 In-Reply-To: <81d37z271c.fsf@gmail.com> (Jambunathan K.'s message of "Mon, 26 Mar 2012 12:16:55 +0530") Message-ID: <874nlz5zao.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 11095 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 (--) --=-=-= Content-Type: text/plain I am attaching a patch that is 5-th and last in the series for my proposal. This patch applies on top of the 4-th patch visible here: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11095#26. The patch adds an ability to un-highlight all highlighted text in the buffer via a prefix arg. See Part-II/Item-2 below. ps: I am following up this mail with a consolidated patch, just in case someone needs to try stuff out. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=bug11095-part5.patch Content-Description: bug11095-part5.patch === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-12 16:19:16 +0000 +++ lisp/ChangeLog 2012-10-12 18:03:45 +0000 @@ -1,5 +1,10 @@ 2012-10-12 Jambunathan K + * hi-lock.el (hi-lock-unface-buffer): With prefix arg, unhighlight + all hi-lock patterns in buffer. + +2012-10-12 Jambunathan K + * hi-lock.el (hi-lock-unface-buffer): Prompt user with useful defaults. Specifically, if cursor is on an highlighted text, offer a regexp that matches that text as the default. Update === modified file 'lisp/hi-lock.el' --- lisp/hi-lock.el 2012-10-12 16:19:16 +0000 +++ lisp/hi-lock.el 2012-10-12 17:35:34 +0000 @@ -491,17 +491,18 @@ updated as you type." ;;;###autoload (defalias 'unhighlight-regexp 'hi-lock-unface-buffer) ;;;###autoload -(defun hi-lock-unface-buffer (regexp) +(defun hi-lock-unface-buffer (regexp &optional prefix-arg) "Remove highlighting of each match to REGEXP set by hi-lock. -Interactively, prompt for REGEXP. If the cursor is on a -previously highlighted text and if the associated regexp can be -inferred via simple heuristics, offer that regexp as default. -Otherwise, prompt for REGEXP with completion and limit the -choices to only those regexps used previously with hi-lock -commands. +Interactively, when PREFIX-ARG is non-nil, unhighlight all +highlighted text in current buffer. When PREFIX-ARG is nil, +prompt for REGEXP. If the cursor is on a previously highlighted +text and if the associated regexp can be inferred via simple +heuristics, offer that regexp as default. Otherwise, prompt for +REGEXP with completion and limit the choices to only those +regexps used previously with hi-lock commands. -If this command is invoked via menu, make no attempt to infer -REGEXP from text at point." +If this command is invoked via menu, pop-up a list of currently +highlighted patterns." (interactive (if (and (display-popup-menus-p) (listp last-nonmenu-event) @@ -570,18 +571,22 @@ REGEXP from text at point." ;; a reasonable default. (caar candidate-hi-lock-patterns)))))) (list + (and (not current-prefix-arg) (completing-read "Regexp to unhighlight: " (or candidate-hi-lock-patterns hi-lock-interactive-patterns) - nil t default-regexp))))) - (let ((keyword (assoc regexp hi-lock-interactive-patterns))) + nil t default-regexp)) + current-prefix-arg)))) + (dolist (re (if (not prefix-arg) (list regexp) + (mapcar #'car hi-lock-interactive-patterns))) + (let ((keyword (assoc re hi-lock-interactive-patterns))) (when keyword (font-lock-remove-keywords nil (list keyword)) (setq hi-lock-interactive-patterns (delq keyword hi-lock-interactive-patterns)) (remove-overlays - nil nil 'hi-lock-overlay-regexp (hi-lock-string-serialize regexp)) - (when font-lock-fontified (font-lock-fontify-buffer))))) + nil nil 'hi-lock-overlay-regexp (hi-lock-string-serialize re)) + (when font-lock-fontified (font-lock-fontify-buffer)))))) ;;;###autoload (defun hi-lock-write-interactive-patterns () --=-=-= Content-Type: text/plain > Proposal is in two parts. Part-I deals with `hi-lock-face-buffer'. > Part-II deals with `unhighlight-regexp'. Part-III has a dump of the > current customization I have in my .emacs. > > I believe that my proposal is useful in general. So I request that it > be folded in to Emacs-24.1. > > Part-I: `hi-lock-face-buffer' & Co. > ---------------------------------- > > 1) Review the face names used in `hi-lock-face-defaults' and make the > faces customizable. The defaults may not look good on a user's his > own font-lock configuration. > > 2) Make `hi-lock-face-buffer' use a different face on each invocation. > > Here is a real-world usecase for the above request. > > As a programmer, I use highlighting to trace variable dependencies > within a function. For example, in the example below, after > highlighting the variables in __different__ faces, I will come to the > conclusion that "a" depends on "d" and "tmp". > > c = d; > b = c + tmp; > a = b; > > And I use this very often to track variables and how they get their > values from. > > If I were to use the default Emacs provided behaviour then I would > have to press M-n multiple times as I highlight more and more > symbols. (Typically I have 3-5 symbols highlighted before I turn off > highlighting.) > > See elisp snippet at the end of the mail. > > > Part-II: `unhighlight-regexp' > ------------------------------ > > See usecase in Part-I/Item-2 > > 1) I want to selectively turn-off highlighting for certain regexps > (arguably) that _specific_ highlighted regexp cursor is stationed on. > This would happen when I decide that I don't want to factor a > particular variable for my current refactoring exercise. > > I find the current behaviour of `unhighlight-regexp' slightly > tedious. > > 1. There is no completion for which regexp I want to unhighlight and > I have to circle through `hi-lock-interactive-patterns'. > > 2. Browsing the `hi-lock-interactive-patterns' is tedious for the > following reasons: > > - The order in which unhighlighting happens could totally be > unrelated to the order in which highlighting happens. When I am > analyzing the variable flow, I don't want to do a "context > switch" trying to find out what item to choose from the > `unhighlight-regexp' menu. > > 2) I want to unhighlight all regexps. This happens when I am done with > variable analysis. > > > ps: I am not questioning the current defaults. I am only saying that it > the current behaviour is too generic to be immediately useful (atleast > for my usecase) and so needs some sort of extra augmentation. > > Part-III: Elisp snippet > ----------------------- > > ;; Why should the color of the faces be encoded in the variable name? > ;; Seems counter-intutitive to me. I cannot relate to a hi-yellow > ;; face customized to render in red. > > ;; (defvar hi-lock-face-defaults > ;; '("hi-yellow" "hi-pink" "hi-green" "hi-blue" "hi-black-b" > ;; "hi-blue-b" "hi-red-b" "hi-green-b" "hi-black-hb") > ;; "Default faces for hi-lock interactive functions.") > > ;; So roll out my own face for highlighting. Make them > ;; __customizable__. Note that the name of the face doesn't say what > ;; the color of the highlight will be. Works for the color theme that > ;; I have. > (custom-set-faces > '(highlight1 ((t (:background "yellow" :foreground "black")))) > '(highlight2 ((t (:background "OrangeRed" :foreground "black")))) > '(highlight3 ((((class color) (background dark)) (:background "AntiqueWhite" :foreground "black")))) > '(highlight4 ((t (:background "SystemHotTrackingColor")))) > '(highlight5 ((t (:background "VioletRed" :foreground "black"))))) > > ;; override the Emacs default > (setq hi-lock-face-defaults > '("highlight1" "highlight2" "highlight3" "highlight4" "highlight5")) > > (defvar hi-lock-faces > (let ((l (copy-list hi-lock-face-defaults))) > (setcdr (last l) l)) > "Circular list of faces in `hi-lock-face-defaults'.") > > ;; make `hi-lock-faces' buffer local > (make-variable-buffer-local 'hi-lock-faces) > > (defun highlight-symbol () > "Highlight symbol at point. > For illustartion only. Note the use of `hi-lock-face-buffer'. > Choose a new face from `hi-lock-faces' on each invocation. > Overrides the default behaviour in vanilla Emacs which is to use > the face at the head of the list." > (interactive) > (hi-lock-face-buffer > (concat "\\_<" (regexp-quote (thing-at-point 'symbol)) "\\_>") > ;; rotate the face list > (prog1 (car hi-lock-faces) > (setq hi-lock-faces (cdr hi-lock-faces))))) > > (defun my-unhighlight-regexp (arg) > "Wrapper around `unhighlight-regexp'. > With a prefix argument, turn off all highlighting. > > TODO: Check if the symbol is right now on a highlighted regexp. > If yes, unhighlight only that regexp." > (interactive "P") > (if arg > (mapc (lambda (p) > (unhighlight-regexp (car p))) > hi-lock-interactive-patterns) > (call-interactively 'unhighlight-regexp))) > > > > -- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 12 15:31:59 2012 Received: (at 11095) by debbugs.gnu.org; 12 Oct 2012 19:31:59 +0000 Received: from localhost ([127.0.0.1]:41453 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TMkxh-0006Ga-1l for submit@debbugs.gnu.org; Fri, 12 Oct 2012 15:31:59 -0400 Received: from mail-pb0-f44.google.com ([209.85.160.44]:39636) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TMkxc-0006GG-8S for 11095@debbugs.gnu.org; Fri, 12 Oct 2012 15:31:55 -0400 Received: by mail-pb0-f44.google.com with SMTP id ro8so3191109pbb.3 for <11095@debbugs.gnu.org>; Fri, 12 Oct 2012 12:30:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version:content-type; bh=kBQLM/VANex5R4mx5Z9xOO0293ILkfbq7fgpAzUsVBc=; b=QRSWMJUDZmL3kYva+XMZ+vYFTDqwscx/+3svOBLruZ+ylfdENiM1GeufjnHKLxXIOb cCX/aNWfli0n1Gm86DBuq0Y5TQuBiovltYqILJg18aXbw0QoB20gOD/KzbyAxI1M8k2i BPsxkbns9GJomBpRZ31GziuA4nyZERY4hcOmEYOu8C+1AIe5u7v8/FzMkC3bD6MtYSmK H5oEHcmjiVfkqyrDJ+wJkoXwWPFOWrZxjMOvTifAEyBmuijRoG5n3x4ORf4eyviMUWQM SifOTWbNBd6PTPx7bTyGffM5DrCvM6WFYq5oFb9tzfYfE7IUbzUxV/8Iibnh6HkJE0iL Cs2g== Received: by 10.68.240.36 with SMTP id vx4mr16252498pbc.89.1350070254706; Fri, 12 Oct 2012 12:30:54 -0700 (PDT) Received: from debian-6.05 ([115.184.0.74]) by mx.google.com with ESMTPS id n7sm4766068pav.26.2012.10.12.12.30.50 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 12 Oct 2012 12:30:53 -0700 (PDT) From: Jambunathan K To: 11095@debbugs.gnu.org Subject: [FINAL] Re: bug#11095: 24.0.94; hi-lock-face-buffer/unhighlight-regexp': Augment? References: <81d37z271c.fsf@gmail.com> Date: Sat, 13 Oct 2012 01:02:24 +0530 In-Reply-To: <81d37z271c.fsf@gmail.com> (Jambunathan K.'s message of "Mon, 26 Mar 2012 12:16:55 +0530") Message-ID: <87391jwkon.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 11095 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 (--) --=-=-= Content-Type: text/plain Here goes the final set for this bug. The revnos. reflect the (local) bzr revision. 0. bug11095-final-r110525.diff :: Consolidated final patch. 1. bug11095-r110501.diff :: Introduce hi-lock-* faces. 2. bug11095-r110502.diff :: Let each highlight command choose a new face 3. bug11095-r110503.diff :: By default, highlight symbol at point 4. bug11095-r110504.diff :: Un-highlight text at point 5. bug11095-r110505.diff :: Un-highlight all highlighted text --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=bug11095-final-r110525.diff === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-12 01:01:50 +0000 +++ lisp/ChangeLog 2012-10-12 19:15:47 +0000 @@ -1,3 +1,25 @@ +2012-10-12 Jambunathan K + + * replace.el (read-regexp): Tighten the regexp that matches tag. + When tag is retrieved with `find-tag-default', use regexp that + matches symbol at point. Also update docstring. + + * hi-lock.el (hi-yellow, hi-pink, hi-green, hi-blue, hi-black-b) + (hi-blue-b, hi-green-b, hi-red-b, hi-black-hb): Mark these faces + as obsolete. + (hi-lock-1, hi-lock-2, hi-lock-3, hi-lock-4, hi-lock-5, hi-lock-6) + (hi-lock-7, hi-lock-8, hi-lock-9): New faces. + (hi-lock-face-defaults): Use new faces. + (hi-lock-auto-select-face): New user variable. + (hi-lock-auto-select-face-defaults): New buffer local variable. + (hi-lock-read-face-name): Honor `hi-lock-auto-select-face'. + (hi-lock-line-face-buffer, hi-lock-face-buffer) + (hi-lock-face-phrase-buffer): Don't provide a default to + `read-regexp'. Effectively, the default regexp offered by + `read-regexp' matches tag at point. Use new faces. + (hi-lock-unface-buffer): Add support for unhighlighting (a) text + at point (b) all highlighted text in buffer. (Bug#11095) + 2012-10-12 Glenn Morris * mail/rmailsum.el (rmail-header-summary): === modified file 'lisp/hi-lock.el' --- lisp/hi-lock.el 2012-10-07 00:27:31 +0000 +++ lisp/hi-lock.el 2012-10-12 19:15:47 +0000 @@ -135,12 +135,20 @@ ;; It can have a function value. (put 'hi-lock-file-patterns-policy 'risky-local-variable t) +(defcustom hi-lock-auto-select-face nil + "Non-nil if highlighting commands should not prompt for face names. +When non-nil, each hi-lock command will cycle through faces in +`hi-lock-face-defaults'." + :type 'boolean + :group 'hi-lock + :version "24.3") + (defgroup hi-lock-faces nil "Faces for hi-lock." :group 'hi-lock :group 'faces) -(defface hi-yellow +(defface hi-lock-1 '((((min-colors 88) (background dark)) (:background "yellow1" :foreground "black")) (((background dark)) (:background "yellow" :foreground "black")) @@ -149,13 +157,13 @@ "Default face for hi-lock mode." :group 'hi-lock-faces) -(defface hi-pink +(defface hi-lock-2 '((((background dark)) (:background "pink" :foreground "black")) (t (:background "pink"))) "Face for hi-lock mode." :group 'hi-lock-faces) -(defface hi-green +(defface hi-lock-3 '((((min-colors 88) (background dark)) (:background "green1" :foreground "black")) (((background dark)) (:background "green" :foreground "black")) @@ -164,40 +172,50 @@ "Face for hi-lock mode." :group 'hi-lock-faces) -(defface hi-blue +(defface hi-lock-4 '((((background dark)) (:background "light blue" :foreground "black")) (t (:background "light blue"))) "Face for hi-lock mode." :group 'hi-lock-faces) -(defface hi-black-b +(defface hi-lock-5 '((t (:weight bold))) "Face for hi-lock mode." :group 'hi-lock-faces) -(defface hi-blue-b +(defface hi-lock-6 '((((min-colors 88)) (:weight bold :foreground "blue1")) (t (:weight bold :foreground "blue"))) "Face for hi-lock mode." :group 'hi-lock-faces) -(defface hi-green-b +(defface hi-lock-7 '((((min-colors 88)) (:weight bold :foreground "green1")) (t (:weight bold :foreground "green"))) "Face for hi-lock mode." :group 'hi-lock-faces) -(defface hi-red-b +(defface hi-lock-8 '((((min-colors 88)) (:weight bold :foreground "red1")) (t (:weight bold :foreground "red"))) "Face for hi-lock mode." :group 'hi-lock-faces) -(defface hi-black-hb +(defface hi-lock-9 '((t (:weight bold :height 1.67 :inherit variable-pitch))) "Face for hi-lock mode." :group 'hi-lock-faces) +(define-obsolete-face-alias 'hi-yellow 'hi-lock-1 "24.3") +(define-obsolete-face-alias 'hi-pink 'hi-lock-2 "24.3") +(define-obsolete-face-alias 'hi-green 'hi-lock-3 "24.3") +(define-obsolete-face-alias 'hi-blue 'hi-lock-4 "24.3") +(define-obsolete-face-alias 'hi-black-b 'hi-lock-5 "24.3") +(define-obsolete-face-alias 'hi-blue-b 'hi-lock-6 "24.3") +(define-obsolete-face-alias 'hi-green-b 'hi-lock-7 "24.3") +(define-obsolete-face-alias 'hi-red-b 'hi-lock-8 "24.3") +(define-obsolete-face-alias 'hi-black-hb 'hi-lock-9 "24.3") + (defvar hi-lock-file-patterns nil "Patterns found in file for hi-lock. Should not be changed.") @@ -207,12 +225,19 @@ (define-obsolete-variable-alias 'hi-lock-face-history 'hi-lock-face-defaults "23.1") (defvar hi-lock-face-defaults - '("hi-yellow" "hi-pink" "hi-green" "hi-blue" "hi-black-b" - "hi-blue-b" "hi-red-b" "hi-green-b" "hi-black-hb") + '("hi-lock-1" "hi-lock-2" "hi-lock-3" "hi-lock-4" "hi-lock-5" + "hi-lock-6" "hi-lock-7" "hi-lock-8" "hi-lock-9") "Default faces for hi-lock interactive functions.") -;;(dolist (f hi-lock-face-defaults) -;; (unless (facep f) (error "%s not a face" f))) +(defvar hi-lock-auto-select-face-defaults + (let ((l (copy-sequence hi-lock-face-defaults))) + (setcdr (last l) l)) + "Circular list of faces used for interactive highlighting. +When `hi-lock-auto-select-face' is non-nil, use the face at the +head of this list for next interactive highlighting. See also +`hi-lock-read-face-name'.") + +(make-variable-buffer-local 'hi-lock-auto-select-face-defaults) (define-obsolete-variable-alias 'hi-lock-regexp-history 'regexp-history @@ -408,9 +433,9 @@ (interactive (list (hi-lock-regexp-okay - (read-regexp "Regexp to highlight line" (car regexp-history))) + (read-regexp "Regexp to highlight line")) (hi-lock-read-face-name))) - (or (facep face) (setq face 'hi-yellow)) + (or (facep face) (setq face 'hi-lock-1)) (unless hi-lock-mode (hi-lock-mode 1)) (hi-lock-set-pattern ;; The \\(?:...\\) grouping construct ensures that a leading ^, +, * or ? @@ -433,9 +458,9 @@ (interactive (list (hi-lock-regexp-okay - (read-regexp "Regexp to highlight" (car regexp-history))) + (read-regexp "Regexp to highlight")) (hi-lock-read-face-name))) - (or (facep face) (setq face 'hi-yellow)) + (or (facep face) (setq face 'hi-lock-1)) (unless hi-lock-mode (hi-lock-mode 1)) (hi-lock-set-pattern regexp face)) @@ -455,9 +480,9 @@ (list (hi-lock-regexp-okay (hi-lock-process-phrase - (read-regexp "Phrase to highlight" (car regexp-history)))) + (read-regexp "Phrase to highlight"))) (hi-lock-read-face-name))) - (or (facep face) (setq face 'hi-yellow)) + (or (facep face) (setq face 'hi-lock-1)) (unless hi-lock-mode (hi-lock-mode 1)) (hi-lock-set-pattern regexp face)) @@ -466,10 +491,18 @@ ;;;###autoload (defalias 'unhighlight-regexp 'hi-lock-unface-buffer) ;;;###autoload -(defun hi-lock-unface-buffer (regexp) +(defun hi-lock-unface-buffer (regexp &optional prefix-arg) "Remove highlighting of each match to REGEXP set by hi-lock. -Interactively, prompt for REGEXP, accepting only regexps -previously inserted by hi-lock interactive functions." +Interactively, when PREFIX-ARG is non-nil, unhighlight all +highlighted text in current buffer. When PREFIX-ARG is nil, +prompt for REGEXP. If the cursor is on a previously highlighted +text and if the associated regexp can be inferred via simple +heuristics, offer that regexp as default. Otherwise, prompt for +REGEXP with completion and limit the choices to only those +regexps used previously with hi-lock commands. + +If this command is invoked via menu, pop-up a list of currently +highlighted patterns." (interactive (if (and (display-popup-menus-p) (listp last-nonmenu-event) @@ -497,23 +530,63 @@ ;; To prevent that, we return an empty string, which will ;; effectively disable the rest of the function. (throw 'snafu '("")))) - (let ((history-list (mapcar (lambda (p) (car p)) - hi-lock-interactive-patterns))) - (unless hi-lock-interactive-patterns - (error "No highlighting to remove")) + ;; Un-highlighting triggered via keyboard action. + (unless hi-lock-interactive-patterns + (error "No highlighting to remove")) + ;; Infer the regexp to un-highlight based on cursor position. + (let* (candidate-hi-lock-patterns + (default-regexp + (or + ;; When using overlays, there is no ambiguity on the best + ;; choice of regexp. + (let ((desired-serial (get-char-property + (point) 'hi-lock-overlay-regexp))) + (when desired-serial + (catch 'regexp + (maphash + (lambda (regexp serial) + (when (= serial desired-serial) + (throw 'regexp regexp))) + hi-lock-string-serialize-hash)))) + ;; With font-locking on, check if the cursor is on an + ;; highlighted text. Checking for hi-lock face is a + ;; good heuristic. + (and (string-match "\\`hi-lock-" (face-name (face-at-point))) + (let* ((hi-text + (buffer-substring-no-properties + (previous-single-property-change (point) 'face) + (next-single-property-change (point) 'face)))) + ;; Compute hi-lock patterns that match the + ;; highlighted text at point. Use this later in + ;; during completing-read. + (setq candidate-hi-lock-patterns + (delq nil + (mapcar + (lambda (hi-lock-pattern) + (let ((regexp (car hi-lock-pattern))) + (and (string-match regexp hi-text) + hi-lock-pattern))) + hi-lock-interactive-patterns))) + ;; Use regexp from the first matching pattern as + ;; a reasonable default. + (caar candidate-hi-lock-patterns)))))) (list - (completing-read "Regexp to unhighlight: " - hi-lock-interactive-patterns nil t - (car (car hi-lock-interactive-patterns)) - (cons 'history-list 1)))))) - (let ((keyword (assoc regexp hi-lock-interactive-patterns))) - (when keyword - (font-lock-remove-keywords nil (list keyword)) - (setq hi-lock-interactive-patterns - (delq keyword hi-lock-interactive-patterns)) - (remove-overlays - nil nil 'hi-lock-overlay-regexp (hi-lock-string-serialize regexp)) - (when font-lock-fontified (font-lock-fontify-buffer))))) + (and (not current-prefix-arg) + (completing-read "Regexp to unhighlight: " + (or candidate-hi-lock-patterns + hi-lock-interactive-patterns) + nil t default-regexp)) + current-prefix-arg)))) + (dolist (re (if (not prefix-arg) (list regexp) + (mapcar #'car hi-lock-interactive-patterns))) + (let ((keyword (assoc re hi-lock-interactive-patterns))) + (when keyword + (font-lock-remove-keywords nil (list keyword)) + (setq hi-lock-interactive-patterns + (delq keyword hi-lock-interactive-patterns)) + (remove-overlays + nil nil 'hi-lock-overlay-regexp (hi-lock-string-serialize re)) + (when font-lock-fontified (font-lock-fontify-buffer)))))) ;;;###autoload (defun hi-lock-write-interactive-patterns () @@ -567,20 +640,28 @@ regexp)) (defun hi-lock-read-face-name () - "Read face name from minibuffer with completion and history." - (intern (completing-read - "Highlight using face: " - obarray 'facep t - (cons (car hi-lock-face-defaults) - (let ((prefix - (try-completion - (substring (car hi-lock-face-defaults) 0 1) - hi-lock-face-defaults))) - (if (and (stringp prefix) - (not (equal prefix (car hi-lock-face-defaults)))) - (length prefix) 0))) - 'face-name-history - (cdr hi-lock-face-defaults)))) + "Return face name for interactive highlighting. +When `hi-lock-auto-select-face' is non-nil, return head of +`hi-lock-auto-select-face-defaults'. Otherwise, read face name +from minibuffer with completion and history." + (if hi-lock-auto-select-face + ;; Return current head and rotate the face list. + (prog1 (intern (car hi-lock-auto-select-face-defaults)) + (setq hi-lock-auto-select-face-defaults + (cdr hi-lock-auto-select-face-defaults))) + (intern (completing-read + "Highlight using face: " + obarray 'facep t + (cons (car hi-lock-face-defaults) + (let ((prefix + (try-completion + (substring (car hi-lock-face-defaults) 0 1) + hi-lock-face-defaults))) + (if (and (stringp prefix) + (not (equal prefix (car hi-lock-face-defaults)))) + (length prefix) 0))) + 'face-name-history + (cdr hi-lock-face-defaults))))) (defun hi-lock-set-pattern (regexp face) "Highlight REGEXP with face FACE." === modified file 'lisp/replace.el' --- lisp/replace.el 2012-10-04 19:28:11 +0000 +++ lisp/replace.el 2012-10-12 19:15:47 +0000 @@ -585,27 +585,32 @@ When PROMPT doesn't end with a colon and space, it adds a final \": \". If DEFAULTS is non-nil, it displays the first default in the prompt. -Non-nil optional arg DEFAULTS is a string or a list of strings that -are prepended to a list of standard default values, which include the -string at point, the last isearch regexp, the last isearch string, and -the last replacement regexp. +Optional arg DEFAULTS is a string or a list of strings that are +prepended to a list of standard default values, which include the +tag at point, the last isearch regexp, the last isearch string, +and the last replacement regexp. Non-nil HISTORY is a symbol to use for the history list. If HISTORY is nil, `regexp-history' is used." - (let* ((default (if (consp defaults) (car defaults) defaults)) - (defaults + (let* ((defaults (append (if (listp defaults) defaults (list defaults)) - (list (regexp-quote - (or (funcall (or find-tag-default-function - (get major-mode 'find-tag-default-function) - 'find-tag-default)) - "")) - (car regexp-search-ring) - (regexp-quote (or (car search-ring) "")) - (car (symbol-value - query-replace-from-history-variable))))) + (list + ;; Regexp for tag at point. + (let* ((tagf (or find-tag-default-function + (get major-mode 'find-tag-default-function) + 'find-tag-default)) + (tag (funcall tagf))) + (cond ((not tag) "") + ((eq tagf 'find-tag-default) + (format "\\_<%s\\_>" (regexp-quote tag))) + (t (regexp-quote tag)))) + (car regexp-search-ring) + (regexp-quote (or (car search-ring) "")) + (car (symbol-value + query-replace-from-history-variable))))) (defaults (delete-dups (delq nil (delete "" defaults)))) + (default (car defaults)) ;; Do not automatically add default to the history for empty input. (history-add-new-input nil) (input (read-from-minibuffer --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=bug11095-r110501.diff === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-10 14:45:26 +0000 +++ lisp/ChangeLog 2012-10-10 20:23:49 +0000 @@ -1,3 +1,14 @@ +2012-10-10 Jambunathan K + + * hi-lock.el (hi-yellow, hi-pink, hi-green, hi-blue, hi-black-b) + (hi-blue-b, hi-green-b, hi-red-b, hi-black-hb): Mark these faces + as obsolete. + (hi-lock-1, hi-lock-2, hi-lock-3, hi-lock-4, hi-lock-5, hi-lock-6) + (hi-lock-7, hi-lock-8, hi-lock-9): New faces. + (hi-lock-face-defaults, hi-lock-line-face-buffer) + (hi-lock-face-buffer, hi-lock-face-phrase-buffer): Propagate above + changes. + 2012-10-10 Kenichi Handa * select.el (xselect--encode-string): If a coding is specified for === modified file 'lisp/hi-lock.el' --- lisp/hi-lock.el 2012-10-07 00:27:31 +0000 +++ lisp/hi-lock.el 2012-10-10 20:23:49 +0000 @@ -140,7 +140,7 @@ :group 'hi-lock :group 'faces) -(defface hi-yellow +(defface hi-lock-1 '((((min-colors 88) (background dark)) (:background "yellow1" :foreground "black")) (((background dark)) (:background "yellow" :foreground "black")) @@ -149,13 +149,13 @@ "Default face for hi-lock mode." :group 'hi-lock-faces) -(defface hi-pink +(defface hi-lock-2 '((((background dark)) (:background "pink" :foreground "black")) (t (:background "pink"))) "Face for hi-lock mode." :group 'hi-lock-faces) -(defface hi-green +(defface hi-lock-3 '((((min-colors 88) (background dark)) (:background "green1" :foreground "black")) (((background dark)) (:background "green" :foreground "black")) @@ -164,40 +164,50 @@ "Face for hi-lock mode." :group 'hi-lock-faces) -(defface hi-blue +(defface hi-lock-4 '((((background dark)) (:background "light blue" :foreground "black")) (t (:background "light blue"))) "Face for hi-lock mode." :group 'hi-lock-faces) -(defface hi-black-b +(defface hi-lock-5 '((t (:weight bold))) "Face for hi-lock mode." :group 'hi-lock-faces) -(defface hi-blue-b +(defface hi-lock-6 '((((min-colors 88)) (:weight bold :foreground "blue1")) (t (:weight bold :foreground "blue"))) "Face for hi-lock mode." :group 'hi-lock-faces) -(defface hi-green-b +(defface hi-lock-7 '((((min-colors 88)) (:weight bold :foreground "green1")) (t (:weight bold :foreground "green"))) "Face for hi-lock mode." :group 'hi-lock-faces) -(defface hi-red-b +(defface hi-lock-8 '((((min-colors 88)) (:weight bold :foreground "red1")) (t (:weight bold :foreground "red"))) "Face for hi-lock mode." :group 'hi-lock-faces) -(defface hi-black-hb +(defface hi-lock-9 '((t (:weight bold :height 1.67 :inherit variable-pitch))) "Face for hi-lock mode." :group 'hi-lock-faces) +(define-obsolete-face-alias 'hi-yellow 'hi-lock-1 "24.3") +(define-obsolete-face-alias 'hi-pink 'hi-lock-2 "24.3") +(define-obsolete-face-alias 'hi-green 'hi-lock-3 "24.3") +(define-obsolete-face-alias 'hi-blue 'hi-lock-4 "24.3") +(define-obsolete-face-alias 'hi-black-b 'hi-lock-5 "24.3") +(define-obsolete-face-alias 'hi-blue-b 'hi-lock-6 "24.3") +(define-obsolete-face-alias 'hi-green-b 'hi-lock-7 "24.3") +(define-obsolete-face-alias 'hi-red-b 'hi-lock-8 "24.3") +(define-obsolete-face-alias 'hi-black-hb 'hi-lock-9 "24.3") + (defvar hi-lock-file-patterns nil "Patterns found in file for hi-lock. Should not be changed.") @@ -207,8 +217,8 @@ (define-obsolete-variable-alias 'hi-lock-face-history 'hi-lock-face-defaults "23.1") (defvar hi-lock-face-defaults - '("hi-yellow" "hi-pink" "hi-green" "hi-blue" "hi-black-b" - "hi-blue-b" "hi-red-b" "hi-green-b" "hi-black-hb") + '("hi-lock-1" "hi-lock-2" "hi-lock-3" "hi-lock-4" "hi-lock-5" + "hi-lock-6" "hi-lock-7" "hi-lock-8" "hi-lock-9") "Default faces for hi-lock interactive functions.") ;;(dolist (f hi-lock-face-defaults) @@ -410,7 +420,7 @@ (hi-lock-regexp-okay (read-regexp "Regexp to highlight line" (car regexp-history))) (hi-lock-read-face-name))) - (or (facep face) (setq face 'hi-yellow)) + (or (facep face) (setq face 'hi-lock-1)) (unless hi-lock-mode (hi-lock-mode 1)) (hi-lock-set-pattern ;; The \\(?:...\\) grouping construct ensures that a leading ^, +, * or ? @@ -435,7 +445,7 @@ (hi-lock-regexp-okay (read-regexp "Regexp to highlight" (car regexp-history))) (hi-lock-read-face-name))) - (or (facep face) (setq face 'hi-yellow)) + (or (facep face) (setq face 'hi-lock-1)) (unless hi-lock-mode (hi-lock-mode 1)) (hi-lock-set-pattern regexp face)) @@ -457,7 +467,7 @@ (hi-lock-process-phrase (read-regexp "Phrase to highlight" (car regexp-history)))) (hi-lock-read-face-name))) - (or (facep face) (setq face 'hi-yellow)) + (or (facep face) (setq face 'hi-lock-1)) (unless hi-lock-mode (hi-lock-mode 1)) (hi-lock-set-pattern regexp face)) --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=bug11095-r110502.diff === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-10 20:23:49 +0000 +++ lisp/ChangeLog 2012-10-10 22:01:18 +0000 @@ -1,5 +1,11 @@ 2012-10-10 Jambunathan K + * hi-lock.el (hi-lock-auto-select-face): New user variable. + (hi-lock-auto-select-face-defaults): New buffer local variable. + (hi-lock-read-face-name): Honor `hi-lock-auto-select-face'. + +2012-10-10 Jambunathan K + * hi-lock.el (hi-yellow, hi-pink, hi-green, hi-blue, hi-black-b) (hi-blue-b, hi-green-b, hi-red-b, hi-black-hb): Mark these faces as obsolete. === modified file 'lisp/hi-lock.el' --- lisp/hi-lock.el 2012-10-10 20:23:49 +0000 +++ lisp/hi-lock.el 2012-10-10 22:01:18 +0000 @@ -135,6 +135,14 @@ ;; It can have a function value. (put 'hi-lock-file-patterns-policy 'risky-local-variable t) +(defcustom hi-lock-auto-select-face nil + "Non-nil if highlighting commands should not prompt for face names. +When non-nil, each hi-lock command will cycle through faces in +`hi-lock-face-defaults'." + :type 'boolean + :group 'hi-lock + :version "24.3") + (defgroup hi-lock-faces nil "Faces for hi-lock." :group 'hi-lock @@ -221,8 +229,15 @@ "hi-lock-6" "hi-lock-7" "hi-lock-8" "hi-lock-9") "Default faces for hi-lock interactive functions.") -;;(dolist (f hi-lock-face-defaults) -;; (unless (facep f) (error "%s not a face" f))) +(defvar hi-lock-auto-select-face-defaults + (let ((l (copy-sequence hi-lock-face-defaults))) + (setcdr (last l) l)) + "Circular list of faces used for interactive highlighting. +When `hi-lock-auto-select-face' is non-nil, use the face at the +head of this list for next interactive highlighting. See also +`hi-lock-read-face-name'.") + +(make-variable-buffer-local 'hi-lock-auto-select-face-defaults) (define-obsolete-variable-alias 'hi-lock-regexp-history 'regexp-history @@ -577,20 +592,28 @@ regexp)) (defun hi-lock-read-face-name () - "Read face name from minibuffer with completion and history." - (intern (completing-read - "Highlight using face: " - obarray 'facep t - (cons (car hi-lock-face-defaults) - (let ((prefix - (try-completion - (substring (car hi-lock-face-defaults) 0 1) - hi-lock-face-defaults))) - (if (and (stringp prefix) - (not (equal prefix (car hi-lock-face-defaults)))) - (length prefix) 0))) - 'face-name-history - (cdr hi-lock-face-defaults)))) + "Return face name for interactive highlighting. +When `hi-lock-auto-select-face' is non-nil, return head of +`hi-lock-auto-select-face-defaults'. Otherwise, read face name +from minibuffer with completion and history." + (if hi-lock-auto-select-face + ;; Return current head and rotate the face list. + (prog1 (car hi-lock-auto-select-face-defaults) + (setq hi-lock-auto-select-face-defaults + (cdr hi-lock-auto-select-face-defaults))) + (intern (completing-read + "Highlight using face: " + obarray 'facep t + (cons (car hi-lock-face-defaults) + (let ((prefix + (try-completion + (substring (car hi-lock-face-defaults) 0 1) + hi-lock-face-defaults))) + (if (and (stringp prefix) + (not (equal prefix (car hi-lock-face-defaults)))) + (length prefix) 0))) + 'face-name-history + (cdr hi-lock-face-defaults))))) (defun hi-lock-set-pattern (regexp face) "Highlight REGEXP with face FACE." --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=bug11095-r110503.diff === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-10 22:01:18 +0000 +++ lisp/ChangeLog 2012-10-11 20:39:05 +0000 @@ -1,3 +1,15 @@ +2012-10-11 Jambunathan K + + * replace.el (read-regexp): Tighten the regexp that matches tag. + When tag is retrieved with `find-tag-default', use regexp that + matches symbol at point. Also update docstring. + * hi-lock.el (hi-lock-line-face-buffer, hi-lock-face-buffer) + (hi-lock-face-phrase-buffer): Don't provide a default to + `read-regexp'. Effectively the default regexp matches tag at + point. + (hi-lock-read-face-name): Return face as a symbol. Fix earlier + commit. + 2012-10-10 Jambunathan K * hi-lock.el (hi-lock-auto-select-face): New user variable. === modified file 'lisp/hi-lock.el' --- lisp/hi-lock.el 2012-10-10 22:01:18 +0000 +++ lisp/hi-lock.el 2012-10-11 20:39:05 +0000 @@ -433,7 +433,7 @@ (interactive (list (hi-lock-regexp-okay - (read-regexp "Regexp to highlight line" (car regexp-history))) + (read-regexp "Regexp to highlight line")) (hi-lock-read-face-name))) (or (facep face) (setq face 'hi-lock-1)) (unless hi-lock-mode (hi-lock-mode 1)) @@ -458,7 +458,7 @@ (interactive (list (hi-lock-regexp-okay - (read-regexp "Regexp to highlight" (car regexp-history))) + (read-regexp "Regexp to highlight")) (hi-lock-read-face-name))) (or (facep face) (setq face 'hi-lock-1)) (unless hi-lock-mode (hi-lock-mode 1)) @@ -480,7 +480,7 @@ (list (hi-lock-regexp-okay (hi-lock-process-phrase - (read-regexp "Phrase to highlight" (car regexp-history)))) + (read-regexp "Phrase to highlight"))) (hi-lock-read-face-name))) (or (facep face) (setq face 'hi-lock-1)) (unless hi-lock-mode (hi-lock-mode 1)) @@ -598,7 +598,7 @@ from minibuffer with completion and history." (if hi-lock-auto-select-face ;; Return current head and rotate the face list. - (prog1 (car hi-lock-auto-select-face-defaults) + (prog1 (intern (car hi-lock-auto-select-face-defaults)) (setq hi-lock-auto-select-face-defaults (cdr hi-lock-auto-select-face-defaults))) (intern (completing-read === modified file 'lisp/replace.el' --- lisp/replace.el 2012-10-04 19:28:11 +0000 +++ lisp/replace.el 2012-10-11 20:39:05 +0000 @@ -585,27 +585,32 @@ When PROMPT doesn't end with a colon and space, it adds a final \": \". If DEFAULTS is non-nil, it displays the first default in the prompt. -Non-nil optional arg DEFAULTS is a string or a list of strings that -are prepended to a list of standard default values, which include the -string at point, the last isearch regexp, the last isearch string, and -the last replacement regexp. +Optional arg DEFAULTS is a string or a list of strings that are +prepended to a list of standard default values, which include the +tag at point, the last isearch regexp, the last isearch string, +and the last replacement regexp. Non-nil HISTORY is a symbol to use for the history list. If HISTORY is nil, `regexp-history' is used." - (let* ((default (if (consp defaults) (car defaults) defaults)) - (defaults + (let* ((defaults (append (if (listp defaults) defaults (list defaults)) - (list (regexp-quote - (or (funcall (or find-tag-default-function - (get major-mode 'find-tag-default-function) - 'find-tag-default)) - "")) - (car regexp-search-ring) - (regexp-quote (or (car search-ring) "")) - (car (symbol-value - query-replace-from-history-variable))))) + (list + ;; Regexp for tag at point. + (let* ((tagf (or find-tag-default-function + (get major-mode 'find-tag-default-function) + 'find-tag-default)) + (tag (funcall tagf))) + (cond ((not tag) "") + ((eq tagf 'find-tag-default) + (format "\\_<%s\\_>" (regexp-quote tag))) + (t (regexp-quote tag)))) + (car regexp-search-ring) + (regexp-quote (or (car search-ring) "")) + (car (symbol-value + query-replace-from-history-variable))))) (defaults (delete-dups (delq nil (delete "" defaults)))) + (default (car defaults)) ;; Do not automatically add default to the history for empty input. (history-add-new-input nil) (input (read-from-minibuffer --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=bug11095-r110504.diff === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-11 20:39:05 +0000 +++ lisp/ChangeLog 2012-10-12 16:19:16 +0000 @@ -1,3 +1,10 @@ +2012-10-12 Jambunathan K + + * hi-lock.el (hi-lock-unface-buffer): Prompt user with useful + defaults. Specifically, if cursor is on an highlighted text, + offer a regexp that matches that text as the default. Update + docstring. + 2012-10-11 Jambunathan K * replace.el (read-regexp): Tighten the regexp that matches tag. === modified file 'lisp/hi-lock.el' --- lisp/hi-lock.el 2012-10-11 20:39:05 +0000 +++ lisp/hi-lock.el 2012-10-12 16:19:16 +0000 @@ -493,8 +493,15 @@ ;;;###autoload (defun hi-lock-unface-buffer (regexp) "Remove highlighting of each match to REGEXP set by hi-lock. -Interactively, prompt for REGEXP, accepting only regexps -previously inserted by hi-lock interactive functions." +Interactively, prompt for REGEXP. If the cursor is on a +previously highlighted text and if the associated regexp can be +inferred via simple heuristics, offer that regexp as default. +Otherwise, prompt for REGEXP with completion and limit the +choices to only those regexps used previously with hi-lock +commands. + +If this command is invoked via menu, make no attempt to infer +REGEXP from text at point." (interactive (if (and (display-popup-menus-p) (listp last-nonmenu-event) @@ -522,15 +529,51 @@ ;; To prevent that, we return an empty string, which will ;; effectively disable the rest of the function. (throw 'snafu '("")))) - (let ((history-list (mapcar (lambda (p) (car p)) - hi-lock-interactive-patterns))) - (unless hi-lock-interactive-patterns - (error "No highlighting to remove")) + ;; Un-highlighting triggered via keyboard action. + (unless hi-lock-interactive-patterns + (error "No highlighting to remove")) + ;; Infer the regexp to un-highlight based on cursor position. + (let* (candidate-hi-lock-patterns + (default-regexp + (or + ;; When using overlays, there is no ambiguity on the best + ;; choice of regexp. + (let ((desired-serial (get-char-property + (point) 'hi-lock-overlay-regexp))) + (when desired-serial + (catch 'regexp + (maphash + (lambda (regexp serial) + (when (= serial desired-serial) + (throw 'regexp regexp))) + hi-lock-string-serialize-hash)))) + ;; With font-locking on, check if the cursor is on an + ;; highlighted text. Checking for hi-lock face is a + ;; good heuristic. + (and (string-match "\\`hi-lock-" (face-name (face-at-point))) + (let* ((hi-text + (buffer-substring-no-properties + (previous-single-property-change (point) 'face) + (next-single-property-change (point) 'face)))) + ;; Compute hi-lock patterns that match the + ;; highlighted text at point. Use this later in + ;; during completing-read. + (setq candidate-hi-lock-patterns + (delq nil + (mapcar + (lambda (hi-lock-pattern) + (let ((regexp (car hi-lock-pattern))) + (and (string-match regexp hi-text) + hi-lock-pattern))) + hi-lock-interactive-patterns))) + ;; Use regexp from the first matching pattern as + ;; a reasonable default. + (caar candidate-hi-lock-patterns)))))) (list - (completing-read "Regexp to unhighlight: " - hi-lock-interactive-patterns nil t - (car (car hi-lock-interactive-patterns)) - (cons 'history-list 1)))))) + (completing-read "Regexp to unhighlight: " + (or candidate-hi-lock-patterns + hi-lock-interactive-patterns) + nil t default-regexp))))) (let ((keyword (assoc regexp hi-lock-interactive-patterns))) (when keyword (font-lock-remove-keywords nil (list keyword)) --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=bug11095-r110505.diff === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-12 16:19:16 +0000 +++ lisp/ChangeLog 2012-10-12 18:05:27 +0000 @@ -1,5 +1,10 @@ 2012-10-12 Jambunathan K + * hi-lock.el (hi-lock-unface-buffer): With prefix arg, unhighlight + all hi-lock patterns in buffer. + +2012-10-12 Jambunathan K + * hi-lock.el (hi-lock-unface-buffer): Prompt user with useful defaults. Specifically, if cursor is on an highlighted text, offer a regexp that matches that text as the default. Update === modified file 'lisp/hi-lock.el' --- lisp/hi-lock.el 2012-10-12 16:19:16 +0000 +++ lisp/hi-lock.el 2012-10-12 18:05:27 +0000 @@ -491,17 +491,18 @@ ;;;###autoload (defalias 'unhighlight-regexp 'hi-lock-unface-buffer) ;;;###autoload -(defun hi-lock-unface-buffer (regexp) +(defun hi-lock-unface-buffer (regexp &optional prefix-arg) "Remove highlighting of each match to REGEXP set by hi-lock. -Interactively, prompt for REGEXP. If the cursor is on a -previously highlighted text and if the associated regexp can be -inferred via simple heuristics, offer that regexp as default. -Otherwise, prompt for REGEXP with completion and limit the -choices to only those regexps used previously with hi-lock -commands. +Interactively, when PREFIX-ARG is non-nil, unhighlight all +highlighted text in current buffer. When PREFIX-ARG is nil, +prompt for REGEXP. If the cursor is on a previously highlighted +text and if the associated regexp can be inferred via simple +heuristics, offer that regexp as default. Otherwise, prompt for +REGEXP with completion and limit the choices to only those +regexps used previously with hi-lock commands. -If this command is invoked via menu, make no attempt to infer -REGEXP from text at point." +If this command is invoked via menu, pop-up a list of currently +highlighted patterns." (interactive (if (and (display-popup-menus-p) (listp last-nonmenu-event) @@ -570,18 +571,22 @@ ;; a reasonable default. (caar candidate-hi-lock-patterns)))))) (list - (completing-read "Regexp to unhighlight: " - (or candidate-hi-lock-patterns - hi-lock-interactive-patterns) - nil t default-regexp))))) - (let ((keyword (assoc regexp hi-lock-interactive-patterns))) - (when keyword - (font-lock-remove-keywords nil (list keyword)) - (setq hi-lock-interactive-patterns - (delq keyword hi-lock-interactive-patterns)) - (remove-overlays - nil nil 'hi-lock-overlay-regexp (hi-lock-string-serialize regexp)) - (when font-lock-fontified (font-lock-fontify-buffer))))) + (and (not current-prefix-arg) + (completing-read "Regexp to unhighlight: " + (or candidate-hi-lock-patterns + hi-lock-interactive-patterns) + nil t default-regexp)) + current-prefix-arg)))) + (dolist (re (if (not prefix-arg) (list regexp) + (mapcar #'car hi-lock-interactive-patterns))) + (let ((keyword (assoc re hi-lock-interactive-patterns))) + (when keyword + (font-lock-remove-keywords nil (list keyword)) + (setq hi-lock-interactive-patterns + (delq keyword hi-lock-interactive-patterns)) + (remove-overlays + nil nil 'hi-lock-overlay-regexp (hi-lock-string-serialize re)) + (when font-lock-fontified (font-lock-fontify-buffer)))))) ;;;###autoload (defun hi-lock-write-interactive-patterns () --=-=-= Content-Type: text/plain > Proposal is in two parts. Part-I deals with `hi-lock-face-buffer'. > Part-II deals with `unhighlight-regexp'. Part-III has a dump of the > current customization I have in my .emacs. > > I believe that my proposal is useful in general. So I request that it > be folded in to Emacs-24.1. > > Part-I: `hi-lock-face-buffer' & Co. > ---------------------------------- > > 1) Review the face names used in `hi-lock-face-defaults' and make the > faces customizable. The defaults may not look good on a user's his > own font-lock configuration. > > 2) Make `hi-lock-face-buffer' use a different face on each invocation. > > Here is a real-world usecase for the above request. > > As a programmer, I use highlighting to trace variable dependencies > within a function. For example, in the example below, after > highlighting the variables in __different__ faces, I will come to the > conclusion that "a" depends on "d" and "tmp". > > c = d; > b = c + tmp; > a = b; > > And I use this very often to track variables and how they get their > values from. > > If I were to use the default Emacs provided behaviour then I would > have to press M-n multiple times as I highlight more and more > symbols. (Typically I have 3-5 symbols highlighted before I turn off > highlighting.) > > See elisp snippet at the end of the mail. > > > Part-II: `unhighlight-regexp' > ------------------------------ > > See usecase in Part-I/Item-2 > > 1) I want to selectively turn-off highlighting for certain regexps > (arguably) that _specific_ highlighted regexp cursor is stationed on. > This would happen when I decide that I don't want to factor a > particular variable for my current refactoring exercise. > > I find the current behaviour of `unhighlight-regexp' slightly > tedious. > > 1. There is no completion for which regexp I want to unhighlight and > I have to circle through `hi-lock-interactive-patterns'. > > 2. Browsing the `hi-lock-interactive-patterns' is tedious for the > following reasons: > > - The order in which unhighlighting happens could totally be > unrelated to the order in which highlighting happens. When I am > analyzing the variable flow, I don't want to do a "context > switch" trying to find out what item to choose from the > `unhighlight-regexp' menu. > > 2) I want to unhighlight all regexps. This happens when I am done with > variable analysis. > > > ps: I am not questioning the current defaults. I am only saying that it > the current behaviour is too generic to be immediately useful (atleast > for my usecase) and so needs some sort of extra augmentation. --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 13 12:13:10 2012 Received: (at 11095) by debbugs.gnu.org; 13 Oct 2012 16:13:10 +0000 Received: from localhost ([127.0.0.1]:42733 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TN4Kr-0006gl-OG for submit@debbugs.gnu.org; Sat, 13 Oct 2012 12:13:10 -0400 Received: from ps18281.dreamhost.com ([69.163.218.105]:42016 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TN4Ko-0006gQ-0t for 11095@debbugs.gnu.org; Sat, 13 Oct 2012 12:13:07 -0400 Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 6CF376FA011; Sat, 13 Oct 2012 09:12:08 -0700 (PDT) From: Juri Linkov To: Jambunathan K Subject: Re: bug#11095: 24.0.94; hi-lock-face-buffer/unhighlight-regexp': Augment? Organization: JURTA References: <81d37z271c.fsf@gmail.com> <87y5jcvjsx.fsf@gmail.com> <87zk3s1vjz.fsf@mail.jurta.org> <87lifc71o0.fsf@gmail.com> Date: Sat, 13 Oct 2012 19:10:00 +0300 In-Reply-To: <87lifc71o0.fsf@gmail.com> (Jambunathan K.'s message of "Fri, 12 Oct 2012 10:00:07 +0530") Message-ID: <87vceez7ib.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 11095 Cc: 11095@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: 0.8 (/) > Have you tried the patches? I'm trying your patches now, thanks. My initial reaction was to using a symbol regexp "\\_<%s\\_>" in `read-regexp' to match a symbol at point. I think such symbol specific defaults could be specified by callers of `read-regexp' in its argument `DEFAULTS'. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 13 13:28:36 2012 Received: (at 11095) by debbugs.gnu.org; 13 Oct 2012 17:28:37 +0000 Received: from localhost ([127.0.0.1]:42753 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TN5Vs-0008Ma-Hl for submit@debbugs.gnu.org; Sat, 13 Oct 2012 13:28:36 -0400 Received: from mail-pb0-f44.google.com ([209.85.160.44]:48500) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TN5Vq-0008MN-63 for 11095@debbugs.gnu.org; Sat, 13 Oct 2012 13:28:35 -0400 Received: by mail-pb0-f44.google.com with SMTP id ro8so3773800pbb.3 for <11095@debbugs.gnu.org>; Sat, 13 Oct 2012 10:27:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=jPdPqsDUh4vAH39f8jLsYWSYiHfZTqQizSt6x/Xiz4o=; b=aXTO3LTw2RU1NEQCfCoaOaQ6ldePmQ7csWV4PfuwFwCfBdzl6THHRG+EQy677gQFHj CuS+6PalorY6WLtjh/uIYR8pPbqdj3R9i5YMqTsPwPD6mLB/33Q/0J1g9dq5QDAaEdw7 faizEGw6V48MoTe9IdUpbvhoVji1qgLh4a8e299KXHPJrenOD5uHKOE3Isl6QX4gAc3N aBNjNtnii51IV6+vT/sHrxsnl3JCJ21owAdF0dwgawfXDgp4VjUl1np84wxeqhMePtv7 zbgTs4gljFt027hUXuhcshBmSRUfVjnlATdlcSUSQ6fZr3CIcwU0JQ6T75E8/g0HkfJ7 e9IA== Received: by 10.68.234.36 with SMTP id ub4mr23646177pbc.68.1350149251357; Sat, 13 Oct 2012 10:27:31 -0700 (PDT) Received: from debian-6.05 ([115.184.23.189]) by mx.google.com with ESMTPS id n7sm6233726pav.26.2012.10.13.10.27.28 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 13 Oct 2012 10:27:30 -0700 (PDT) From: Jambunathan K To: Juri Linkov Subject: Re: bug#11095: 24.0.94; hi-lock-face-buffer/unhighlight-regexp': Augment? References: <81d37z271c.fsf@gmail.com> <87y5jcvjsx.fsf@gmail.com> <87zk3s1vjz.fsf@mail.jurta.org> <87lifc71o0.fsf@gmail.com> <87vceez7ib.fsf@mail.jurta.org> Date: Sat, 13 Oct 2012 22:58:58 +0530 In-Reply-To: <87vceez7ib.fsf@mail.jurta.org> (Juri Linkov's message of "Sat, 13 Oct 2012 19:10:00 +0300") Message-ID: <87obk6l1r9.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 11095 Cc: 11095@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: 0.1 (/) Juri Linkov writes: >> Have you tried the patches? > > I'm trying your patches now, thanks. My initial reaction was to using > a symbol regexp "\\_<%s\\_>" in `read-regexp' to match a symbol at point. > I think such symbol specific defaults could be specified by callers of > `read-regexp' in its argument `DEFAULTS'. (This is not a response to your post, but only to record my observations for further consideration by the reviewer) 1. Highlighting (M-shr) can happen via isearch or through hi-lock mode (C-xwh). I don't use isearch much. So the patch merely formalizes what I had in my .emacs and it is done with my hi-lock mode glasses. 2. In `read-regexp' there is a `find-tag-default-function' but no `find-tag-regexp-function'. i.e., `find-tag-default' returns a symbol at point. But using `regexp-quote' on the result is a poor choice when in should actually be returning a symbol regexp. (When I am renaming symbols, I highlight them and then re-name. In that case, the looser regexp is unreliable and annoying. As you may very well agree, it is not uncommon to have variables share a common prefix.) 3. `read-regexp' will use tag at point as the default regexp. If a caller - say a `highlight-symbol' function or a symbol yank from isearch context - then it is the responsibility of the caller to provide the right regexp. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 23 22:18:24 2012 Received: (at control) by debbugs.gnu.org; 24 Oct 2012 02:18:25 +0000 Received: from localhost ([127.0.0.1]:58438 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TQqY4-0001lJ-KW for submit@debbugs.gnu.org; Tue, 23 Oct 2012 22:18:24 -0400 Received: from mail-vc0-f172.google.com ([209.85.220.172]:52636) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TQqY3-0001l9-HT for control@debbugs.gnu.org; Tue, 23 Oct 2012 22:18:23 -0400 Received: by mail-vc0-f172.google.com with SMTP id fl11so43044vcb.3 for ; Tue, 23 Oct 2012 19:16:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:mime-version:content-type; bh=wtWkDqOj9lMmeQqbPB/PLz4p+5ne8OSKWZy3JRIlto4=; b=DvyBbmolSvpy+5qXJMx5+8mi+DptwEWWytD+sl2fJITctOzXeKpi+mHs/N10pepbmc bbq/8wAxz64KQlPm1WBF22YtNxXGBgK8LCLzfoWiEM9+gPyBIh+HKVWz+0bu79r5Z68D Q0EbdPwxA7YtxrlCNbFX5v0Ebm3QzbWhU3rlJcsOpwixWRkUSakgs27sZXxwb1998cc0 UUzQM86FFUYuFHbcIHhlLlZculYnHoXhFegUVEd4GBs+52gQYMYJMNy851jsJZue5/0N 29wVe5WJeX3AvTKAe0X0K7vNB7qpgffn/qZwYqr1euruSW1Mh55jfSrEoQWzjloPmToq kk/w== Received: by 10.221.11.15 with SMTP id pc15mr5659209vcb.70.1351044982945; Tue, 23 Oct 2012 19:16:22 -0700 (PDT) Received: from ulysses (173-166-11-18-newengland.hfc.comcastbusiness.net. [173.166.11.18]) by mx.google.com with ESMTPS id o17sm14982560vdf.7.2012.10.23.19.16.21 (version=SSLv3 cipher=OTHER); Tue, 23 Oct 2012 19:16:22 -0700 (PDT) From: Chong Yidong To: control@debbugs.gnu.org Subject: tags 11095 + patch Date: Wed, 24 Oct 2012 10:16:20 +0800 Message-ID: <87d308pqbv.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: control 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: 0.1 (/) tags 11095 + patch thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 04 16:14:49 2012 Received: (at 11095) by debbugs.gnu.org; 4 Dec 2012 21:14:49 +0000 Received: from localhost ([127.0.0.1]:53689 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TfzpI-0004qF-K2 for submit@debbugs.gnu.org; Tue, 04 Dec 2012 16:14:49 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:3540) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TfzpG-0004q7-KS for 11095@debbugs.gnu.org; Tue, 04 Dec 2012 16:14:47 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0FAG6Zu09soXOY/2dsb2JhbABEsEiDSYEIghYBBVYjEAs0EhQYDSQuh3O6CZBEA4hCmnGBWIMH X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="209083699" Received: from 108-161-115-152.dsl.teksavvy.com (HELO pastel.home) ([108.161.115.152]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 04 Dec 2012 16:14:42 -0500 Received: by pastel.home (Postfix, from userid 20848) id 0D4D158C73; Tue, 4 Dec 2012 16:14:42 -0500 (EST) From: Stefan Monnier To: Jambunathan K Subject: Re: bug#11095: [PATCH] Re: bug#11095: 24.0.94; hi-lock-face-buffer/unhighlight-regexp': Augment? Message-ID: References: <81d37z271c.fsf@gmail.com> <87626i2i4r.fsf@gmail.com> Date: Tue, 04 Dec 2012 16:14:41 -0500 In-Reply-To: <87626i2i4r.fsf@gmail.com> (Jambunathan K.'s message of "Thu, 11 Oct 2012 01:51:08 +0530") 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: 0.8 (/) X-Debbugs-Envelope-To: 11095 Cc: 11095@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: 0.8 (/) > -(defface hi-yellow > +(defface hi-lock-1 I'm not sure it's an improvement. When choosing a face in hi-lock-face-buffer, "hi-lock-1" doesn't speak much to me contrary to "hi-yellow". So, could you expand on your motivations for this change, so we can find another solution that satisfies your use case and mine? I've installed your second patch (the hi-lock-auto-select-face, tho using `pop' to simplify the code), but when hi-lock-auto-select-face is t the user can't specify a face any more, which I think is too drastic, which should provide a C-u override or something. I also installed the 4th patch (the defaults for unhighlight), tho I removed the docstring change (we usually don't document which default is used in minibuffer arguments). Also I moved your code to a separate function, to clarify the code. Furthermore I did not install your change to the completion table so only the regexps that match at point get completed. Instead the list of regexps is passed as a list of defaults. BTW the hi-lock-auto-select-face should be fixed to just hash-cons (aka uniquify) regexps, so you don't need your maphash loop to recover the regexp from the unique "serialized" number. I also installed the 5th patch (the "unhighlight all") tho I'm not yet sure this is the right interface. OT1H I think it would be nicer to provide this "all" as one of the choices in the minibuffer, but OTOH I can't think of any way to do that which is not hideously hackish. As for the 3rd patch, I haven't installed it yet because I'm worried that (format "\\_<%s\\_>" (regexp-quote tag)) may sometimes fail to match `tag', so I think it needs some additional sanity check. Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 04 16:39:34 2012 Received: (at 11095) by debbugs.gnu.org; 4 Dec 2012 21:39:34 +0000 Received: from localhost ([127.0.0.1]:53704 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tg0DG-0005Rl-6J for submit@debbugs.gnu.org; Tue, 04 Dec 2012 16:39:34 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:36430) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tg0DE-0005Re-9E for 11095@debbugs.gnu.org; Tue, 04 Dec 2012 16:39:33 -0500 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by userp1040.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id qB4LdQbg030924 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 4 Dec 2012 21:39:27 GMT Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id qB4LdQRr001052 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 4 Dec 2012 21:39:26 GMT Received: from abhmt119.oracle.com (abhmt119.oracle.com [141.146.116.71]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id qB4LdPfd019804; Tue, 4 Dec 2012 15:39:25 -0600 Received: from dradamslap1 (/10.159.232.171) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 04 Dec 2012 13:39:25 -0800 From: "Drew Adams" To: "'Stefan Monnier'" , "'Jambunathan K'" References: <81d37z271c.fsf@gmail.com> <87626i2i4r.fsf@gmail.com> Subject: RE: bug#11095: [PATCH] Re: bug#11095: 24.0.94; hi-lock-face-buffer/unhighlight-regexp': Augment? Date: Tue, 4 Dec 2012 13:39:21 -0800 Message-ID: <61B14D03B48D4D9E998771D3B7E4252C@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: Ac3SZG4jw10MLx6BTkWhMT+3yHcoKQAAut6Q X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Spam-Score: -1.5 (-) X-Debbugs-Envelope-To: 11095 Cc: 11095@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.5 (-) > > -(defface hi-yellow > > +(defface hi-lock-1 > > I'm not sure it's an improvement. When choosing a face in > hi-lock-face-buffer, "hi-lock-1" doesn't speak much to me contrary to > "hi-yellow". Not specifically related to this face, but it is a bad idea, in general (no doubt there are exceptions), for a face name to advertize particular face attributes, such as the color. The color is presumably something that the user can customize, and is typically not something that speaks to the use or meaning of the face. From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 04 16:57:13 2012 Received: (at 11095) by debbugs.gnu.org; 4 Dec 2012 21:57:13 +0000 Received: from localhost ([127.0.0.1]:53749 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tg0UK-0005r4-Pn for submit@debbugs.gnu.org; Tue, 04 Dec 2012 16:57:13 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:23998) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tg0UI-0005qv-UV for 11095@debbugs.gnu.org; Tue, 04 Dec 2012 16:57:11 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0FAG6Zu09soXOY/2dsb2JhbABEsEiDSYEIghUBAQQBViMFCws0EhQYDSSIHAW6CYVlil8DiEKacYFYgwc X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="209087003" Received: from 108-161-115-152.dsl.teksavvy.com (HELO pastel.home) ([108.161.115.152]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 04 Dec 2012 16:57:05 -0500 Received: by pastel.home (Postfix, from userid 20848) id 6A93758C73; Tue, 4 Dec 2012 16:57:04 -0500 (EST) From: Stefan Monnier To: "Drew Adams" Subject: Re: bug#11095: [PATCH] Re: bug#11095: 24.0.94; hi-lock-face-buffer/unhighlight-regexp': Augment? Message-ID: References: <81d37z271c.fsf@gmail.com> <87626i2i4r.fsf@gmail.com> <61B14D03B48D4D9E998771D3B7E4252C@us.oracle.com> Date: Tue, 04 Dec 2012 16:57:04 -0500 In-Reply-To: <61B14D03B48D4D9E998771D3B7E4252C@us.oracle.com> (Drew Adams's message of "Tue, 4 Dec 2012 13:39:21 -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: 0.8 (/) X-Debbugs-Envelope-To: 11095 Cc: 11095@debbugs.gnu.org, 'Jambunathan K' 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: 0.8 (/) >> > -(defface hi-yellow >> > +(defface hi-lock-1 >> I'm not sure it's an improvement. When choosing a face in >> hi-lock-face-buffer, "hi-lock-1" doesn't speak much to me contrary to >> "hi-yellow". > Not specifically related to this face, but it is a bad idea, in general (no > doubt there are exceptions), for a face name to advertize particular face > attributes, such as the color. Depends. In the present case, the face has no particular purpose, so saying that "its purpose to highlight in yellow" doesn't sound like such a bad idea. Not really worse than "its purpose is to be number 2". > The color is presumably something that the user can customize, and is > typically not something that speaks to the use or meaning of the face. "2" doesn't "speak to the use or meaning of the face" very much either. I think the real issue here is that hi-lock should have a customizable set of faces rather than a set of customizable faces. So if the user doesn't like hi-yellow (which should be called hi-lock-yellow, BTW) because she never highlights in yellow, she can replace it with her own face with the name she likes. Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 04 17:44:09 2012 Received: (at 11095) by debbugs.gnu.org; 4 Dec 2012 22:44:09 +0000 Received: from localhost ([127.0.0.1]:53784 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tg1Dk-0006v3-M5 for submit@debbugs.gnu.org; Tue, 04 Dec 2012 17:44:09 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:38277) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tg1Di-0006uv-22 for 11095@debbugs.gnu.org; Tue, 04 Dec 2012 17:44:07 -0500 Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by aserp1040.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id qB4MhxDq027289 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 4 Dec 2012 22:44:00 GMT Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id qB4MhwYS014800 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 4 Dec 2012 22:43:59 GMT Received: from abhmt109.oracle.com (abhmt109.oracle.com [141.146.116.61]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id qB4Mhwrc004550; Tue, 4 Dec 2012 16:43:58 -0600 Received: from dradamslap1 (/10.159.232.171) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 04 Dec 2012 14:43:58 -0800 From: "Drew Adams" To: "'Stefan Monnier'" References: <81d37z271c.fsf@gmail.com> <87626i2i4r.fsf@gmail.com><61B14D03B48D4D9E998771D3B7E4252C@us.oracle.com> Subject: RE: bug#11095: [PATCH] Re: bug#11095: 24.0.94; hi-lock-face-buffer/unhighlight-regexp': Augment? Date: Tue, 4 Dec 2012 14:43:53 -0800 Message-ID: <82F792DC51D24C39AEBFEE9BC6CBE335@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: Ac3Sak8n098H8YROQyOmFyVGg9CP8wAAQsZA X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-Spam-Score: -1.5 (-) X-Debbugs-Envelope-To: 11095 Cc: 11095@debbugs.gnu.org, 'Jambunathan K' 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.5 (-) > >> > -(defface hi-yellow > >> > +(defface hi-lock-1 > >> I'm not sure it's an improvement. When choosing a face in > >> hi-lock-face-buffer, "hi-lock-1" doesn't speak much to me > >> contrary to "hi-yellow". > > > > Not specifically related to this face, but it is a bad > > idea, in general (no doubt there are exceptions), for a > > face name to advertize particular face attributes, such > > as the color. > > Depends. I too suggested that it depends. But it depends on what "depends" means ;-). I.e., depends on what? The dependence I see is that there could be exceptions where the purpose/use/meaning of the face is in fact related to a particular color. > In the present case, the face has no particular purpose, So in particular, it is NOT related to any particular color, including yellow. > so saying that "its purpose to highlight in yellow" doesn't > sound like such a bad idea. That makes as much sense (to me) as to say that its name should be `hi-lock-rumpelstiltskin". Unless it is true that it really always should "highlight in yellow", regardless of the face's current color. If all we can say is that this face is about highlighting, then the only operative word is "highlight". If we can be more specific - e.g., highlighting like a marker pen, then that's what is called for. In `highlight.el', for instance, I have a command for highlighting text by dragging the mouse over it, like using a marker pen, aka a highlighter. That command is called `hlt-highlighter' (it can use any face, like all `hlt-*' commands). If `hl-lock-yellow' were intended for this kind of highlighting then you might call it `hl-lock-highlighter' or some such. I have no idea what `hl-lock-yellow' is really for. You yourself have just said that its use has nothing to do with "yellow", however. > Not really worse than "its purpose is to be number 2". Is its purpose really "to highlight in yellow"? You seem to say no, above. But if so then you probably don't need to define a customizable face for that. Just highlight in yellow. Or if the color must always be (or is always intended to be) yellow, but users can customize other face attributes, then using "yellow" in the name would make sense. In that case, the doc string should say something about this restriction/intention wrt the color being constant. > > The color is presumably something that the user can > > customize, and is typically not something that speaks > > to the use or meaning of the face. > > "2" doesn't "speak to the use or meaning of the face" very > much either. You didn't hear me argue in favor of using `2' here. Those are presumably not the only two choices: 2 vs yellow. On the other hand, if absolutely nothing can be said about this face other than it is one of N hi-lock faces (none of which we can say anything else about), then `2' is better than nothing. It is certainly better than being overly specific and misleading, and doubly certainly better than suggesting a specific face attribute such as a particular color. `hi-lock-2' does not suggest that any particular face attribute has the value `2', unless it is something like a box line width of 2 pixels. `hi-lock-yellow' misleads immediately, suggesting that the face always has the color yellow. > I think the real issue here is that hi-lock should have a customizable > set of faces rather than a set of customizable faces. > So if the user doesn't like hi-yellow (which should be called > hi-lock-yellow, BTW) because she never highlights in yellow, she can > replace it with her own face with the name she likes. Ah, in that case you are really talking, I think, about having one or more user options, which each has a face (or a set of faces) as value. I don't see how that is related to the above, however. If you call such an option `*-yellow' then its name would still be misleading, no? And if on the other hand you feel that `hi-lock-2' is OK as an option name here, but not as a face name, then I don't follow the logic. Just why would you prefer a "customizable set of faces" over a "set of customizable faces"? And how does that relate to the names? From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 04 22:46:34 2012 Received: (at 11095) by debbugs.gnu.org; 5 Dec 2012 03:46:34 +0000 Received: from localhost ([127.0.0.1]:53944 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tg5wQ-0006qJ-3H for submit@debbugs.gnu.org; Tue, 04 Dec 2012 22:46:34 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:56734) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tg5wO-0006qD-Pm for 11095@debbugs.gnu.org; Tue, 04 Dec 2012 22:46:33 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0FAG6Zu09soXOY/2dsb2JhbABEsEiDSYEIghUBAQQBViMFCws0EhQYDSSIHAW6CYVlil8DiEKacYFYgwc X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="209102758" Received: from 108-161-115-152.dsl.teksavvy.com (HELO pastel.home) ([108.161.115.152]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 04 Dec 2012 22:46:27 -0500 Received: by pastel.home (Postfix, from userid 20848) id CBD8958C73; Tue, 4 Dec 2012 22:46:23 -0500 (EST) From: Stefan Monnier To: "Drew Adams" Subject: Re: bug#11095: [PATCH] Re: bug#11095: 24.0.94; hi-lock-face-buffer/unhighlight-regexp': Augment? Message-ID: References: <81d37z271c.fsf@gmail.com> <87626i2i4r.fsf@gmail.com> <61B14D03B48D4D9E998771D3B7E4252C@us.oracle.com> <82F792DC51D24C39AEBFEE9BC6CBE335@us.oracle.com> Date: Tue, 04 Dec 2012 22:46:23 -0500 In-Reply-To: <82F792DC51D24C39AEBFEE9BC6CBE335@us.oracle.com> (Drew Adams's message of "Tue, 4 Dec 2012 14:43:53 -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: 0.8 (/) X-Debbugs-Envelope-To: 11095 Cc: 11095@debbugs.gnu.org, 'Jambunathan K' 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: 0.8 (/) >> I think the real issue here is that hi-lock should have a customizable >> set of faces rather than a set of customizable faces. >> So if the user doesn't like hi-yellow (which should be called >> hi-lock-yellow, BTW) because she never highlights in yellow, she can >> replace it with her own face with the name she likes. > Ah, in that case you are really talking, I think, about having one or > more user options, which each has a face (or a set of faces) as value. Just one option `hi-lock-faces'. > Just why would you prefer a "customizable set of faces" over a "set of > customizable faces"? And how does that relate to the names? Because the user can then choose the names that make sense to her. Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 05 17:13:13 2012 Received: (at 11095) by debbugs.gnu.org; 5 Dec 2012 22:13:13 +0000 Received: from localhost ([127.0.0.1]:55402 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TgNDN-0004Ro-8U for submit@debbugs.gnu.org; Wed, 05 Dec 2012 17:13:13 -0500 Received: from mail-pa0-f44.google.com ([209.85.220.44]:35549) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TgNDK-0004Re-FE for 11095@debbugs.gnu.org; Wed, 05 Dec 2012 17:13:11 -0500 Received: by mail-pa0-f44.google.com with SMTP id hz11so3718265pad.3 for <11095@debbugs.gnu.org>; Wed, 05 Dec 2012 14:13:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=o8P/FoIU6I1UGEzOU/+tsgJv0+mCByEUZFlKRfuajVY=; b=iA19bvWMTafXXuVvOsiriiJmkkQ6+WBuRVszm1yiwodY98d/vo/aSiblJt+GK8pC/a FvePEzHYGbsbBHVEm0NyP+u8MNvKq0IOCuev1cXjw1Mx7HoCybCKajbC280MUmarCE/i JBU+5Uycf3A5u96dsdq6yjNtpj7vO+Ott/dVYjN7QOttSDotiCgtVX60E+OVjTmsMq+5 Epe07OW3uNLaW5xpaCk/qAxI3/pzC4j9+Z+uUXueOZBQfL4lc9m9xZujWGN7K8mp2F3k h4HBpIJQEJT1Nyb4fM1bKIDT5EfoKHbLOQ1jsuVU6FKva0kJCuvT0vChv/S7g5xlDkuJ s6zw== Received: by 10.66.79.133 with SMTP id j5mr48242023pax.51.1354745580229; Wed, 05 Dec 2012 14:13:00 -0800 (PST) Received: from debian-6.05 ([101.62.57.252]) by mx.google.com with ESMTPS id ok3sm3538271pbb.11.2012.12.05.14.12.56 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 05 Dec 2012 14:12:58 -0800 (PST) From: Jambunathan K To: Stefan Monnier Subject: Re: bug#11095: [PATCH] Re: bug#11095: 24.0.94; hi-lock-face-buffer/unhighlight-regexp': Augment? References: <81d37z271c.fsf@gmail.com> <87626i2i4r.fsf@gmail.com> <61B14D03B48D4D9E998771D3B7E4252C@us.oracle.com> <82F792DC51D24C39AEBFEE9BC6CBE335@us.oracle.com> Date: Thu, 06 Dec 2012 03:45:54 +0530 In-Reply-To: (Stefan Monnier's message of "Tue, 04 Dec 2012 22:46:23 -0500") Message-ID: <87txs09mcl.fsf@gmail.com> 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: 0.1 (/) X-Debbugs-Envelope-To: 11095 Cc: 11095@debbugs.gnu.org, Drew Adams 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 (--) Stefan Monnier writes: >>> I think the real issue here is that hi-lock should have a customizable >>> set of faces rather than a set of customizable faces. >>> So if the user doesn't like hi-yellow (which should be called >>> hi-lock-yellow, BTW) because she never highlights in yellow, she can >>> replace it with her own face with the name she likes. >> Ah, in that case you are really talking, I think, about having one or >> more user options, which each has a face (or a set of faces) as value. > > Just one option `hi-lock-faces'. 1. I want the name to be opaque and semantic. 2. I also want a pre-defined set of faces for highlighting apart from the one "core" highlight face. I think there are 9 hi-* faces and these numbers are good enough. Think of them as extra colors in my palette. Having a set of highlighting faces will help in theming. For example, consider finding file in ido-mode. When I do C-x C-f, I see various faces - the minibuffer prompt, ido-first-match, ido-subdir, ido-indicator all occurring /next/ to each other. If there are hi-lock-N faces, chosen by a theme designed, one can simply have ido faces inherit from these themed faces. It is much cleaner. Remember choosing faces that can co-exist in buffer without much trouble to eyes is challenging task - one needs to balance harmony and contrast. A theme designer is likely to work with a palette and can go with color-picking techniques like triad, tetrad schemes. See http://colorschemedesigner.com/ http://www.w3.org/wiki/Colour_theory http://packages.debian.org/squeeze/agave Triad and tetrads apparently are colors that are 120 and 90 degrees apart in the color wheel. So if there are N highlighting faces, they can be spaced 360/N degree apart in a color wheeel. Drew's reasoning that it is the N-th highlighting face in a sequence. 3. Configuring an yellow face in red is a bit ugly. It is declaring a variable name FALSE that is assigned a variable value true. >> Just why would you prefer a "customizable set of faces" over a "set of >> customizable faces"? And how does that relate to the names? > > Because the user can then choose the names that make sense to her. While reading a face name from minibuffer, if the face name itself is highlighted in that face - think rainbow mode - then the name of the face shouldn't matter. What you are asking for is a constant face whose properties don't change at all. One can have an elpa packages which provides constant faces, that are immediately useful. From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 05 20:14:39 2012 Received: (at 11095) by debbugs.gnu.org; 6 Dec 2012 01:14:39 +0000 Received: from localhost ([127.0.0.1]:55511 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TgQ2x-000230-Kd for submit@debbugs.gnu.org; Wed, 05 Dec 2012 20:14:39 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:61995) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TgQ2v-00022p-Ic for 11095@debbugs.gnu.org; Wed, 05 Dec 2012 20:14:38 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0FAG6Zu09soXOY/2dsb2JhbABEsEiDSYEIghUBAQQBViMFCws0EhQYDSSIHAW6CZBEA4hCmnGBWIMH X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="209178085" Received: from 108-161-115-152.dsl.teksavvy.com (HELO pastel.home) ([108.161.115.152]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 05 Dec 2012 20:14:26 -0500 Received: by pastel.home (Postfix, from userid 20848) id BBB6F58F5C; Wed, 5 Dec 2012 20:14:20 -0500 (EST) From: Stefan Monnier To: Jambunathan K Subject: Re: bug#11095: [PATCH] Re: bug#11095: 24.0.94; hi-lock-face-buffer/unhighlight-regexp': Augment? Message-ID: References: <81d37z271c.fsf@gmail.com> <87626i2i4r.fsf@gmail.com> <61B14D03B48D4D9E998771D3B7E4252C@us.oracle.com> <82F792DC51D24C39AEBFEE9BC6CBE335@us.oracle.com> <87txs09mcl.fsf@gmail.com> Date: Wed, 05 Dec 2012 20:14:20 -0500 In-Reply-To: <87txs09mcl.fsf@gmail.com> (Jambunathan K.'s message of "Thu, 06 Dec 2012 03:45:54 +0530") 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: 0.8 (/) X-Debbugs-Envelope-To: 11095 Cc: 11095@debbugs.gnu.org, Drew Adams 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: -0.0 (/) >> Just one option `hi-lock-faces'. > 1. I want the name to be opaque and semantic. That's why I suggest hi-lock-faces, where you choose the face names you like. > 2. I also want a pre-defined set of faces for highlighting apart from > the one "core" highlight face. Sure, hi-lock-faces's default value would include a predefined set of faces, to match the current behavior. Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 06 00:03:24 2012 Received: (at 11095) by debbugs.gnu.org; 6 Dec 2012 05:03:24 +0000 Received: from localhost ([127.0.0.1]:55657 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TgTcJ-0000qP-UX for submit@debbugs.gnu.org; Thu, 06 Dec 2012 00:03:24 -0500 Received: from mail-da0-f44.google.com ([209.85.210.44]:51341) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TgTcG-0000qH-NL for 11095@debbugs.gnu.org; Thu, 06 Dec 2012 00:03:22 -0500 Received: by mail-da0-f44.google.com with SMTP id z20so2460023dae.3 for <11095@debbugs.gnu.org>; Wed, 05 Dec 2012 21:03:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:user-agent:date:message-id :mime-version:content-type; bh=npiz5z5OSH1lBj4GyLQfXP4zqOEOjpmCFA8TTfdvbpA=; b=eC6/9Db0Nv1ILtng6+yD1bhAPTruMZFMyVWU4bi1nZhn9gOsI0SX01r2mCwvj0kosc cGiormgMpLxFZPfsNBoyv2F/KHIDpBgCvEU7309oy0YHQEu1lL+QpWD3g7qWxKKM3qEG rf5obH3YJWsPYkXtI52hWPdoorE5WxLXUz/s8D5cDp45JCWezKYxoYjsnFMehhR6g2qm V4G+ElMqdwEFWy/No+NXTt/hezENamD8fYO4i4WmzOdAurFGBDxSgeqLGu7QJsPEHsjQ wItjCzD9BdJE6/5FsaYOEI9S1OodBhy+QWjRNLuJA43Yeo/Ptos6NNM93349N0juufT+ Dngw== Received: by 10.68.209.170 with SMTP id mn10mr2933816pbc.11.1354770187845; Wed, 05 Dec 2012 21:03:07 -0800 (PST) Received: from debian-6.05 ([101.62.84.137]) by mx.google.com with ESMTPS id pv8sm4107196pbc.26.2012.12.05.21.03.02 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 05 Dec 2012 21:03:06 -0800 (PST) From: Jambunathan K To: Stefan Monnier Subject: Re: bug#11095: [PATCH] Re: bug#11095: 24.0.94; hi-lock-face-buffer/unhighlight-regexp': Augment? References: <81d37z271c.fsf@gmail.com> <87626i2i4r.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Date: Thu, 06 Dec 2012 10:36:00 +0530 Message-ID: <87zk1r3h3b.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.1 (/) X-Debbugs-Envelope-To: 11095 Cc: 11095@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.5 (-) --=-=-= Content-Type: text/plain There are three issues that I see with your commmit: Issue-1: face-at-point broken? =============================== M-x toggle-debug-on-error RET M-x find-function RET face-at-point RET C-x w h C-x w r Debugger entered--Lisp error: (error "Not a face: nil") signal(error ("Not a face: nil")) error("Not a face: %s" nil) check-face(nil) face-name(nil) hi-lock--regexps-at-point() byte-code("\203\305C\207\306 \203. <\203.\n\203.\307\310\215\207 \204!\311\312!\210\313 \314\f\204-\315\2022\316\317\f@\" \320\305\320\211\f&)C\207" [current-prefix-arg last-nonmenu-event use-dialog-box hi-lock-interactive-patterns defaults t display-popup-menus-p snafu (byte-code "\301\302\303\304\305\306\"BB\"\206.\307\310\311\"\207" [hi-lock-interactive-patterns x-popup-menu t keymap "Select Pattern to Unhighlight" mapcar #[(pattern) "@\301\302@\303A@A@A@!#\304\211B@F\207" [pattern format "%s (%s)" symbol-name nil] 6] throw snafu ("")] 7) error "No highlighting to remove" hi-lock--regexps-at-point completing-read "Regexp to unhighlight: " format "Regexp to unhighlight (default %s): " nil] 8) call-interactively(unhighlight-regexp nil nil) The reason is faceprop happens to be a string (get-char-property (point) 'face) : "hi-yellow" Issue-2: Various issues with unhighlighting ============================================ Once you fix Issue-1 you will run in to other issues with un-highlighting. Try highlighting and UN-highlighting in following 3 ways 1. Buffer with font-lock-mode ON 2. Buffer with font-lock-mode OFF 3. Unhighlight from the menu Caveat: Extra testing needed if /type/ of face names are changed ================================================================= hi-lock-face-defautls is currently a list of face names (stringp). If it is made a defcustom, it will be cast to a list of symbols (symbolp). In some places, face names are expected and in some other places face as a symbol is used. So you need to re-run the tests if move from string->symbols. Suggestion: In default faces, don't mix bold and foreground/background ======================================================================= I am OK with defcustom of faces. Something like (defcustom hi-lock-face-defaults '(hi-yellow hi-pink hi-green hi-blue hi-black-b hi-blue-b hi-red-b hi-green-b hi-black-hb) "Default faces for hi-lock interactive functions." :type '(repeat face) :group 'hi-lock-faces) Bonus points if the default settings of the faces that go in there is revised as part of this bug. I want to highlight variables in a buffer. So consistent policy of highlighting - a changed background of normal face - will require no additional work. Here is how my own faces look like. Note that the first 4 come from "blue" space and the later 4 or so come from "pink" space, all chosen using agave. ps: I will let you install a change for the above issues. --=-=-= Content-Type: image/png Content-Disposition: attachment; filename=hi-defaults.png Content-Transfer-Encoding: base64 Content-Description: hi-defaults.pn iVBORw0KGgoAAAANSUhEUgAAAdYAAAG/CAIAAABqg2GfAAAAA3NCSVQICAjb4U/gAAAgAElEQVR4 nO3d7XHcKhSAYTbjKlJB+kkp6zLWpbgfV5A2dH/seK8s4MDh8yC9z3gyjowQIOmIRUjrHAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAABYc5tdAOec+/z69/zl75/fcwswqxj7AsxqhDa2n/81cXxN 8mqKMzVC7/17ykYTvbXK6BDF3HcoiS3vx9/iyK1bM7Q1tgudOVloDa1ni22JVGfya3YBRguGpL9/ fj9/xpdnX4Dx25UDtA7x9wpu3z9opHFbPk9pP5rElvcT3GJyxGN8Ocdsvaw1dAjBB+dukGdHtVMF z910P12rF3y1UQgZrQFM9+acu9/vHx8fUzY//T5YAe3odjB9Tod3jXt0W+R3F+/IbBlphDyFLpL2 ZtH0mz/B2rlQefzhUSHNzWtkv82FBMHMy+QU+9p+Oecej8e2bff7fXZhuqsf+gzmEMv28+ufKv1g bYqxHxy8/fzxbd8B9PUj3HjxEwvpY4kt39jxyybULnNh8E/yf2NLKpsuloPxnTLc/zMiHo/H4/F4 f3+v7xHnn9uvzl2nqBS7+VaZ7T6H5yY+v/4J2frpk3pM1OvUGgp+XJZ7tbH09YmnC3bA5dL6KQ9N d+jeqv67z79to+VX8JKOY8FX6BHXhHt/6oJ8Z89PkBPyRk6UNtIlP1LdkJGDuHDaW7u/L9Ti5i1R ZaVKXx+LYyM8naL8yo7zgpv0gmMzIsaLlUTutCYVdPMPC4Uc+sXfTq0xmp2IWeO268m+ljixdv3C VqcPEMG6WP5oMsP/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luJgAAAABJRU5ErkJggg== --=-=-= Content-Type: image/png Content-Disposition: attachment; filename=my-hi-faces.png Content-Transfer-Encoding: base64 Content-Description: my-hi-faces.png iVBORw0KGgoAAAANSUhEUgAAAYoAAAIwCAIAAAAXpbvJAAAAA3NCSVQICAjb4U/gAAAgAElEQVR4 nO3dPZPtzFbY8b2nJrQDiPAxVRAQnDIp3+RcCmID/gDsyW/dXOMPgH0dQ13mmziFmoDArsIDEQ4g F4HmqHrUvVa/q5ek/6+eeuqMptXq1sua1lJr79sNAAAAAAAAAIBLuY9uAHBw8y9Ht8CS+68aVvbU sC4AaIjwBMCo59ENuL29fyz/+PH929iWNLR26tatX+4mOm5o/vrjlZMB6644007Y3Is1v1Gt22lt wpN0qex0Cakt2We7Owt28+39o3E353NdivXOtzfceNQ0bfSzzmUrhWuPHz2dkhSdmwiON5eFLSMU sQmjtQlP7tXoXh7Scn/dVtba9I2ewKZrP75/6xQNgVFIjQMw6vnxeLy+vg7Z9uav/cCRTlaOLFg4 ZbDWKl/ed0fNwr9v8r3enFBGqVO5i8xNzFvIXvvJ5vuvxJSzW9gvs/52qcQttvnRLx9sSRO9s+mO 52mapml6eXkZFaTGkm6IguFGLzxWszasF3ZK7mn+uoq+ll/4JidNlcKWM2J+JJLyzcvyTXDZrLtG GfdXmxXdX7nlb17gCC7M0qla2WfuqWGQSr9ONnmisfw0c6vCm2I9xj7DJmf4kUIfDUnl6wub5Q58 NsuDJYPXeTBsRbeb2JIsnaoVfMk9TdM0z/Pj8ei0MWukqzoYN6OFCzbUxDEmjmU9B9QDnBKh7j// M2X/t16kLdaEEuUWtVuE+vLkrsnoyb9ILAyOFMGrWnoQllV4QWyKsBZNamwuVF7Hq/MZni6be2pl SHQwEZs63W0d7iZu5eeqU/Lih7B7g58vFZiGTIZax1ZtZ3VbiU3+2KdJZDnHkGrNVQefyimP6mza fTD4dJ3YJJFeEEkvHNX8IYDd2IQUSh4HjktPy5SiRvDi10PM2/vH8l/utgqYiE25lJT2LEy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+MN8S9OUl849AbDs6jd3QAbbmS+L6h5TEJ6ANESlAnU7jfAEnMQm lX7jrRoAAAAAgAGk+4Yy/i1ylZ+N2/alPAv7ysCHBbdxmo6gl6N8ZkhxO/t1cOyuO8qBizLfEUtP 7qI760yRntf9gRhL4Wl9zUp6QRTHQvxFHV5qAWCUpdFTGTtfspai8lvkUord5SWVEnd11hHpKusI Zp0bwbWKHyC4W3Srih7B9A4Wf2NgYvmrUC5gv+TsLUkvLC3MLVwmpaqCZsyhMpXNnp3/Z9U5MDXe 9XAX7Ioo/5DpRzC9zcrCUSd/siPf3PlfGRT9lqHokrLC/RQ0Y/b2TH3L/XGE/a+c2+dwN3zEEfx4 rPTyyiq5vTNy8hu9uWt+3medQ0rhxAF/E8XN6NG8HnXqR7lmi1m7ruaAjnr8mt7BaMnimndhMjz5 2ZMdtoWd2d/z0VyV/S4cnMnwlK5T/DJ+24LhTnyGWOqa7fBU8Oeryc7lryJ0+hy9Q7PUo8Omxk95 ZuBY7D8fOLjDhqcs+3zJWlt6mwnNiqxdl3VuZG2rn/QO6iWzatYpMxUqnCs8RedJBZekv0Oz/+wP qc2Iytp1WefGxqi/Z+kdzD2LjJz8tv4KS+E8vbw/71ZfJWsacbR8iqxpWcFVcl9IrHxCH6xKadI+ LUmsvOZw6xVKXS7oY3C7m+Aoxcr0DipbSalZr1yvCgAAAAAAAAAAAAAAAAAu5N8B/wd56RWsVecA AAAASUVORK5CYII= --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 06 09:47:52 2012 Received: (at 11095) by debbugs.gnu.org; 6 Dec 2012 14:47:53 +0000 Received: from localhost ([127.0.0.1]:56258 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tgcjv-0000QE-Dt for submit@debbugs.gnu.org; Thu, 06 Dec 2012 09:47:52 -0500 Received: from mail-pa0-f44.google.com ([209.85.220.44]:59281) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tgcjh-0000Pq-QP for 11095@debbugs.gnu.org; Thu, 06 Dec 2012 09:47:49 -0500 Received: by mail-pa0-f44.google.com with SMTP id hz11so4278228pad.3 for <11095@debbugs.gnu.org>; Thu, 06 Dec 2012 06:47:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=MtXkXxweSrRUS5o85PayheBTE42JDmlciyDs6l5jT3U=; b=KnNYLOAdjnTIAm7gA7sSGzM661RvMktP0OD7GT+BDIbYC72QF1NoqJ7MyQo283We8t GOaGo1GvCKm8U3aLGiaUV6uDuUwsAocxPn5/KFL41X5b+aFByfX5+S+bBNNR1ss3Q3Mf 14ESk44uG13Y6cw/+w3ZpqB9jg2Y/8serYqqWYEvtnAeB/vZ6WXbpiSeMJbRiGOiDw1o +XEy2sHWa2eGMY5Xcw0ZUIlRR4BbZR0s8oONua7veJjCeCw/BfTosp0b//DG/mkmksRm HaC6XQnAE8eo3+CraU6qOFGa4Xd07BpFcRHDJbZ9jkWxvUmm98ncYcaId1dN5F5bAAum W2zQ== Received: by 10.68.232.200 with SMTP id tq8mr6591424pbc.52.1354805241700; Thu, 06 Dec 2012 06:47:21 -0800 (PST) Received: from debian-6.05 ([115.184.38.95]) by mx.google.com with ESMTPS id ug6sm4906436pbc.4.2012.12.06.06.47.17 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 06 Dec 2012 06:47:20 -0800 (PST) From: Jambunathan K To: Stefan Monnier Subject: Re: bug#11095: [PATCH] Re: bug#11095: 24.0.94; hi-lock-face-buffer/unhighlight-regexp': Augment? References: <81d37z271c.fsf@gmail.com> <87626i2i4r.fsf@gmail.com> <87zk1r3h3b.fsf@gmail.com> Date: Thu, 06 Dec 2012 20:20:16 +0530 In-Reply-To: <87zk1r3h3b.fsf@gmail.com> (Jambunathan K.'s message of "Thu, 06 Dec 2012 10:36:00 +0530") Message-ID: <87fw3j9qvr.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 11095 Cc: 11095@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 (--) --=-=-= Content-Type: text/plain Please review the attached patch. The patch exposes exposes a bug in defcustom and defvar-local which I will outline separately in a followup post (after another 2-3 hours). ps: I only wish you had tested unhighlighting part. It would have saved some re-working for me. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=bug11095.patch Content-Description: bug11095.patch === modified file 'etc/NEWS' --- etc/NEWS 2012-12-04 17:07:09 +0000 +++ etc/NEWS 2012-12-06 14:44:01 +0000 @@ -74,6 +74,15 @@ when its arg ADJACENT is non-nil (when c it works like the utility `uniq'. Otherwise by default it deletes duplicate lines everywhere in the region without regard to adjacency. +** Various improvements to hi-lock.el +*** New user variables `hi-lock-faces' and `hi-lock-auto-select-face' +*** Highlighting commands (`hi-lock-face-buffer', `hi-lock-face-phrase-buffer' +and `hi-lock-line-face-buffer') now take a prefix argument which +temporarily inverts the meaning of `hi-lock-auto-select-face'. +*** Unhighlighting command (`hi-lock-unface-buffer') now un-highlights text at +point. When called interactively with C-u, removes all highlighting +in current buffer. + ** Tramp +++ *** New connection method "adb", which allows to access Android === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-12-06 09:15:27 +0000 +++ lisp/ChangeLog 2012-12-06 14:24:34 +0000 @@ -1,3 +1,18 @@ +2012-12-06 Jambunathan K + + * hi-lock.el (hi-lock-faces): New user variable. + (hi-lock--auto-select-face-defaults): Use `hi-lock-faces'. + (hi-lock-read-face-name): New optional param `toggle-auto-select'. + (hi-lock-line-face-buffer, hi-lock-face-buffer) + (hi-lock-face-phrase-buffer): Allow prefix argument to temporarily + toggle the value of `hi-lock-auto-select-face'. + (hi-lock--regexps-at-point, hi-lock-unface-buffer): Fix earlier + commit. + (hi-lock-set-pattern): Refuse to highlight a regexp that is + already highlighted. + + * faces.el (face-at-point): Fix bug (Bug#11095). + 2012-12-06 Michael Albinus * net/tramp.el (tramp-replace-environment-variables): Hide === modified file 'lisp/faces.el' --- lisp/faces.el 2012-11-25 04:50:20 +0000 +++ lisp/faces.el 2012-12-05 19:35:05 +0000 @@ -1884,6 +1884,7 @@ Return nil if it has no specified face." (get-char-property (point) 'face) 'default)) (face (cond ((symbolp faceprop) faceprop) + ((stringp faceprop) (intern-soft faceprop)) ;; List of faces (don't treat an attribute spec). ;; Just use the first face. ((and (consp faceprop) (not (keywordp (car faceprop))) === modified file 'lisp/hi-lock.el' --- lisp/hi-lock.el 2012-12-04 21:13:47 +0000 +++ lisp/hi-lock.el 2012-12-06 14:02:42 +0000 @@ -213,13 +213,27 @@ When non-nil, each hi-lock command will (define-obsolete-variable-alias 'hi-lock-face-history 'hi-lock-face-defaults "23.1") + (defvar hi-lock-face-defaults '("hi-yellow" "hi-pink" "hi-green" "hi-blue" "hi-black-b" "hi-blue-b" "hi-red-b" "hi-green-b" "hi-black-hb") "Default faces for hi-lock interactive functions.") +(defcustom hi-lock-faces + (or + (when (boundp 'hi-lock-face-defaults) + (mapcar + (lambda (face-name) (intern-soft face-name)) + hi-lock-face-defaults)) + '(hi-yellow hi-pink hi-green hi-blue hi-black-b + hi-blue-b hi-red-b hi-green-b hi-black-hb)) + "Default faces for hi-lock interactive functions." + :type '(repeat face) + :group 'hi-lock + :version "24.4") + (defvar-local hi-lock--auto-select-face-defaults - (let ((l (copy-sequence hi-lock-face-defaults))) + (let ((l (copy-sequence hi-lock-faces))) (setcdr (last l) l)) "Circular list of faces used for interactive highlighting. When `hi-lock-auto-select-face' is non-nil, use the face at the @@ -410,8 +424,12 @@ versions before 22 use the following in ;;;###autoload (defun hi-lock-line-face-buffer (regexp &optional face) "Set face of all lines containing a match of REGEXP to FACE. -Interactively, prompt for REGEXP then FACE, using a buffer-local -history list for REGEXP and a global history list for FACE. +Interactively, prompt for REGEXP, using a buffer-local history +list for REGEXP . When `hi-lock-auto-select-face' is non-nil, +prompt for FACE using a global history list. Otherwise, use the +next of `hi-lock-faces'. When invoked with +\\[universal-argument] prefix, invert the meaning of +`hi-lock-auto-select-face'. If Font Lock mode is enabled in the buffer, it is used to highlight REGEXP. If Font Lock mode is disabled, overlays are @@ -421,8 +439,9 @@ updated as you type." (list (hi-lock-regexp-okay (read-regexp "Regexp to highlight line" (car regexp-history))) - (hi-lock-read-face-name))) - (or (facep face) (setq face 'hi-yellow)) + (let ((toggle-auto-select current-prefix-arg)) + (hi-lock-read-face-name toggle-auto-select)))) + (unless (facep face) (setq face (hi-lock-read-face-name))) (unless hi-lock-mode (hi-lock-mode 1)) (hi-lock-set-pattern ;; The \\(?:...\\) grouping construct ensures that a leading ^, +, * or ? @@ -435,8 +454,12 @@ updated as you type." ;;;###autoload (defun hi-lock-face-buffer (regexp &optional face) "Set face of each match of REGEXP to FACE. -Interactively, prompt for REGEXP then FACE, using a buffer-local -history list for REGEXP and a global history list for FACE. +Interactively, prompt for REGEXP, using a buffer-local history +list for REGEXP . When `hi-lock-auto-select-face' is non-nil, +prompt for FACE using a global history list. Otherwise, use the +next of `hi-lock-faces'. When invoked with +\\[universal-argument] prefix, invert the meaning of +`hi-lock-auto-select-face'. If Font Lock mode is enabled in the buffer, it is used to highlight REGEXP. If Font Lock mode is disabled, overlays are @@ -446,8 +469,9 @@ updated as you type." (list (hi-lock-regexp-okay (read-regexp "Regexp to highlight" (car regexp-history))) - (hi-lock-read-face-name))) - (or (facep face) (setq face 'hi-yellow)) + (let ((toggle-auto-select current-prefix-arg)) + (hi-lock-read-face-name toggle-auto-select)))) + (unless (facep face) (setq face (hi-lock-read-face-name))) (unless hi-lock-mode (hi-lock-mode 1)) (hi-lock-set-pattern regexp face)) @@ -457,7 +481,12 @@ updated as you type." (defun hi-lock-face-phrase-buffer (regexp &optional face) "Set face of each match of phrase REGEXP to FACE. If called interactively, replaces whitespace in REGEXP with -arbitrary whitespace and makes initial lower-case letters case-insensitive. +arbitrary whitespace and makes initial lower-case letters +case-insensitive. When `hi-lock-auto-select-face' is non-nil, +prompt for FACE using a global history list. Otherwise, use the +next of `hi-lock-faces'. When invoked with +\\[universal-argument] prefix, invert the meaning of +`hi-lock-auto-select-face'. If Font Lock mode is enabled in the buffer, it is used to highlight REGEXP. If Font Lock mode is disabled, overlays are @@ -467,9 +496,10 @@ updated as you type." (list (hi-lock-regexp-okay (hi-lock-process-phrase - (read-regexp "Phrase to highlight" (car regexp-history)))) - (hi-lock-read-face-name))) - (or (facep face) (setq face 'hi-yellow)) + (read-regexp "Phrase to highlight" (car regexp-history)))))) + (let ((toggle-auto-select current-prefix-arg)) + (hi-lock-read-face-name toggle-auto-select)) + (unless (facep face) (setq face (hi-lock-read-face-name))) (unless hi-lock-mode (hi-lock-mode 1)) (hi-lock-set-pattern regexp face)) @@ -482,26 +512,29 @@ updated as you type." (let ((desired-serial (get-char-property (point) 'hi-lock-overlay-regexp))) (when desired-serial - (catch 'regexp (maphash (lambda (regexp serial) (when (= serial desired-serial) (push regexp regexps))) - hi-lock-string-serialize-hash)))) - ;; With font-locking on, check if the cursor is on an highlighted text. - ;; Checking for hi-lock face is a good heuristic. - (and (string-match "\\`hi-lock-" (face-name (face-at-point))) + hi-lock-string-serialize-hash))) + ;; With font-locking on, check if cursor is on an highlighted + ;; text. + (when (member (list 'quote (face-at-point)) + (mapcar (lambda (pattern) + (cadr (cadr pattern))) + hi-lock-interactive-patterns)) (let* ((hi-text (buffer-substring-no-properties - (previous-single-property-change (point) 'face) - (next-single-property-change (point) 'face)))) + (previous-single-char-property-change (point) 'face) + (next-single-char-property-change (point) 'face)))) ;; Compute hi-lock patterns that match the ;; highlighted text at point. Use this later in ;; during completing-read. (dolist (hi-lock-pattern hi-lock-interactive-patterns) (let ((regexp (car hi-lock-pattern))) - (if (string-match regexp hi-text) - (push regexp regexps)))))))) + (when (string-match regexp hi-text) + (push regexp regexps)))))) + regexps)) ;;;###autoload (defalias 'unhighlight-regexp 'hi-lock-unface-buffer) @@ -529,9 +562,7 @@ then remove all hi-lock highlighting." (list (car pattern) (format "%s (%s)" (car pattern) - (symbol-name - (car - (cdr (car (cdr (car (cdr pattern)))))))) + (cadr (cadr (cadr pattern)))) (cons nil nil) (car pattern))) hi-lock-interactive-patterns)))) @@ -557,6 +588,7 @@ then remove all hi-lock highlighting." (dolist (keyword (if (eq regexp t) hi-lock-interactive-patterns (list (assoc regexp hi-lock-interactive-patterns)))) (when keyword + (setq regexp (car keyword)) (font-lock-remove-keywords nil (list keyword)) (setq hi-lock-interactive-patterns (delq keyword hi-lock-interactive-patterns)) @@ -615,31 +647,36 @@ not suitable." (error "Regexp cannot match an empty string") regexp)) -(defun hi-lock-read-face-name () +(defun hi-lock-read-face-name (&optional toggle-auto-select) "Return face name for interactive highlighting. When `hi-lock-auto-select-face' is non-nil, just return the next face. -Otherwise, read face name from minibuffer with completion and history." - (if hi-lock-auto-select-face +Otherwise, read face name from minibuffer with completion and history. + +When TOGGLE-AUTO-SELECT is non-nil, temporarily invert the value +of `hi-lock-auto-select-face'." + (let ((auto-select + (if toggle-auto-select (not hi-lock-auto-select-face) + hi-lock-auto-select-face))) + (if auto-select ;; Return current head and rotate the face list. (pop hi-lock--auto-select-face-defaults) - (intern (completing-read + (intern + (let* ((face-names (mapcar #'face-name hi-lock-faces)) + (prefix (try-completion "" face-names))) + (completing-read "Highlight using face: " obarray 'facep t - (cons (car hi-lock-face-defaults) - (let ((prefix - (try-completion - (substring (car hi-lock-face-defaults) 0 1) - hi-lock-face-defaults))) + (cons (car face-names) (if (and (stringp prefix) - (not (equal prefix (car hi-lock-face-defaults)))) - (length prefix) 0))) - 'face-name-history - (cdr hi-lock-face-defaults))))) + (not (equal prefix (car face-names)))) + (length prefix) 0)) + 'face-name-history (cdr face-names))))))) (defun hi-lock-set-pattern (regexp face) "Highlight REGEXP with face FACE." (let ((pattern (list regexp (list 0 (list 'quote face) t)))) - (unless (member pattern hi-lock-interactive-patterns) + ;; Check if REGEXP is already highlighted. + (unless (assoc regexp hi-lock-interactive-patterns) (push pattern hi-lock-interactive-patterns) (if font-lock-mode (progn --=-=-= Content-Type: text/plain > There are three issues that I see with your commmit: > > Issue-1: face-at-point broken? > =============================== > > M-x toggle-debug-on-error RET > M-x find-function RET face-at-point RET > C-x w h > C-x w r > > Debugger entered--Lisp error: (error "Not a face: nil") > signal(error ("Not a face: nil")) > error("Not a face: %s" nil) > check-face(nil) > face-name(nil) > hi-lock--regexps-at-point() > byte-code("\203\305C\207\306 \203. <\203.\n\203.\307\310\215\207 \204!\311\312!\210\313 \314\f\204-\315\2022\316\317\f@\" \320\305\320\211\f&)C\207" [current-prefix-arg last-nonmenu-event use-dialog-box hi-lock-interactive-patterns defaults t display-popup-menus-p snafu (byte-code "\301\302\303\304\305\306\"BB\"\206.\307\310\311\"\207" [hi-lock-interactive-patterns x-popup-menu t keymap "Select Pattern to Unhighlight" mapcar #[(pattern) "@\301\302@\303A@A@A@!#\304\211B@F\207" [pattern format "%s (%s)" symbol-name nil] 6] throw snafu ("")] 7) error "No highlighting to remove" hi-lock--regexps-at-point completing-read "Regexp to unhighlight: " format "Regexp to unhighlight (default %s): " nil] 8) > call-interactively(unhighlight-regexp nil nil) > > The reason is faceprop happens to be a string > > (get-char-property (point) 'face) > : "hi-yellow" > > Issue-2: Various issues with unhighlighting > ============================================ > > Once you fix Issue-1 you will run in to other issues with > un-highlighting. Try highlighting and UN-highlighting in following 3 > ways > > 1. Buffer with font-lock-mode ON > 2. Buffer with font-lock-mode OFF > 3. Unhighlight from the menu > > Caveat: Extra testing needed if /type/ of face names are changed > ================================================================= > > hi-lock-face-defautls is currently a list of face names (stringp). If > it is made a defcustom, it will be cast to a list of symbols (symbolp). > In some places, face names are expected and in some other places face as > a symbol is used. So you need to re-run the tests if move from > string->symbols. > > Suggestion: In default faces, don't mix bold and foreground/background > ======================================================================= > > I am OK with defcustom of faces. Something like > > (defcustom hi-lock-face-defaults > '(hi-yellow hi-pink hi-green hi-blue hi-black-b > hi-blue-b hi-red-b hi-green-b hi-black-hb) > "Default faces for hi-lock interactive functions." > :type '(repeat face) > :group 'hi-lock-faces) > > Bonus points if the default settings of the faces that go in there is > revised as part of this bug. I want to highlight variables in a buffer. > So consistent policy of highlighting - a changed background of normal > face - will require no additional work. > > Here is how my own faces look like. Note that the first 4 come from > "blue" space and the later 4 or so come from "pink" space, all chosen > using agave. > > ps: I will let you install a change for the above issues. --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 06 14:17:16 2012 Received: (at 11095) by debbugs.gnu.org; 6 Dec 2012 19:17:16 +0000 Received: from localhost ([127.0.0.1]:57192 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tggwd-00071Y-Hw for submit@debbugs.gnu.org; Thu, 06 Dec 2012 14:17:16 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:47179) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tggwb-00071N-4z for 11095@debbugs.gnu.org; Thu, 06 Dec 2012 14:17:14 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0FAG6Zu09soXOY/2dsb2JhbABEsEiDSYEIghUBAQQBViMFCws0EhQYDSSIHAW6CZBEA4hCmnGBWIMH X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="209237591" Received: from 108-161-115-152.dsl.teksavvy.com (HELO pastel.home) ([108.161.115.152]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 06 Dec 2012 14:16:58 -0500 Received: by pastel.home (Postfix, from userid 20848) id AF4B658F5C; Thu, 6 Dec 2012 14:16:57 -0500 (EST) From: Stefan Monnier To: Jambunathan K Subject: Re: bug#11095: [PATCH] Re: bug#11095: 24.0.94; hi-lock-face-buffer/unhighlight-regexp': Augment? Message-ID: References: <81d37z271c.fsf@gmail.com> <87626i2i4r.fsf@gmail.com> <87zk1r3h3b.fsf@gmail.com> Date: Thu, 06 Dec 2012 14:16:57 -0500 In-Reply-To: <87zk1r3h3b.fsf@gmail.com> (Jambunathan K.'s message of "Thu, 06 Dec 2012 10:36:00 +0530") 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: -0.0 (/) X-Debbugs-Envelope-To: 11095 Cc: 11095@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: -0.0 (/) > (get-char-property (point) 'face) > : "hi-yellow" I just fixed that a little while ago. > Issue-2: Various issues with unhighlighting > ============================================ > Once you fix Issue-1 you will run in to other issues with > un-highlighting. Try highlighting and UN-highlighting in following 3 > ways > 1. Buffer with font-lock-mode ON > 2. Buffer with font-lock-mode OFF > 3. Unhighlight from the menu Seems to be working now (haven't tried before my recent changes, tho). > (defcustom hi-lock-face-defaults > '(hi-yellow hi-pink hi-green hi-blue hi-black-b > hi-blue-b hi-red-b hi-green-b hi-black-hb) > "Default faces for hi-lock interactive functions." > :type '(repeat face) > :group 'hi-lock-faces) I think it'd be important to make it possible/easy for the user to add new faces of his own creation in there. So we'd need a :setter that creates those faces as needed. BTW, I wouldn't spend too much time on hi-lock-auto-select-face since setting it to t just saves you from typing RET RET instead of RET. I'm not even sure we want to keep such configuration. Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 06 14:36:24 2012 Received: (at 11095) by debbugs.gnu.org; 6 Dec 2012 19:36:24 +0000 Received: from localhost ([127.0.0.1]:57199 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TghF9-0007fG-VZ for submit@debbugs.gnu.org; Thu, 06 Dec 2012 14:36:24 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:50459) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TghF8-0007f9-CQ for 11095@debbugs.gnu.org; Thu, 06 Dec 2012 14:36:23 -0500 Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by userp1040.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id qB6Ja6xe020995 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 6 Dec 2012 19:36:06 GMT Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id qB6Ja5s0001613 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 6 Dec 2012 19:36:05 GMT Received: from abhmt116.oracle.com (abhmt116.oracle.com [141.146.116.68]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id qB6Ja4ou018646; Thu, 6 Dec 2012 13:36:04 -0600 Received: from dradamslap1 (/130.35.178.8) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 06 Dec 2012 11:36:04 -0800 From: "Drew Adams" To: "'Stefan Monnier'" , "'Jambunathan K'" References: <81d37z271c.fsf@gmail.com> <87626i2i4r.fsf@gmail.com> <87zk1r3h3b.fsf@gmail.com> Subject: RE: bug#11095: [PATCH] Re: bug#11095: 24.0.94; hi-lock-face-buffer/unhighlight-regexp': Augment? Date: Thu, 6 Dec 2012 11:36:02 -0800 Message-ID: <0A6D2F1284264AFD8EAFAAB2ECB9DFC6@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: Ac3T5mmG5rreWGvGTRWGzY7LLav3YQAAMsZA X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-Spam-Score: -1.5 (-) X-Debbugs-Envelope-To: 11095 Cc: 11095@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.3 (--) > > (defcustom hi-lock-face-defaults > > '(hi-yellow hi-pink hi-green hi-blue hi-black-b > > hi-blue-b hi-red-b hi-green-b hi-black-hb) > > "Default faces for hi-lock interactive functions." > > :type '(repeat face) > > :group 'hi-lock-faces) > > I think it'd be important to make it possible/easy for the user to add > new faces of his own creation in there. So we'd need a :setter that > creates those faces as needed. The code still defines and uses faces named for colors. Bad idea. There is no need for that, and nothing gained by it. Look at the doc for each of those faces - it should give you a clue. It says only that this is a face for hi-lock mode. It says nothing about the color that is in the name, and rightfully so. The default color used to define the face is irrelevant to the use/meaning/purpose of the face. These faces should be renamed. If you need a separate bug report for that I will be glad to file it. From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 06 16:23:33 2012 Received: (at 11095) by debbugs.gnu.org; 6 Dec 2012 21:23:33 +0000 Received: from localhost ([127.0.0.1]:57335 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tgiur-0001iD-Bs for submit@debbugs.gnu.org; Thu, 06 Dec 2012 16:23:33 -0500 Received: from mail-pb0-f44.google.com ([209.85.160.44]:48346) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tgiup-0001i5-2k for 11095@debbugs.gnu.org; Thu, 06 Dec 2012 16:23:32 -0500 Received: by mail-pb0-f44.google.com with SMTP id uo1so4569836pbc.3 for <11095@debbugs.gnu.org>; Thu, 06 Dec 2012 13:23:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=6tj3P3extSipFuQqjpnWk53cCJGnql8yPydUaebArOQ=; b=yd0YGdjdQpTTyyXVP8KW+hcFp5CRzRKWNjJtU4XuPWjCF7KJTElxZa6ZPblxaNNAbk Nydq0E7NTegJKH2WAKcpD49ANJyAgYiVXkGuSaYeHelIaEHfa7mHQ0IvzTP5Plg13esZ scl/gtvBeZFvSqoGVgcaGbiKy/v2N6MxnfRNEbvhnMuj9gzEBmSnNFNCbzkIHlTmwIVa YhBhl0c/pMwG5AsIVBHVr5YMjDkKhIDc5O0YUh0qKB1WNOrekoCAhSL5auK7orKfZfWT MCk3J1IFLHopZj4BI1Bz7Tu56rz+H5ehJUtRjsIMcw0IHOR22DCsPfQ9G9ejkgI/BuCT YsAA== Received: by 10.68.189.102 with SMTP id gh6mr9214460pbc.37.1354828994030; Thu, 06 Dec 2012 13:23:14 -0800 (PST) Received: from debian-6.05 ([115.184.108.21]) by mx.google.com with ESMTPS id xk2sm5369157pbc.45.2012.12.06.13.23.10 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 06 Dec 2012 13:23:12 -0800 (PST) From: Jambunathan K To: Stefan Monnier Subject: Re: bug#11095: [PATCH] Re: bug#11095: 24.0.94; hi-lock-face-buffer/unhighlight-regexp': Augment? References: <81d37z271c.fsf@gmail.com> <87626i2i4r.fsf@gmail.com> <87zk1r3h3b.fsf@gmail.com> Date: Fri, 07 Dec 2012 02:56:07 +0530 In-Reply-To: (Stefan Monnier's message of "Thu, 06 Dec 2012 14:16:57 -0500") Message-ID: <87lidaan4g.fsf@gmail.com> 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: -0.7 (/) X-Debbugs-Envelope-To: 11095 Cc: 11095@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 (--) >> (get-char-property (point) 'face) >> : "hi-yellow" > > I just fixed that a little while ago. > >> Issue-2: Various issues with unhighlighting >> ============================================ >> Once you fix Issue-1 you will run in to other issues with >> un-highlighting. Try highlighting and UN-highlighting in following 3 >> ways >> 1. Buffer with font-lock-mode ON >> 2. Buffer with font-lock-mode OFF >> 3. Unhighlight from the menu > > Seems to be working now (haven't tried before my recent changes, tho). By now, if you mean 111134, the unhighlighting is not working as expected. My patch has hints on where the brokenness comes from. From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 06 16:36:47 2012 Received: (at 11095) by debbugs.gnu.org; 6 Dec 2012 21:36:47 +0000 Received: from localhost ([127.0.0.1]:57380 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tgj7f-00021q-Le for submit@debbugs.gnu.org; Thu, 06 Dec 2012 16:36:47 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:36982) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tgj7d-00021j-Md for 11095@debbugs.gnu.org; Thu, 06 Dec 2012 16:36:46 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0FAG6Zu09soXOY/2dsb2JhbABEsEiDSYEIghUBAQQBViMQCzQSFBgNJIgcBboJkEQDiEKacYFYgwc X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="209249419" Received: from 108-161-115-152.dsl.teksavvy.com (HELO pastel.home) ([108.161.115.152]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 06 Dec 2012 16:36:30 -0500 Received: by pastel.home (Postfix, from userid 20848) id 9B48358F5C; Thu, 6 Dec 2012 16:36:29 -0500 (EST) From: Stefan Monnier To: Jambunathan K Subject: Re: bug#11095: [PATCH] Re: bug#11095: 24.0.94; hi-lock-face-buffer/unhighlight-regexp': Augment? Message-ID: References: <81d37z271c.fsf@gmail.com> <87626i2i4r.fsf@gmail.com> <87zk1r3h3b.fsf@gmail.com> <87lidaan4g.fsf@gmail.com> Date: Thu, 06 Dec 2012 16:36:29 -0500 In-Reply-To: <87lidaan4g.fsf@gmail.com> (Jambunathan K.'s message of "Fri, 07 Dec 2012 02:56:07 +0530") 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: -0.0 (/) X-Debbugs-Envelope-To: 11095 Cc: 11095@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 (-) >> Seems to be working now (haven't tried before my recent changes, tho). > By now, if you mean 111134, the unhighlighting is not working as > expected. Can you give a recipe, because "it works for me", Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 06 17:20:35 2012 Received: (at 11095) by debbugs.gnu.org; 6 Dec 2012 22:20:35 +0000 Received: from localhost ([127.0.0.1]:57436 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tgjo2-00035V-BX for submit@debbugs.gnu.org; Thu, 06 Dec 2012 17:20:34 -0500 Received: from mail-pa0-f44.google.com ([209.85.220.44]:44070) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tgjnz-00035N-Iv for 11095@debbugs.gnu.org; Thu, 06 Dec 2012 17:20:32 -0500 Received: by mail-pa0-f44.google.com with SMTP id hz11so4548481pad.3 for <11095@debbugs.gnu.org>; Thu, 06 Dec 2012 14:20:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=bk2GC8jde9ASZCDKjOt9GWopGQB/GLap+k7OV7B7wpc=; b=X2+Ls2+aiopjnYmV4+PSm7CNwI4kX63igZ7lzqAl5u+GMFGSr4DSDFZN92ZZkDH+uQ /LNfMlDfqDl2a3cN2x6dr77F0Qw0aICmIv7lsuzMglZYGZxs0yW/D5RQmD4MnIZAjqmu GRzB29mxg8Twt21RuXN5CrDh7BBsXu0dF6moEgolZfb+pH5jDogLeGqcXP+1WIM9wxqI 6sgZGuZzEr/7od774ahGKUlSx5h2/b9nRrX2/uIzWUAwmIwLIoSmrreu/LR//3pGiOlU //Mxbh8tMaCSvxyF4PW5YE7qo8yRePDHrB1UQbBDzJD+h6CSh8oNASwxGcO4EIQVSFXo XIHQ== Received: by 10.68.143.106 with SMTP id sd10mr9473705pbb.62.1354832415129; Thu, 06 Dec 2012 14:20:15 -0800 (PST) Received: from debian-6.05 ([115.184.108.21]) by mx.google.com with ESMTPS id d8sm5318232pax.23.2012.12.06.14.20.09 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 06 Dec 2012 14:20:13 -0800 (PST) From: Jambunathan K To: Stefan Monnier Subject: Re: bug#11095: [PATCH] Re: bug#11095: 24.0.94; hi-lock-face-buffer/unhighlight-regexp': Augment? References: <81d37z271c.fsf@gmail.com> <87626i2i4r.fsf@gmail.com> <87zk1r3h3b.fsf@gmail.com> <87lidaan4g.fsf@gmail.com> Date: Fri, 07 Dec 2012 03:53:06 +0530 In-Reply-To: (Stefan Monnier's message of "Thu, 06 Dec 2012 16:36:29 -0500") Message-ID: <87a9tq6cs5.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 11095 Cc: 11095@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 (--) --=-=-= Content-Type: text/plain Stefan Monnier writes: >>> Seems to be working now (haven't tried before my recent changes, tho). >> By now, if you mean 111134, the unhighlighting is not working as >> expected. > > Can you give a recipe, because "it works for me", How about a screenshot? This is one of the brokenness. Recipe-1: Couple of C-x w h, followed by C-x w r. Note the cursor position and the choice offered. See screenshot. Why is there no default offered and why even absurd candidates are offered? Recipe-2: Turn off font-lock-mode. Couple of C-x w h and then try C-x w r, C-u C-x w r, try from menu. --=-=-= Content-Type: image/png Content-Disposition: attachment; filename=unhighlight-1.png Content-Transfer-Encoding: base64 Content-Description: unhighlight-1.png iVBORw0KGgoAAAANSUhEUgAAA/0AAAEYCAIAAACBSwEvAAAAA3NCSVQICAjb4U/gAAAgAElEQVR4 nO3dzbHsvHGAYY7rJOIqpaCNVsrBOdzywjncujl44SSUg1beKAVVefmFMV6ML81DAI1u/DbA96lb qk9zMGATAMkeDMg5DizkrS+pL9qhwvc78q85U5Vy4Q7RFXISiZMwAABAO1+zA8BUt3T89ZLKhLl7 tPz5+lk+Vcyh6y4KUSuLlW06zLmVkURLpgpkXzeFAQAAgGZs09u50tE5eGFi3jphf1blf7L/LPCO vdgwDA3DVzqxwtEXhWqtrwMAgGX9y+wAME84Dd9qYv6T6H9qu839u/UO5rNf7tPfsLtSHRjdl3CX AQDAvsj7H+n9lpboVObo16T/rPNwn/r3yIDf4r/Kmk0pfvg6ST8AAA/D+n60Fv1EsdAS/4a87fTr d7pP0g8AwPOQ9z+V89l3ZJV1IEk/AABPRd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8eC6UWT6bOH70yQAAIjw+jT0DTaHGit21ooxX5D3AwCwt4rf6wUA AACwiHl5/+KTo+hoxbGxYswAAOBJJuX93KeIlBXHxooxAwCAh/lfsj7zia2KaHYAAAAASUVORK5C YII= --=-=-= Content-Type: image/png Content-Disposition: attachment; filename=unhighlight-2.png Content-Transfer-Encoding: base64 Content-Description: unhighlight-2.png iVBORw0KGgoAAAANSUhEUgAABN8AAAELCAIAAABmmrd0AAAAA3NCSVQICAjb4U/gAAAgAElEQVR4 nO3dwc3sOJLgcWXhObJAu9CXObUDfRofCntYHwrPhz2sE+PDnOYyLjSwxzZDe8gttZ5IBiMoBhmU /j88NKrzY1KhIKUkUxJz27CKfXYAoZiyQeoAAAAAAAAAAAAAAAAAAMACPrMDAELbuSsYAG74MNAA AKj9NjsAAAAAAACYnQIAAAAAAvgxOwAgmP16w/txW9qYu3wvd8HJGzUVfpLBjeLk81k7fqyIXgcA iIzZKXCSTE23P+c/Yx6dMg0c3zzKHNAob04vlkAXBQA8D3f2AlEwNQUAAMCbMTsF/pS7cAr44fsF jEevAwBExuwUAAAAADAfz50CNvJCRKXVeoRVfM4VVlc5MhVuK3YU6LvyUBrG5ebkhtQJlTeHcS6T PteardmaunO1yubQvGUr5OFOO7aFUYqkmRBGqfKG/qw/+vRhKGsuRVg9KJRddLO0XbZma3Pz6AEA oA03MgLbthVv61UOE9MXSyNmeQjb97nTUmzpi5dqL2XuDzRLM8DsBECfOlOjmMIQIilpSF11E0ed l2l8KRUNE3sNfRhyJH3nqJrKlY1iitl6KjAFrI+59GKVptel4ZmOlDR4AACUuLMXMEgHZ8GvDzQE /B1rnot57GPHOu80St9d80hdOvQ/pi4Xrp1TH4Z3JNbKlY1irVZfPuwxKLjZgsHPigCAyLizF9AS Rp8Bb2MTQpIDVl6SLRk8M7zfKK4TpzF1Vts6LW/donLXTL2uYxhCcyungqZqleX9jkE/zTGnhQEA aMDsFIBNw7jzMkeaNXINEsZ0QXY8SBi4icMKANARs1PgsUI97pV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DKq1hFh47 BwAAAMaJfL3XJMiOBAnjSSamlNYEAABPV3juFAAAAAAA4I2edGkoyL4ECQM3BX+MHAAAoBN+UQYx MPgGSnjcFAAAvAOjHsygXMZmRUF2LUgYz2b6SoX8AwAA1Pw/QJ2HcQ3xLeQAAAAASUVORK5CYII= --=-=-= Content-Type: text/plain > Stefan --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 06 23:08:02 2012 Received: (at 11095) by debbugs.gnu.org; 7 Dec 2012 04:08:02 +0000 Received: from localhost ([127.0.0.1]:57592 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TgpEH-0003KO-Ux for submit@debbugs.gnu.org; Thu, 06 Dec 2012 23:08:02 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:19928) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TgpEF-0003KB-8x for 11095@debbugs.gnu.org; Thu, 06 Dec 2012 23:07:59 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0FAG6Zu09soXOY/2dsb2JhbABEsEiDSYEIghUBAQQBViMFCws0EhQYDSSIHAW6CZBEA4hCmnGBWIMH X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="209264505" Received: from 108-161-115-152.dsl.teksavvy.com (HELO pastel.home) ([108.161.115.152]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 06 Dec 2012 23:07:41 -0500 Received: by pastel.home (Postfix, from userid 20848) id D588F58F5C; Thu, 6 Dec 2012 23:07:39 -0500 (EST) From: Stefan Monnier To: Jambunathan K Subject: Re: bug#11095: [PATCH] Re: bug#11095: 24.0.94; hi-lock-face-buffer/unhighlight-regexp': Augment? Message-ID: References: <81d37z271c.fsf@gmail.com> <87626i2i4r.fsf@gmail.com> <87zk1r3h3b.fsf@gmail.com> <87lidaan4g.fsf@gmail.com> <87a9tq6cs5.fsf@gmail.com> Date: Thu, 06 Dec 2012 23:07:39 -0500 In-Reply-To: <87a9tq6cs5.fsf@gmail.com> (Jambunathan K.'s message of "Fri, 07 Dec 2012 03:53:06 +0530") 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: 0.8 (/) X-Debbugs-Envelope-To: 11095 Cc: 11095@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: -0.0 (/) >>>> Seems to be working now (haven't tried before my recent changes, tho). >>> By now, if you mean 111134, the unhighlighting is not working as >>> expected. >> Can you give a recipe, because "it works for me", > How about a screenshot? That can work as well, tho since it's not a display problem, explanations work at least as well, usually better. I never use hi-lock, so don't assume I know how it's expected to behave. > Recipe-1: > Couple of C-x w h, followed by C-x w r. Note the cursor position > and the choice offered. I don't see anything wrong with the cursor position. Please explain. > See screenshot. Why is there no default offered Don't know, should there be one? > and why even absurd candidates are offered? Which absurd candidates are you talking about? > Recipe-2: > Turn off font-lock-mode. > Couple of C-x w h and then try C-x w r, C-u C-x w r, try from menu. What am I supposed to see when I try that? Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 06 23:44:25 2012 Received: (at 11095) by debbugs.gnu.org; 7 Dec 2012 04:44:25 +0000 Received: from localhost ([127.0.0.1]:57618 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TgpnU-0004B5-QQ for submit@debbugs.gnu.org; Thu, 06 Dec 2012 23:44:25 -0500 Received: from mail-pb0-f44.google.com ([209.85.160.44]:40539) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TgpnR-0004Au-T8 for 11095@debbugs.gnu.org; Thu, 06 Dec 2012 23:44:23 -0500 Received: by mail-pb0-f44.google.com with SMTP id uo1so87519pbc.3 for <11095@debbugs.gnu.org>; Thu, 06 Dec 2012 20:44:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-type; bh=HTlMwGBdN2AM+tuUGKPYmqc1l6GTRnzyCsp0sFxvnmA=; b=LyqywUeIkCpC+B3l5uo/5/TKiaNo/VyLHVEkZ7JX/ZgOXGG7fU3K/Lr8XIxI25V9jd grD4/G/GvYssHjcSulu0tAoGkL+boUVB4lq0vIvJ3zfHe4AUZ/xWnxfHEuZ8LxB4p96w fIeYYNSU617McvHGw65NZnKYLYSWlJntygpnnNyPJpLrpp89blFit1pzij7w8eEn/l/I AmGEd85vYVa5RHhKI3pOzzlEe/mek3KM3ib7nSZSz5MYKiGTWSh/wto00aabLjKbk7jD bmCgX9vXQ/I6FXOKS+O+LQPNw25gzRai901HZ+WsmVnxwBxow4kXul+GZXGDih6qLT0g Xclw== Received: by 10.68.233.201 with SMTP id ty9mr12514477pbc.14.1354855442534; Thu, 06 Dec 2012 20:44:02 -0800 (PST) Received: from debian-6.05 ([115.242.172.118]) by mx.google.com with ESMTPS id uk9sm5970329pbc.63.2012.12.06.20.43.59 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 06 Dec 2012 20:44:01 -0800 (PST) From: Jambunathan K To: Stefan Monnier Subject: Re: bug#11095: [PATCH] Re: bug#11095: 24.0.94; hi-lock-face-buffer/unhighlight-regexp': Augment? In-Reply-To: (Stefan Monnier's message of "Thu, 06 Dec 2012 23:07:39 -0500") References: <81d37z271c.fsf@gmail.com> <87626i2i4r.fsf@gmail.com> <87zk1r3h3b.fsf@gmail.com> <87lidaan4g.fsf@gmail.com> <87a9tq6cs5.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Date: Fri, 07 Dec 2012 10:16:56 +0530 Message-ID: <87sj7iii4f.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 11095 Cc: 11095@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 (--) Stefan Monnier writes: >>>>> Seems to be working now (haven't tried before my recent changes, tho). >>>> By now, if you mean 111134, the unhighlighting is not working as >>>> expected. >>> Can you give a recipe, because "it works for me", >> How about a screenshot? > > That can work as well, tho since it's not a display problem, > explanations work at least as well, usually better. > I never use hi-lock, so don't assume I know how it's expected to > behave. This is the behaviour I am expecting. This is what I circulated in etc/NEWS entry. *** Unhighlighting command (`hi-lock-unface-buffer') now un-highlights text at point. When called interactively with C-u, removes all highlighting in current buffer. We seem to be talking too much but not taking a moment to understand to each other. I will exchange no more mails with you in this thread, sorry. You reply, but with no effort on your part to understand what I am saying or showing you. I am happy with whatever you conceive to be useful. > >> Recipe-1: >> Couple of C-x w h, followed by C-x w r. Note the cursor position >> and the choice offered. > > I don't see anything wrong with the cursor position. Please explain. > >> See screenshot. Why is there no default offered > > Don't know, should there be one? > >> and why even absurd candidates are offered? > > Which absurd candidates are you talking about? > >> Recipe-2: >> Turn off font-lock-mode. >> Couple of C-x w h and then try C-x w r, C-u C-x w r, try from menu. > > What am I supposed to see when I try that? > > > Stefan > > > > -- From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 07 11:56:18 2012 Received: (at 11095) by debbugs.gnu.org; 7 Dec 2012 16:56:18 +0000 Received: from localhost ([127.0.0.1]:59156 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Th1Dl-000735-Ij for submit@debbugs.gnu.org; Fri, 07 Dec 2012 11:56:17 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:12454) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Th1Dj-00072y-IZ for 11095@debbugs.gnu.org; Fri, 07 Dec 2012 11:56:15 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0FAG6Zu09soXOY/2dsb2JhbABEsEiDSYEIghUBAQQBViMFCws0EhQYDSQth28FugmFZYpfA4hCmnGBWIMH X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="209299463" Received: from 108-161-115-152.dsl.teksavvy.com (HELO pastel.home) ([108.161.115.152]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 07 Dec 2012 11:55:55 -0500 Received: by pastel.home (Postfix, from userid 20848) id B484558D3B; Fri, 7 Dec 2012 11:55:54 -0500 (EST) From: Stefan Monnier To: Jambunathan K Subject: Re: bug#11095: [PATCH] Re: bug#11095: 24.0.94; hi-lock-face-buffer/unhighlight-regexp': Augment? Message-ID: References: <81d37z271c.fsf@gmail.com> <87626i2i4r.fsf@gmail.com> <87zk1r3h3b.fsf@gmail.com> <87lidaan4g.fsf@gmail.com> <87a9tq6cs5.fsf@gmail.com> <87sj7iii4f.fsf@gmail.com> Date: Fri, 07 Dec 2012 11:55:54 -0500 In-Reply-To: <87sj7iii4f.fsf@gmail.com> (Jambunathan K.'s message of "Fri, 07 Dec 2012 10:16:56 +0530") 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: 0.8 (/) X-Debbugs-Envelope-To: 11095 Cc: 11095@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: -0.0 (/) > This is the behaviour I am expecting. This is what I > circulated in etc/NEWS entry. > *** Unhighlighting command (`hi-lock-unface-buffer') now un-highlights > text at point. When called interactively with C-u, removes all > highlighting in current buffer. Oh, right, I had forgotten about that. Indeed, the default regexp choice had a bug and a misfeature. Should be fixed now. > We seem to be talking too much but not taking a moment to understand to > each other. I generally have many conversions in flight at the same time, so it really helps if you repeat more of the context. E.g. making it clear whether you're talking about a regression, an old bug, a request for a new feature, a reminder for god-knows-what, ... > You reply, but with no effort on your part to understand what I > am saying or showing you. I'm sorry you feel I'm not making enough efforts. Maintaining Emacs takes a lot of time, so please bear with me and try to help me understand faster by giving me as many details as possible. For example, often sending a short patch of code is a good way forward, or a *precise* recipe telling what happens and what should have happened instead (I assure you I won't be offended even if some parts are too obvious). Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 08 07:47:40 2012 Received: (at 11095) by debbugs.gnu.org; 8 Dec 2012 12:47:40 +0000 Received: from localhost ([127.0.0.1]:60013 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ThJoh-0007kN-Sg for submit@debbugs.gnu.org; Sat, 08 Dec 2012 07:47:40 -0500 Received: from mail-pa0-f44.google.com ([209.85.220.44]:43447) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ThJof-0007kE-A2 for 11095@debbugs.gnu.org; Sat, 08 Dec 2012 07:47:38 -0500 Received: by mail-pa0-f44.google.com with SMTP id hz11so1045828pad.3 for <11095@debbugs.gnu.org>; Sat, 08 Dec 2012 04:47:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=VmVOg2g8F+yNwEpagTHeXvJI81cHKOqH1zyh0+GWg3U=; b=X6hp8HthbZ8eM/4eRL29Vjrq9kRhrnnLY1f+1GdwA18tZQsmiBKp35unC6J20v2gYa cM5L1hzkKjLHR9UoxNgLcHz38DWkT2bsgn+e5l+LGx/wL1H+HQXpdoUFhFSYOwTdp8Pz r2Un4BJzeFNECdYJ+TSuFdvEzIiudgB6WE14tZtrqKRBtnTpE7D+5k0QULZAmRnYgd8P AzHIwar+plRXYTcPuNT+FG3ze5wK2BR89lEaWiwbyIK5syXMs6zadYrfjVk4+5cInXyg 60DWHAJ2tZkVLNkP3Gwn2IZHuXkpksYPSu7qcolGtKoB7gTnE6nrN/V8Jrvc66MfkphF WStA== Received: by 10.66.86.102 with SMTP id o6mr20907394paz.11.1354970830145; Sat, 08 Dec 2012 04:47:10 -0800 (PST) Received: from debian-6.05 ([101.63.139.66]) by mx.google.com with ESMTPS id sg7sm8414248pbb.50.2012.12.08.04.47.07 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 08 Dec 2012 04:47:09 -0800 (PST) From: Jambunathan K To: Stefan Monnier Subject: Re: bug#11095: [PATCH] Re: bug#11095: 24.0.94; hi-lock-face-buffer/unhighlight-regexp': Augment? References: <81d37z271c.fsf@gmail.com> <87626i2i4r.fsf@gmail.com> <87zk1r3h3b.fsf@gmail.com> <87lidaan4g.fsf@gmail.com> <87a9tq6cs5.fsf@gmail.com> <87sj7iii4f.fsf@gmail.com> Date: Sat, 08 Dec 2012 18:20:03 +0530 In-Reply-To: (Stefan Monnier's message of "Fri, 07 Dec 2012 11:55:54 -0500") Message-ID: <87pq2k6744.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 11095 Cc: 11095@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 (--) --=-=-= Content-Type: text/plain Attaching a patch. See ChangeLog for details. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=bug11095-rev111152-1.diff === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-12-07 16:48:42 +0000 +++ lisp/ChangeLog 2012-12-08 12:43:29 +0000 @@ -1,3 +1,11 @@ +2012-12-08 Jambunathan K + + * hi-lock.el (hi-lock--regexps-at-point): Use a better heuristic + that depends on actual faces rather than their common prefix. + (hi-lock-unface-buffer): Fix unhighlight all, when using overlays. + (hi-lock-set-pattern): Refuse to highlight an already highlighted + regexp. + 2012-12-07 Stefan Monnier * hi-lock.el (hi-lock-unface-buffer): If there's no matching regexp at === modified file 'lisp/hi-lock.el' --- lisp/hi-lock.el 2012-12-07 16:48:42 +0000 +++ lisp/hi-lock.el 2012-12-08 10:38:25 +0000 @@ -471,19 +471,19 @@ (let ((regexp (get-char-property (point) 'hi-lock-overlay-regexp))) (when regexp (push regexp regexps))) ;; With font-locking on, check if the cursor is on an highlighted text. - ;; Checking for hi-lock face is a good heuristic. FIXME: use "hi-lock-". - (and (string-match "\\`hi-" (face-name (face-at-point))) - (let* ((hi-text - (buffer-substring-no-properties - (previous-single-property-change (point) 'face) - (next-single-property-change (point) 'face)))) - ;; Compute hi-lock patterns that match the - ;; highlighted text at point. Use this later in - ;; during completing-read. - (dolist (hi-lock-pattern hi-lock-interactive-patterns) - (let ((regexp (car hi-lock-pattern))) - (if (string-match regexp hi-text) - (push regexp regexps)))))) + (and (member (list 'quote (face-at-point)) + (mapcar #'cadadr hi-lock-interactive-patterns)) + (let* ((hi-text + (buffer-substring-no-properties + (previous-single-property-change (point) 'face) + (next-single-property-change (point) 'face)))) + ;; Compute hi-lock patterns that match the + ;; highlighted text at point. Use this later in + ;; during completing-read. + (dolist (hi-lock-pattern hi-lock-interactive-patterns) + (let ((regexp (car hi-lock-pattern))) + (if (string-match regexp hi-text) + (push regexp regexps)))))) regexps)) (defvar-local hi-lock--last-face nil) @@ -541,6 +541,7 @@ (dolist (keyword (if (eq regexp t) hi-lock-interactive-patterns (list (assoc regexp hi-lock-interactive-patterns)))) (when keyword + (setq regexp (car keyword)) (let ((face (cadr (cadr (cadr keyword))))) ;; Make `face' the next one to use by default. (setq hi-lock--last-face @@ -628,7 +629,8 @@ ;; Hashcons the regexp, so it can be passed to remove-overlays later. (setq regexp (hi-lock--hashcons regexp)) (let ((pattern (list regexp (list 0 (list 'quote face) t)))) - (unless (member pattern hi-lock-interactive-patterns) + ;; Refuse to highlight a text that is already highlighted. + (unless (assoc regexp hi-lock-interactive-patterns) (push pattern hi-lock-interactive-patterns) (if font-lock-mode (progn --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 09 23:24:21 2012 Received: (at 11095) by debbugs.gnu.org; 10 Dec 2012 04:24:21 +0000 Received: from localhost ([127.0.0.1]:34657 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Thuuj-0006kG-1D for submit@debbugs.gnu.org; Sun, 09 Dec 2012 23:24:21 -0500 Received: from mail-pa0-f44.google.com ([209.85.220.44]:45735) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Thuuf-0006k5-Gn for 11095@debbugs.gnu.org; Sun, 09 Dec 2012 23:24:18 -0500 Received: by mail-pa0-f44.google.com with SMTP id hz11so1704520pad.3 for <11095@debbugs.gnu.org>; Sun, 09 Dec 2012 20:23:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=KdpfcxFQ3M8UHI+ngHHHmmZN7HYjlpImFLhnmtdJx4U=; b=RAKaFOf4fA/R2YZL2h39/jNpooY2hwpseDdTK1gRX7Mvu0xDmFkJlD3w55tmZG5FKl b7B2f44T8oVI3oRbHVJtHX2i8JCHU0q3BIBQ+F07UiX8+6P96OwfHNpnC+f3KspDov1j iSRBu56YQ1uPYBtEIw6sww1DqcgfABtXal1lsdaOVulfwYKROINz8HXnJXktV0SF8H7e 6djoLkaac6+DXEYJ+qEsaEBsv0Z3aAhmD8eBUffKu2VO8R2s3ycp3vj3KyW3WXEZco6/ iXqTnzuIA6u4Iul6CExDguV00EGJZmrFSucKnsQYZKtNVAoIsfFthN/ta0pjF78zFhT3 1QBg== Received: by 10.69.1.71 with SMTP id be7mr35946918pbd.45.1355113422225; Sun, 09 Dec 2012 20:23:42 -0800 (PST) Received: from debian-6.05 ([115.241.51.212]) by mx.google.com with ESMTPS id ip8sm11106684pbc.36.2012.12.09.20.23.39 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 09 Dec 2012 20:23:41 -0800 (PST) From: Jambunathan K To: Stefan Monnier Subject: Re: bug#11095: [PATCH] Re: bug#11095: 24.0.94; hi-lock-face-buffer/unhighlight-regexp': Augment? References: <81d37z271c.fsf@gmail.com> <87626i2i4r.fsf@gmail.com> <87zk1r3h3b.fsf@gmail.com> <87lidaan4g.fsf@gmail.com> <87a9tq6cs5.fsf@gmail.com> <87sj7iii4f.fsf@gmail.com> <87pq2k6744.fsf@gmail.com> Date: Mon, 10 Dec 2012 09:56:47 +0530 In-Reply-To: <87pq2k6744.fsf@gmail.com> (Jambunathan K.'s message of "Sat, 08 Dec 2012 18:20:03 +0530") Message-ID: <87ip8a352w.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 11095 Cc: 11095@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 (--) --=-=-= Content-Type: text/plain This patch which /improves/ status quo. Applies cleanly on top of earlier patch at http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11095#94 This patch makes sure that faces used for highlighting are always distinct and recycles them only when it is inevitable. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=bug11095-rev111152-2.diff === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-12-10 04:18:24 +0000 +++ lisp/ChangeLog 2012-12-10 04:18:59 +0000 @@ -1,3 +1,11 @@ +2012-12-10 Jambunathan K + + * hi-lock.el (hi-lock--last-face): Remove it. + (hi-lock--unused-faces): New variable, a free list of faces + available for highlighting text. + (hi-lock-unface-buffer, hi-lock-read-face-name): Propagate above + changes. + 2012-12-08 Jambunathan K * hi-lock.el (hi-lock--regexps-at-point): Use a better heuristic === modified file 'lisp/hi-lock.el' --- lisp/hi-lock.el 2012-12-08 13:06:46 +0000 +++ lisp/hi-lock.el 2012-12-10 04:06:21 +0000 @@ -486,7 +486,9 @@ updated as you type." (push regexp regexps)))))) regexps)) -(defvar-local hi-lock--last-face nil) +(defvar-local hi-lock--unused-faces nil + "List of faces that is not used and is available for highlighting new text. +Face names from this list come from `hi-lock-face-defaults'.") ;;;###autoload (defalias 'unhighlight-regexp 'hi-lock-unface-buffer) @@ -544,9 +546,7 @@ then remove all hi-lock highlighting." (setq regexp (car keyword)) (let ((face (cadr (cadr (cadr keyword))))) ;; Make `face' the next one to use by default. - (setq hi-lock--last-face - (cadr (member (symbol-name face) - (reverse hi-lock-face-defaults))))) + (add-to-list 'hi-lock--unused-faces (face-name face))) (font-lock-remove-keywords nil (list keyword)) (setq hi-lock-interactive-patterns (delq keyword hi-lock-interactive-patterns)) @@ -609,20 +609,26 @@ not suitable." "Return face for interactive highlighting. When `hi-lock-auto-select-face' is non-nil, just return the next face. Otherwise, read face name from minibuffer with completion and history." - (let ((default (or (cadr (member hi-lock--last-face hi-lock-face-defaults)) - (car hi-lock-face-defaults)))) - (setq hi-lock--last-face + (unless hi-lock-interactive-patterns + (setq hi-lock--unused-faces hi-lock-face-defaults)) + (let* ((last-used-face + (when hi-lock-interactive-patterns + (face-name (cadar (cdar (cdar hi-lock-interactive-patterns)))))) + (defaults (append hi-lock--unused-faces + (cdr (member last-used-face hi-lock-face-defaults)) + hi-lock-face-defaults)) + face) (if (and hi-lock-auto-select-face (not current-prefix-arg)) - default - (completing-read - (format "Highlight using face (default %s): " default) - obarray 'facep t nil 'face-name-history - (append (member default hi-lock-face-defaults) - hi-lock-face-defaults)))) - (unless (member hi-lock--last-face hi-lock-face-defaults) - (setq hi-lock-face-defaults - (append hi-lock-face-defaults (list hi-lock--last-face)))) - (intern hi-lock--last-face))) + (setq face (or (pop hi-lock--unused-faces) (car defaults))) + (setq face (completing-read + (format "Highlight using face (default %s): " + (car defaults)) + obarray 'facep t nil 'face-name-history defaults)) + ;; Update list of un-used faces. + (setq hi-lock--unused-faces (delete face hi-lock--unused-faces)) + ;; Grow the list of defaults. + (add-to-list 'hi-lock-face-defaults face t)) + (intern face))) (defun hi-lock-set-pattern (regexp face) "Highlight REGEXP with face FACE." --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 10 13:35:07 2012 Received: (at 11095-done) by debbugs.gnu.org; 10 Dec 2012 18:35:07 +0000 Received: from localhost ([127.0.0.1]:35868 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ti8C2-0002Jc-LO for submit@debbugs.gnu.org; Mon, 10 Dec 2012 13:35:07 -0500 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:54742) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ti8C0-0002JT-8b for 11095-done@debbugs.gnu.org; Mon, 10 Dec 2012 13:35:05 -0500 Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id qBAIYQxJ025587; Mon, 10 Dec 2012 13:34:26 -0500 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id A8592B415D; Mon, 10 Dec 2012 13:34:25 -0500 (EST) From: Stefan Monnier To: Jambunathan K Subject: Re: bug#11095: [PATCH] Re: bug#11095: 24.0.94; hi-lock-face-buffer/unhighlight-regexp': Augment? Message-ID: References: <81d37z271c.fsf@gmail.com> <87626i2i4r.fsf@gmail.com> <87zk1r3h3b.fsf@gmail.com> <87lidaan4g.fsf@gmail.com> <87a9tq6cs5.fsf@gmail.com> <87sj7iii4f.fsf@gmail.com> <87pq2k6744.fsf@gmail.com> <87ip8a352w.fsf@gmail.com> Date: Mon, 10 Dec 2012 13:34:25 -0500 In-Reply-To: <87ip8a352w.fsf@gmail.com> (Jambunathan K.'s message of "Mon, 10 Dec 2012 09:56:47 +0530") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4428=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4428> : streams <873207> : uri <1290332> X-Spam-Score: -1.7 (-) X-Debbugs-Envelope-To: 11095-done Cc: 11095-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.2 (--) > This patch makes sure that faces used for highlighting are always > distinct and recycles them only when it is inevitable. Installed with 2 changes: - replace "delete" with "remove" because it was applied to a list which is reachable from other places (basically, from other buffer's hi-lock--unused-faces). - introduced a helper hi-lock-keyword->face to get rid of those cadadadr (some of which needed `cl' even it was not `require'd). Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 10 15:35:37 2012 Received: (at 11095-done) by debbugs.gnu.org; 10 Dec 2012 20:35:37 +0000 Received: from localhost ([127.0.0.1]:35921 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TiA4e-00055m-9L for submit@debbugs.gnu.org; Mon, 10 Dec 2012 15:35:36 -0500 Received: from mail-pa0-f44.google.com ([209.85.220.44]:40590) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TiA4a-00055d-Nk for 11095-done@debbugs.gnu.org; Mon, 10 Dec 2012 15:35:34 -0500 Received: by mail-pa0-f44.google.com with SMTP id hz11so2260347pad.3 for <11095-done@debbugs.gnu.org>; Mon, 10 Dec 2012 12:34:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=X9fc5sLof62gKpXoxKNpf9syQWo8eBHBrhclWS+3f2w=; b=jXIz/L0nyhILEx0PgyRmoGDAqVjoTVK4BHiusxSYz7nnv7PZM8/xZSFFTLO18AT6DR X4q0f8YmCjDwGMJUSbHmQeR8M9KqFqPBCmAwSPWeydvdu/GS57H/ReKerHWmVOitWRyw NZ2Qey3+xPYlAffhnlfgc+P7WSlCBpdMvwKox5jmOLfGbYQwsUwlz4ZLXh4MV3f0cF/V UArJoNibrKKZsaTlX2NHv1LpVZ+hKNLa7VuLliLIlER52Pbzt96vyRkfmom4LYYm8VXQ SuTmOUw2l7ZOPhK277PXzR4jxMPQz8K3xy6WJgcOhjPwRirPhyJOHBG6w+IVORia5CGv OjVw== Received: by 10.68.204.103 with SMTP id kx7mr42555094pbc.33.1355171694910; Mon, 10 Dec 2012 12:34:54 -0800 (PST) Received: from debian-6.05 ([101.62.41.16]) by mx.google.com with ESMTPS id ir4sm5951426pbc.41.2012.12.10.12.34.51 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 10 Dec 2012 12:34:54 -0800 (PST) From: Jambunathan K To: Stefan Monnier Subject: Re: bug#11095: [PATCH] Re: bug#11095: 24.0.94; hi-lock-face-buffer/unhighlight-regexp': Augment? References: <81d37z271c.fsf@gmail.com> <87626i2i4r.fsf@gmail.com> <87zk1r3h3b.fsf@gmail.com> <87lidaan4g.fsf@gmail.com> <87a9tq6cs5.fsf@gmail.com> <87sj7iii4f.fsf@gmail.com> <87pq2k6744.fsf@gmail.com> <87ip8a352w.fsf@gmail.com> Date: Tue, 11 Dec 2012 02:07:58 +0530 In-Reply-To: (Stefan Monnier's message of "Mon, 10 Dec 2012 13:34:25 -0500") Message-ID: <87lid57ie1.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 11095-done Cc: 11095-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 (--) --=-=-= Content-Type: text/plain Stefan Monnier writes: >> This patch makes sure that faces used for highlighting are always >> distinct and recycles them only when it is inevitable. > > Installed with 2 changes: > - replace "delete" with "remove" because it was applied to a list which > is reachable from other places (basically, from other buffer's > hi-lock--unused-faces). Attaching a patch with following changes. (This is the last lap) 1. Fix following bug when `font-lock-mode' is disabled. ,---- | Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil) | buffer-substring-no-properties(nil nil) | (let* ((hi-text (buffer-substring-no-properties (previous-single-property-change (point) (quote face)) (next-single-property-change (point) (quote face))))) (progn (let ((--dolist-tail-- hi-lock-interactive-patterns)) (while --dolist-tail-- (let ((hi-lock-pattern (car --dolist-tail--))) (let ((regexp ...)) (if (string-match regexp hi-text) (setq regexps ...))) (setq --dolist-tail-- (cdr --dolist-tail--))))))) | (and (memq (face-at-point) (mapcar (function hi-lock-keyword->face) hi-lock-interactive-patterns)) (let* ((hi-text (buffer-substring-no-properties (previous-single-property-change (point) (quote face)) (next-single-property-change (point) (quote face))))) (progn (let ((--dolist-tail-- hi-lock-interactive-patterns)) (while --dolist-tail-- (let ((hi-lock-pattern ...)) (let (...) (if ... ...)) (setq --dolist-tail-- (cdr --dolist-tail--)))))))) | (let ((regexps (quote nil))) (let ((regexp (get-char-property (point) (quote hi-lock-overlay-regexp)))) (if regexp (progn (setq regexps (cons regexp regexps))))) (and (memq (face-at-point) (mapcar (function hi-lock-keyword->face) hi-lock-interactive-patterns)) (let* ((hi-text (buffer-substring-no-properties (previous-single-property-change (point) (quote face)) (next-single-property-change (point) (quote face))))) (progn (let ((--dolist-tail-- hi-lock-interactive-patterns)) (while --dolist-tail-- (let (...) (let ... ...) (setq --dolist-tail-- ...))))))) regexps) | hi-lock--regexps-at-point() | (or (hi-lock--regexps-at-point) (mapcar (function car) hi-lock-interactive-patterns)) | (let* ((defaults (or (hi-lock--regexps-at-point) (mapcar (function car) hi-lock-interactive-patterns)))) (list (completing-read (if (null defaults) "Regexp to unhighlight: " (format "Regexp to unhighlight (default %s): " (car defaults))) hi-lock-interactive-patterns nil t nil nil defaults))) | (cond (current-prefix-arg (list t)) ((and (display-popup-menus-p) (listp last-nonmenu-event) use-dialog-box) (catch (quote snafu) (or (x-popup-menu t (cons (quote keymap) (cons "Select Pattern to Unhighlight" (mapcar ... hi-lock-interactive-patterns)))) (throw (quote snafu) (quote ("")))))) (t (if hi-lock-interactive-patterns nil (error "No highlighting to remove")) (let* ((defaults (or (hi-lock--regexps-at-point) (mapcar (function car) hi-lock-interactive-patterns)))) (list (completing-read (if (null defaults) "Regexp to unhighlight: " (format "Regexp to unhighlight (default %s): " (car defaults))) hi-lock-interactive-patterns nil t nil nil defaults))))) | call-interactively(unhighlight-regexp nil nil) `---- 2. Add a NEWS entry. 3. Re-works how hi-lock--unused-faces is allocated. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=bug11095-rev111175.patch === modified file 'etc/NEWS' --- etc/NEWS 2012-12-10 12:38:49 +0000 +++ etc/NEWS 2012-12-10 20:08:35 +0000 @@ -92,6 +92,12 @@ when its arg ADJACENT is non-nil (when c it works like the utility `uniq'. Otherwise by default it deletes duplicate lines everywhere in the region without regard to adjacency. +** Interactive highlighting +*** New user variable `hi-lock-auto-select-face'. +*** Unhighlighting command (`hi-lock-unface-buffer') now un-highlights +text at point. When called interactively with a non-nil prefix, +removes all highlighting in current buffer. + ** Tramp +++ *** New connection method "adb", which allows to access Android === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-12-10 18:33:59 +0000 +++ lisp/ChangeLog 2012-12-10 20:19:36 +0000 @@ -1,5 +1,14 @@ 2012-12-10 Jambunathan K + * hi-lock.el (hi-lock--regexps-at-point): When `font-lock-mode' is + disabled, highlighting will use overlays. So use + `*-single-char-property-change' instead of + ``*-single-property-change'. + (hi-lock-read-face-name): Initialize `hi-lock--unused-faces' only + once. + +2012-12-10 Jambunathan K + * hi-lock.el: Refine the choice of default face. (hi-lock-keyword->face): New function. Use it wherever we used cadadadr instead. === modified file 'lisp/hi-lock.el' --- lisp/hi-lock.el 2012-12-10 18:33:59 +0000 +++ lisp/hi-lock.el 2012-12-10 19:42:51 +0000 @@ -478,8 +478,8 @@ updated as you type." (mapcar #'hi-lock-keyword->face hi-lock-interactive-patterns)) (let* ((hi-text (buffer-substring-no-properties - (previous-single-property-change (point) 'face) - (next-single-property-change (point) 'face)))) + (previous-single-char-property-change (point) 'face) + (next-single-char-property-change (point) 'face)))) ;; Compute hi-lock patterns that match the ;; highlighted text at point. Use this later in ;; during completing-read. @@ -611,8 +611,10 @@ not suitable." "Return face for interactive highlighting. When `hi-lock-auto-select-face' is non-nil, just return the next face. Otherwise, read face name from minibuffer with completion and history." - (unless hi-lock-interactive-patterns - (setq hi-lock--unused-faces hi-lock-face-defaults)) + (unless (or hi-lock-interactive-patterns hi-lock--unused-faces) + ;; This is the very first request for interactive highlighting. + ;; Initialize unused faces list. + (setq hi-lock--unused-faces (copy-sequence hi-lock-face-defaults))) (let* ((last-used-face (when hi-lock-interactive-patterns (face-name (hi-lock-keyword->face @@ -628,7 +630,7 @@ Otherwise, read face name from minibuffe (car defaults)) obarray 'facep t nil 'face-name-history defaults)) ;; Update list of un-used faces. - (setq hi-lock--unused-faces (remove face hi-lock--unused-faces)) + (setq hi-lock--unused-faces (delete face hi-lock--unused-faces)) ;; Grow the list of defaults. (add-to-list 'hi-lock-face-defaults face t)) (intern face))) --=-=-= Content-Type: text/plain > - introduced a helper hi-lock-keyword->face to get rid of those cadadadr > (some of which needed `cl' even it was not `require'd). > > > Stefan --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 10 16:27:49 2012 Received: (at 11095-done) by debbugs.gnu.org; 10 Dec 2012 21:27:49 +0000 Received: from localhost ([127.0.0.1]:35954 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TiAtA-0006Ji-SH for submit@debbugs.gnu.org; Mon, 10 Dec 2012 16:27:49 -0500 Received: from chene.dit.umontreal.ca ([132.204.246.20]:40064) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TiAt8-0006Ja-QL for 11095-done@debbugs.gnu.org; Mon, 10 Dec 2012 16:27:47 -0500 Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id qBALRC9M026184; Mon, 10 Dec 2012 16:27:12 -0500 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id B4BAAB415D; Mon, 10 Dec 2012 16:27:07 -0500 (EST) From: Stefan Monnier To: Jambunathan K Subject: Re: bug#11095: [PATCH] Re: bug#11095: 24.0.94; hi-lock-face-buffer/unhighlight-regexp': Augment? Message-ID: References: <81d37z271c.fsf@gmail.com> <87626i2i4r.fsf@gmail.com> <87zk1r3h3b.fsf@gmail.com> <87lidaan4g.fsf@gmail.com> <87a9tq6cs5.fsf@gmail.com> <87sj7iii4f.fsf@gmail.com> <87pq2k6744.fsf@gmail.com> <87ip8a352w.fsf@gmail.com> <87lid57ie1.fsf@gmail.com> Date: Mon, 10 Dec 2012 16:27:07 -0500 In-Reply-To: <87lid57ie1.fsf@gmail.com> (Jambunathan K.'s message of "Tue, 11 Dec 2012 02:07:58 +0530") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4428=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4428> : streams <873207> : uri <1290446> X-Spam-Score: -3.6 (---) X-Debbugs-Envelope-To: 11095-done Cc: 11095-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: -3.6 (---) > (let* ((hi-text > (buffer-substring-no-properties > - (previous-single-property-change (point) 'face) > - (next-single-property-change (point) 'face)))) > + (previous-single-char-property-change (point) 'face) > + (next-single-char-property-change (point) 'face)))) > ;; Compute hi-lock patterns that match the > ;; highlighted text at point. Use this later in > ;; during completing-read. But when overlays are used, the previous code should have found the overlay already. IIUC the above patch works only because of an inconsistency between previous-single-property-change and previous-single-char-property-change where the first may return nil whereas the other always returns an integer. But now that I look at this code I see that it doesn't work right for its intended use case (i.e. when font-lock-mode is on) when point is at the very start/end of the matched. So I've installed a completely different patch instead (see below). There should be an easier way to do it :-( > - (unless hi-lock-interactive-patterns > - (setq hi-lock--unused-faces hi-lock-face-defaults)) > + (unless (or hi-lock-interactive-patterns hi-lock--unused-faces) > + ;; This is the very first request for interactive highlighting. > + ;; Initialize unused faces list. > + (setq hi-lock--unused-faces (copy-sequence hi-lock-face-defaults))) [...] > - (setq hi-lock--unused-faces (remove face hi-lock--unused-faces)) > + (setq hi-lock--unused-faces (delete face hi-lock--unused-faces)) Why? Stefan === modified file 'lisp/hi-lock.el' --- lisp/hi-lock.el 2012-12-10 18:33:59 +0000 +++ lisp/hi-lock.el 2012-12-10 21:16:31 +0000 @@ -474,19 +474,33 @@ (let ((regexp (get-char-property (point) 'hi-lock-overlay-regexp))) (when regexp (push regexp regexps))) ;; With font-locking on, check if the cursor is on a highlighted text. - (and (memq (face-at-point) - (mapcar #'hi-lock-keyword->face hi-lock-interactive-patterns)) + (let ((face-after (get-text-property (point) 'face)) + (face-before + (unless (bobp) (get-text-property (1- (point)) 'face))) + (faces (mapcar #'hi-lock-keyword->face + hi-lock-interactive-patterns))) + (unless (memq face-before faces) (setq face-before nil)) + (unless (memq face-after faces) (setq face-after nil)) + (when (and face-before face-after (not (eq face-before face-after))) + (setq face-before nil)) + (when (or face-after face-before) (let* ((hi-text (buffer-substring-no-properties - (previous-single-property-change (point) 'face) - (next-single-property-change (point) 'face)))) + (if face-before + (or (previous-single-property-change (point) 'face) + (point-min)) + (point)) + (if face-after + (or (next-single-property-change (point) 'face) + (point-max)) + (point))))) ;; Compute hi-lock patterns that match the ;; highlighted text at point. Use this later in ;; during completing-read. (dolist (hi-lock-pattern hi-lock-interactive-patterns) (let ((regexp (car hi-lock-pattern))) (if (string-match regexp hi-text) - (push regexp regexps)))))) + (push regexp regexps))))))) regexps)) (defvar-local hi-lock--unused-faces nil From unknown Fri Aug 15 16:56:11 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 08 Jan 2013 12: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