From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 06 12:22:55 2013 Received: (at submit) by debbugs.gnu.org; 6 Mar 2013 17:22:55 +0000 Received: from localhost ([127.0.0.1]:34531 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UDI3K-0003gh-I6 for submit@debbugs.gnu.org; Wed, 06 Mar 2013 12:22:54 -0500 Received: from eggs.gnu.org ([208.118.235.92]:43523) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UDI3I-0003gV-3A for submit@debbugs.gnu.org; Wed, 06 Mar 2013 12:22:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UDI2j-0001o5-Fu for submit@debbugs.gnu.org; Wed, 06 Mar 2013 12:22:20 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-102.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, USER_IN_WHITELIST autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:45811) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDI2j-0001o1-Dp for submit@debbugs.gnu.org; Wed, 06 Mar 2013 12:22:17 -0500 Received: from eggs.gnu.org ([208.118.235.92]:54839) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDI2h-0001qK-Vi for bug-gnu-emacs@gnu.org; Wed, 06 Mar 2013 12:22:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UDI2g-0001nC-Np for bug-gnu-emacs@gnu.org; Wed, 06 Mar 2013 12:22:15 -0500 Received: from mail-qa0-f46.google.com ([209.85.216.46]:38801) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDI2g-0001n3-KU for bug-gnu-emacs@gnu.org; Wed, 06 Mar 2013 12:22:14 -0500 Received: by mail-qa0-f46.google.com with SMTP id o13so2665395qaj.19 for ; Wed, 06 Mar 2013 09:22:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:sender:from:date:x-google-sender-auth :message-id:subject:to:content-type:x-gm-message-state; bh=heHoNkx9nG2inGVFuoaptru5GTjEPjC5LBmeLNa7+so=; b=Bk3PInl1d5gm4FeXdQrdqk+L5zBPgO7Wap0eO3+KWxWUMTyV/UoU4C5WacOTMy4SNr BeDXIeEvqhKlZo4zjjIVrvhL++dCL2QBXQNvxrr6yhx2jo/3jb89u/OBHMG67A+rsEnV ptYY5fDWMJQBTSLzI55v6jRzeosSXfRGpV++lvsC4mvADFczPGj33kkRTf3PRQisbNqK xOHSQxF0X/k8cTKjXNEmk+nWmCVn/mLZZVx9IzmKGEPYXHPVEvcfIAkyxFU7oy73Fytw bB3sZGahbIerAGIQUjEjrKCM3fCtkx8vwT3gHdSznUffw2kd2qlLEjUYwAMq1vIFUxzD Cewg== X-Received: by 10.224.97.132 with SMTP id l4mr14960989qan.65.1362590533900; Wed, 06 Mar 2013 09:22:13 -0800 (PST) MIME-Version: 1.0 Received: by 10.49.17.231 with HTTP; Wed, 6 Mar 2013 09:21:43 -0800 (PST) From: Josh Date: Wed, 6 Mar 2013 09:21:43 -0800 X-Google-Sender-Auth: h-I1-5uRZor00t2i2zGPXuEybHg Message-ID: Subject: 24.3.50; highlight-regexp incorrectly retains partial state after buffer reversion To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQnOg+5Kn/Ll/8Q3wlQzcQMPN/+7cJmKOKShivrAd+6649mkjtXId2iETy843Yfe5zYUdxGw X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) 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.9 (------) I noticed two things that show that partial highlight-regexp state lingers after calling revert-buffer, see items 9 and 12. After buffer reversion, I would expect this state either to be completely backed out or to survive completely intact. Ideally both of these behaviors would be supported and under users' control. (1) emacs -Q foo.txt (2) insert `foo bar' into buffer and save (3) M-s h r foo RET RET (4) note that foo is highlighted with hi-yellow face (5) make a trivial edit to make buffer-modified-p be true (6) M-x revert-buffer and confirm (7) note that highlighting goes away as expected (8) M-s h r bar RET but do not respond to the prompt for the face (9) Expected default face: hi-yellow. Actual: hi-pink. (10) C-g to cancel the highlight-regexp command (11) M-s h u but do not respond to the prompt for a regexp (12) Expected: "No highlighting to remove". Actual: prompts for regexp with a default of foo. (13) Hit RET to accept the default regexp foo to unhighlight (14) M-s h u (15) note that "No highlighting to remove" appears, as should have happened after (11) In GNU Emacs 24.3.50.1 (x86_64-apple-darwin, NS apple-appkit-1187.34) of 2013-03-04 on bix Bzr revision: 111935 yamaoka@jpl.org-20130304102733-4qy111z41qwoh2as Windowing system distributor `Apple', version 10.3.1187 Configured using: `configure --host=x86_64-apple-darwin --build=i686-apple-darwin --with-ns' Important settings: value of $LC_CTYPE: en_US.UTF-8 value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Text Minor modes in effect: tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: f o o SPC f a b a r C-x C-s M-s h r f o o SPC M-x r e v e r t - b u f f y e s M-s h r b a r C-g M-s h u M-s h u M-x e r e p o r t - e m a c s - b u f h i g h l i g h t - r e g e x p SPC i n c o r r e c t l y SPC r e t a i n s SPC s t a t e SPC a f t e r SPC b u f f e r SPC r e v e r s i o n C-a C-k C-g M-x r e p o r t - e m a c s - b u g Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. foo.txt has auto save data; consider M-x recover-this-file Saving file /Users/jlf/tmp/foo.txt... Wrote /Users/jlf/tmp/foo.txt You can run the command `revert-buffer' with s-u Quit byte-code: No highlighting to remove Quit Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils hi-lock time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process ns multi-tty emacs) From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 06 14:11:37 2013 Received: (at 13891) by debbugs.gnu.org; 6 Mar 2013 19:11:37 +0000 Received: from localhost ([127.0.0.1]:34734 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UDJkT-0006N6-9a for submit@debbugs.gnu.org; Wed, 06 Mar 2013 14:11:37 -0500 Received: from mail-pb0-f43.google.com ([209.85.160.43]:58838) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UDJkM-0006Mn-SO for 13891@debbugs.gnu.org; Wed, 06 Mar 2013 14:11:32 -0500 Received: by mail-pb0-f43.google.com with SMTP id md12so6465246pbc.30 for <13891@debbugs.gnu.org>; Wed, 06 Mar 2013 11:10:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=/d2ez1nZp7HeGyt6nl89Y5JKiGiPuNqfi9Hb1Sl3RxU=; b=wDllSx0kZ8zleo0i2xPqBJhckWJnaSDhxvUF9fGiU6xE6LlQgAndZhffJskZPkjgD6 PY9T6w4pK4xm9PKmHOpz5bkzqtXPiMVlojgsobHnRnGYpOB96mqWCuLgCJyhsZYXGZqD Wus6WNHnTXf1Kp/YRSxjGZEddSGPxPQfEkqSRiOTbynZQ+vWwactG6TQ+JTJq27DxzB1 IO1adiadY8h9BsH8OoGl4be10gujJ2RCrWIsr0vdC6NQmo4FPn1Qm7kOx8s/sZIAk86G Dk1FtLszjGiw83A9GVNbk+fV7QdQMEkzleTnuwT0k7G+hvHh9jq/TltPYjE4c4Lkymn9 yhIQ== X-Received: by 10.68.135.136 with SMTP id ps8mr47879553pbb.2.1362597053600; Wed, 06 Mar 2013 11:10:53 -0800 (PST) Received: from debian-6.05 ([115.241.90.1]) by mx.google.com with ESMTPS id b9sm32484016pba.6.2013.03.06.11.10.50 (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Wed, 06 Mar 2013 11:10:52 -0800 (PST) From: Jambunathan K To: Josh Subject: Re: bug#13891: 24.3.50; highlight-regexp incorrectly retains partial state after buffer reversion References: Date: Thu, 07 Mar 2013 00:40:48 +0530 In-Reply-To: (josh@foxtail.org's message of "Wed, 6 Mar 2013 09:21:43 -0800") Message-ID: <87obewxs1z.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: -2.6 (--) X-Debbugs-Envelope-To: 13891 Cc: 13891@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 (--) I can circulate a patch for some or all of what you report below. Are you willing to apply the patch and give immediate feedback? Please confirm with Yes or No. Josh writes: > I noticed two things that show that partial highlight-regexp state > lingers after calling revert-buffer, see items 9 and 12. After buffer > reversion, I would expect this state either to be completely backed > out or to survive completely intact. Ideally both of these behaviors > would be supported and under users' control. > > (1) emacs -Q foo.txt > (2) insert `foo bar' into buffer and save > (3) M-s h r foo RET RET > (4) note that foo is highlighted with hi-yellow face > (5) make a trivial edit to make buffer-modified-p be true > (6) M-x revert-buffer and confirm > (7) note that highlighting goes away as expected > (8) M-s h r bar RET but do not respond to the prompt for the face > (9) Expected default face: hi-yellow. Actual: hi-pink. > (10) C-g to cancel the highlight-regexp command > (11) M-s h u but do not respond to the prompt for a regexp > (12) Expected: "No highlighting to remove". Actual: prompts for > regexp with a default of foo. > (13) Hit RET to accept the default regexp foo to unhighlight > (14) M-s h u > (15) note that "No highlighting to remove" appears, as should have > happened after (11) > > In GNU Emacs 24.3.50.1 (x86_64-apple-darwin, NS apple-appkit-1187.34) > of 2013-03-04 on bix > Bzr revision: 111935 yamaoka@jpl.org-20130304102733-4qy111z41qwoh2as > Windowing system distributor `Apple', version 10.3.1187 > Configured using: > `configure --host=x86_64-apple-darwin --build=i686-apple-darwin > --with-ns' > > Important settings: > value of $LC_CTYPE: en_US.UTF-8 > value of $LANG: en_US.UTF-8 > locale-coding-system: utf-8-unix > default enable-multibyte-characters: t > > Major mode: Text > > Minor modes in effect: > tooltip-mode: t > mouse-wheel-mode: t > tool-bar-mode: t > menu-bar-mode: t > file-name-shadow-mode: t > global-font-lock-mode: t > font-lock-mode: t > blink-cursor-mode: t > auto-composition-mode: t > auto-encryption-mode: t > auto-compression-mode: t > line-number-mode: t > transient-mark-mode: t > > Recent input: > f o o SPC f a b a r C-x C-s > M-s h r f o o SPC M-x r e v e r t > - b u f f y e s M-s h r b a > r C-g M-s h u M-s h u M-x e > r e p o r t - e m a c s - b u f > h i g h l i g h t - r e g e x p SPC i n c > o r r e c t l y SPC r e t a i n s SPC s t a t e SPC > a f t e r SPC b u f f e r SPC r e v e r s i o n C-a > C-k C-g M-x r e p o r t - e m a c s - b u g n> > > Recent messages: > For information about GNU Emacs and the GNU system, type C-h C-a. > foo.txt has auto save data; consider M-x recover-this-file > Saving file /Users/jlf/tmp/foo.txt... > Wrote /Users/jlf/tmp/foo.txt > You can run the command `revert-buffer' with s-u > Quit > byte-code: No highlighting to remove > Quit > > Load-path shadows: > None found. > > Features: > (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml > easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 > mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums > mm-util mail-prsvr mail-utils hi-lock time-date tooltip ediff-hook > vc-hooks lisp-float-type mwheel ns-win tool-bar dnd fontset image > regexp-opt fringe tabulated-list newcomment lisp-mode register page > menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock > syntax facemenu font-core frame cham georgian utf-8-lang misc-lang > vietnamese tibetan thai tai-viet lao korean japanese hebrew greek > romanian slovak czech european ethiopic indian cyrillic chinese > case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs > button faces cus-face macroexp files text-properties overlay sha1 md5 > base64 format env code-pages mule custom widget hashtable-print-readable > backquote make-network-process ns multi-tty emacs) > > > > -- From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 18 03:36:38 2013 Received: (at 13891) by debbugs.gnu.org; 18 Mar 2013 07:36:38 +0000 Received: from localhost ([127.0.0.1]:60776 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UHUcX-000403-KQ for submit@debbugs.gnu.org; Mon, 18 Mar 2013 03:36:37 -0400 Received: from mail-da0-f43.google.com ([209.85.210.43]:34115) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UHUcV-0003zm-13 for 13891@debbugs.gnu.org; Mon, 18 Mar 2013 03:36:35 -0400 Received: by mail-da0-f43.google.com with SMTP id u36so1183290dak.16 for <13891@debbugs.gnu.org>; Mon, 18 Mar 2013 00:34:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=GZ9k8zkhho+RphWpB2gMAhl7/kCPbPGD0zUSLIw1TdY=; b=x/xn5hXd61pgSIlBqRrpcgXOuu0hqKC4Ki+KDPsGN0nP3Xxu3S/N6hRsiLqK1zJS7Y tHNSh29YOG9JUpuyk4frJJUs06zr63Rf1JyTGoE5nW0IkBFVmAmWC8PVMhVhyY1MmpR9 blwOOGOJqln6QUhX0gk/74lklBOo7qpnQ/OmHxURgwcNoQX3dbwauhLZTrGoQhz+hV0M DL683F8XT+CDWfeUQ5Jzx7fid8t8SsGobtXl5mvgRuuXOOW8V6Qtpr64coSd2borI3Vk oW68ucueTg+AfYnwf7Vgw4zCqJA6wMqEvjAdIoVvmWkrbxWH7J9K2BDmt2JRELgh3Uk1 aRdw== X-Received: by 10.66.121.98 with SMTP id lj2mr8995594pab.166.1363592096619; Mon, 18 Mar 2013 00:34:56 -0700 (PDT) Received: from debian-6.05 ([101.63.157.124]) by mx.google.com with ESMTPS id xc4sm19244007pbc.41.2013.03.18.00.34.53 (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Mon, 18 Mar 2013 00:34:55 -0700 (PDT) From: Jambunathan K To: Josh Subject: Re: bug#13891: 24.3.50; highlight-regexp incorrectly retains partial state after buffer reversion References: <87obewxs1z.fsf@gmail.com> Date: Mon, 18 Mar 2013 13:05:08 +0530 In-Reply-To: <87obewxs1z.fsf@gmail.com> (Jambunathan K.'s message of "Thu, 07 Mar 2013 00:40:48 +0530") Message-ID: <87li9lma8j.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: 13891 Cc: 13891@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 (--) Josh > I can circulate a patch for some or all of what you report below. I am unable to keep this promise. I will let others take over this bug. Jambunathan K. From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 18 10:49:33 2013 Received: (at 13891) by debbugs.gnu.org; 18 Mar 2013 14:49:33 +0000 Received: from localhost ([127.0.0.1]:33639 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UHbNU-0006rE-U2 for submit@debbugs.gnu.org; Mon, 18 Mar 2013 10:49:33 -0400 Received: from mail-qc0-f175.google.com ([209.85.216.175]:54315) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UHbNR-0006qz-MK for 13891@debbugs.gnu.org; Mon, 18 Mar 2013 10:49:30 -0400 Received: by mail-qc0-f175.google.com with SMTP id j3so2806766qcs.6 for <13891@debbugs.gnu.org>; Mon, 18 Mar 2013 07:47:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=L0RKbKptXNnDweRcJGBB6bgnKOX1KK0RmI57j3pfQt0=; b=aBNc+B+jmddu24aFn3VjlFuwr91MZLWNmshKaUk0I/EwVOPIgOahqezF8QDHOEr0+u CvtAFF/GTp7mhz7/d2arXgyyIGhiQlYdQdP5xF8vmpWbElM/Cq+Oqi97JsMORG4HywrY XbEMbDCnZJHwVxEpN/nYb+XrEz76cuDv62UeYhOTvdRyO2z0K4ijziAME0+L4WH5/DQr Sk7DZ2IJiFDePtuqA6xyGOT7qTG0Wm+u8v1cEAsWNC+mTfzGXIbW2StBoGGzLBQ1W9n/ 5E1i/K53KuCrEhNrMNVdxY9BnpPa0NTf947ziZRIEIEy/9n7FRaXbphXjdbMPX8G2vCj Vnqg== X-Received: by 10.224.181.210 with SMTP id bz18mr20175850qab.68.1363618069755; Mon, 18 Mar 2013 07:47:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.49.94.209 with HTTP; Mon, 18 Mar 2013 07:47:19 -0700 (PDT) In-Reply-To: <87li9lma8j.fsf@gmail.com> References: <87obewxs1z.fsf@gmail.com> <87li9lma8j.fsf@gmail.com> From: Josh Date: Mon, 18 Mar 2013 07:47:19 -0700 X-Google-Sender-Auth: WEoayBWmruicaWevztQDU1JgPAo Message-ID: Subject: Re: bug#13891: 24.3.50; highlight-regexp incorrectly retains partial state after buffer reversion To: Jambunathan K Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQkYFQdNhL/gkTvw2M+yAbxO5b/lD4QCOQUVmvlDP04GvQQQSTElmHUlw/3TwIMgMnpxBtkQ X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 13891 Cc: 13891@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 (--) Understood. Thank you anyway. On Mon, Mar 18, 2013 at 12:35 AM, Jambunathan K wrote: > Josh > >> I can circulate a patch for some or all of what you report below. > > I am unable to keep this promise. I will let others take over this bug. > > Jambunathan K. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 31 09:39:15 2013 Received: (at 13891-done) by debbugs.gnu.org; 31 Mar 2013 13:39:15 +0000 Received: from localhost ([127.0.0.1]:53848 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UMITb-0006gm-8q for submit@debbugs.gnu.org; Sun, 31 Mar 2013 09:39:15 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:55776) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UMITX-0006gZ-6D for 13891-done@debbugs.gnu.org; Sun, 31 Mar 2013 09:39:11 -0400 Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id r2VDaLXe029226; Sun, 31 Mar 2013 09:36:21 -0400 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 82144AE334; Sun, 31 Mar 2013 09:36:21 -0400 (EDT) From: Stefan Monnier To: Josh Subject: Re: bug#13891: 24.3.50; highlight-regexp incorrectly retains partial state after buffer reversion Message-ID: References: Date: Sun, 31 Mar 2013 09:36:21 -0400 In-Reply-To: (josh@foxtail.org's message of "Wed, 6 Mar 2013 09:21:43 -0800") 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 RV4535=0 X-NAI-Spam-Version: 2.3.0.9362 : core <4535> : streams <931454> : uri <1381065> X-Spam-Score: -4.5 (----) X-Debbugs-Envelope-To: 13891-done Cc: 13891-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: -5.9 (-----) > I noticed two things that show that partial highlight-regexp state > lingers after calling revert-buffer, see items 9 and 12. After buffer I've installed the patch below which should fix those problems. Stefan === modified file 'lisp/hi-lock.el' --- lisp/hi-lock.el 2013-03-08 04:18:16 +0000 +++ lisp/hi-lock.el 2013-03-31 13:31:41 +0000 @@ -389,7 +389,9 @@ (define-key-after menu-bar-edit-menu [hi-lock] (cons "Regexp Highlighting" hi-lock-menu)) (hi-lock-find-patterns) - (add-hook 'font-lock-mode-hook 'hi-lock-font-lock-hook nil t)) + (add-hook 'font-lock-mode-hook 'hi-lock-font-lock-hook nil t) + ;; Remove regexps from font-lock-keywords (bug#13891). + (add-hook 'change-major-mode-hook (lambda () (hi-lock-mode -1)) nil t)) ;; Turned off. (when (or hi-lock-interactive-patterns hi-lock-file-patterns) From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 31 12:14:13 2013 Received: (at 13891) by debbugs.gnu.org; 31 Mar 2013 16:14:13 +0000 Received: from localhost ([127.0.0.1]:54347 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UMKtZ-0002HE-3T for submit@debbugs.gnu.org; Sun, 31 Mar 2013 12:14:13 -0400 Received: from mail-pb0-f51.google.com ([209.85.160.51]:35739) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UMKtW-0002H6-7q for 13891@debbugs.gnu.org; Sun, 31 Mar 2013 12:14:11 -0400 Received: by mail-pb0-f51.google.com with SMTP id rr4so840384pbb.24 for <13891@debbugs.gnu.org>; Sun, 31 Mar 2013 09:11:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:references:date:message-id:user-agent :mime-version:content-type; bh=PCOC/WKz0nK2tESMpEGas03yGME9ON/8Hohq1rSHYjg=; b=j8mZaVdux/poYf2z5yUHxKdEC3q+6DLtdPCaxW2LtqEwlAVLiuhxrog/Lf5qMWCUwS 9q5NBDDJ+fsQxjfz0jwGdusTIZEMc3BQWFV97pxPWzvhI2+0oxm1XxkBK+B91qf/o7nE fXRDRpjGae4UA3AXwFylcJ+F7mTS3X1QIxovfi33lSWwB0CibIaCNAOxlL6rZ24KZcuX wwAWUar3HNCMOS8G9D83qaUDfHjQJDojJCoShb0kDuZDaXmD2/ChU9Ye/hDleZJNiEqN p8a3+HNU+wyytSAHefWStlkKGjRARBBLvxHKQRXHS2p8eP2GXMMcOaPB8J0eHkkUJGlH RsZQ== X-Received: by 10.68.129.9 with SMTP id ns9mr14380525pbb.16.1364746281445; Sun, 31 Mar 2013 09:11:21 -0700 (PDT) Received: from debian-6.05 ([101.62.38.214]) by mx.google.com with ESMTPS id ce16sm11690886pac.5.2013.03.31.09.11.17 (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Sun, 31 Mar 2013 09:11:20 -0700 (PDT) From: Jambunathan K To: 13891@debbugs.gnu.org Subject: Re: bug#13891: 24.3.50; highlight-regexp incorrectly retains partial state after buffer reversion References: Date: Sun, 31 Mar 2013 21:41:12 +0530 Message-ID: <87k3ono8gv.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: -2.6 (--) X-Debbugs-Envelope-To: 13891 Cc: josh@foxtail.org, monnier@IRO.UMontreal.CA 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 noticed two things that show that partial highlight-regexp state >> lingers after calling revert-buffer, see items 9 and 12. After buffer > > I've installed the patch below which should fix those problems. (This is not a comment on the patch you have put in, but my initial thoughts as I investigated the bug.) I have a feeling that your fix is "inconsistent" with having `hi-lock-interactive-patterns' as `permanent-local'. `hi-lock-interactive-patterns' is marked as `permanent-local'. So the original intention is clearly to *retain* the highlighting across the reverts and change of major modes. With `global-hi-lock-mode' ON, you will notice that highlighting will be retained across reverts. When M-s h r is used, hi-lock-mode is turned on automatically. But after revert, the hi-lock-mode (being a minor mode) never gets turned back again. I was thinking of fix along the lines of 1. If `hi-lock-interactive-patterns' is non-nil, turn on hi-lock-mode. 2. I think `font-lock-fontify-buffer' should be added to `hi-lock-font-lock-hook'. For some reason, `hi-lock-font-lock-hook' doesn't get called at all (even though it is added to the `font-lock-mode-hook'.) Problem area: `font-lock-mode-hook' is not documented and I really don't when it is getting called. > > > Stefan > > > === modified file 'lisp/hi-lock.el' > --- lisp/hi-lock.el 2013-03-08 04:18:16 +0000 > +++ lisp/hi-lock.el 2013-03-31 13:31:41 +0000 > @@ -389,7 +389,9 @@ > (define-key-after menu-bar-edit-menu [hi-lock] > (cons "Regexp Highlighting" hi-lock-menu)) > (hi-lock-find-patterns) > - (add-hook 'font-lock-mode-hook 'hi-lock-font-lock-hook nil t)) > + (add-hook 'font-lock-mode-hook 'hi-lock-font-lock-hook nil t) > + ;; Remove regexps from font-lock-keywords (bug#13891). > + (add-hook 'change-major-mode-hook (lambda () (hi-lock-mode -1)) nil t)) > ;; Turned off. > (when (or hi-lock-interactive-patterns > hi-lock-file-patterns) From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 03 18:58:39 2013 Received: (at 13891) by debbugs.gnu.org; 3 Apr 2013 22:58:40 +0000 Received: from localhost ([127.0.0.1]:60705 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UNWda-0000jB-6w for submit@debbugs.gnu.org; Wed, 03 Apr 2013 18:58:38 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:53208) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UNWdX-0000j1-CB for 13891@debbugs.gnu.org; Wed, 03 Apr 2013 18:58:35 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFFFxLSu/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSSIHgbBLZEKA6R6gV6DEw X-IPAS-Result: Av8EABK/CFFFxLSu/2dsb2JhbABEuzWDWRdzgh4BAQQBViMFCws0EhQYDSSIHgbBLZEKA6R6gV6DEw X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="6429521" Received: from 69-196-180-174.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net) ([69.196.180.174]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 03 Apr 2013 18:55:25 -0400 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id C6DC2AE3CB; Wed, 3 Apr 2013 18:55:27 -0400 (EDT) From: Stefan Monnier To: Jambunathan K Subject: Re: bug#13891: 24.3.50; highlight-regexp incorrectly retains partial state after buffer reversion Message-ID: References: <87k3ono8gv.fsf@gmail.com> Date: Wed, 03 Apr 2013 18:55:27 -0400 In-Reply-To: <87k3ono8gv.fsf@gmail.com> (Jambunathan K.'s message of "Sun, 31 Mar 2013 21:41:12 +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: 13891 Cc: josh@foxtail.org, 13891@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 (/) >>> I noticed two things that show that partial highlight-regexp state >>> lingers after calling revert-buffer, see items 9 and 12. After buffer >> I've installed the patch below which should fix those problems. > (This is not a comment on the patch you have put in, but my initial > thoughts as I investigated the bug.) > I have a feeling that your fix is "inconsistent" with having > `hi-lock-interactive-patterns' as `permanent-local'. Agreed. Even more so for hi-lock-file-patterns. > With `global-hi-lock-mode' ON, you will notice that highlighting will > be retained across reverts. Not any more after my patch. > 2. I think `font-lock-fontify-buffer' should be added to > `hi-lock-font-lock-hook'. Why? > For some reason, `hi-lock-font-lock-hook' doesn't get called at all > (even though it is added to the `font-lock-mode-hook'.) What was your test case? > Problem area: `font-lock-mode-hook' is not documented and I really > don't when it is getting called. font-lock-mode is a normal minor-mode, so font-lock-mode-hook is called at the end of running font-lock-mode (both to enable and to disable it). Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 04 11:50:03 2013 Received: (at 13891) by debbugs.gnu.org; 4 Apr 2013 15:50:03 +0000 Received: from localhost ([127.0.0.1]:33752 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UNmQL-0003bY-TD for submit@debbugs.gnu.org; Thu, 04 Apr 2013 11:50:03 -0400 Received: from mail-pb0-f52.google.com ([209.85.160.52]:61296) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UNmQH-0003bE-Qk for 13891@debbugs.gnu.org; Thu, 04 Apr 2013 11:49:59 -0400 Received: by mail-pb0-f52.google.com with SMTP id mc8so1494309pbc.25 for <13891@debbugs.gnu.org>; Thu, 04 Apr 2013 08:46:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=rofW7VyVasA1/7UQSkJeaQTgVGV7x1ctuGCHiucIQbA=; b=EH8a0aw7S3+TJTIQR+X0w2LsJpF5a2Dh45/ySa3kVGJdGaBTjaFDDoNiMq1KuO0SH7 yKXy9vqRaA0N1+8x8HLbvF+tsqoepqy0LYPpX97Wmta2rPQDOEluMBf01TS2/uzmCCWv PaAuRcFbKb2BqCgkEkVG38qUh2lRVZluCy67oid/Q7Kt103JvPyKdt0xJPviIEon2d/z brcPuvLoPOyBdtk9WagWmGmr5Mh2XbwxkSrswOrvcseG/WHgOpz2XmeSwXPVjucApW+J JQuUhqkoRkzaPO3LTnYzkrz9EFU0XSlo4UvPBi6YMEZhdTnJAcCG8OYZP9A0kTfCbCKJ A4iQ== X-Received: by 10.66.139.133 with SMTP id qy5mr10180718pab.152.1365090406427; Thu, 04 Apr 2013 08:46:46 -0700 (PDT) Received: from debian-6.05 ([115.241.32.149]) by mx.google.com with ESMTPS id qb10sm10606370pbb.43.2013.04.04.08.46.42 (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Thu, 04 Apr 2013 08:46:45 -0700 (PDT) From: Jambunathan K To: Stefan Monnier Subject: Re: bug#13891: 24.3.50; highlight-regexp incorrectly retains partial state after buffer reversion References: <87k3ono8gv.fsf@gmail.com> Date: Thu, 04 Apr 2013 21:16:32 +0530 In-Reply-To: (Stefan Monnier's message of "Wed, 03 Apr 2013 18:55:27 -0400") Message-ID: <87ppya5mef.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.4 (/) X-Debbugs-Envelope-To: 13891 Cc: josh@foxtail.org, 13891@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.8 (-) --=-=-= Content-Type: text/plain >> `hi-lock-interactive-patterns' as `permanent-local'. > > Agreed. Even more so for hi-lock-file-patterns. >> With `global-hi-lock-mode' ON, you will notice that highlighting will >> be retained across reverts. > > Not any more after my patch. Whether this change in behaviour counts as a regression, I am not sure. >> 2. I think `font-lock-fontify-buffer' should be added to >> `hi-lock-font-lock-hook'. > > Why? `hi-lock-font-lock-hook' adds the font lock keywords. `font-lock-fontify-buffer' activates the keywords. >> For some reason, `hi-lock-font-lock-hook' doesn't get called at all >> (even though it is added to the `font-lock-mode-hook'.) > > What was your test case? For the sake of discussion, I undid your patch. Apply this patch and re-load hi-lock.el. --=-=-= Content-Type: text/x-diff Content-Disposition: inline Content-Description: hi-lock.el.diff === modified file 'lisp/hi-lock.el' --- lisp/hi-lock.el 2013-03-31 13:34:35 +0000 +++ lisp/hi-lock.el 2013-04-04 14:54:39 +0000 @@ -390,8 +390,8 @@ versions before 22 use the following in (cons "Regexp Highlighting" hi-lock-menu)) (hi-lock-find-patterns) (add-hook 'font-lock-mode-hook 'hi-lock-font-lock-hook nil t) - ;; Remove regexps from font-lock-keywords (bug#13891). - (add-hook 'change-major-mode-hook (lambda () (hi-lock-mode -1)) nil t)) + (hi-lock-font-lock-hook) + (font-lock-fontify-buffer)) ;; Turned off. (when (or hi-lock-interactive-patterns hi-lock-file-patterns) --=-=-= Content-Type: text/plain 1. M-s h r something 2. Modify buffer. 3. Revert buffer. 4. M-: hi-lock-interactive-patterns Verify that variable is non-nil. 5. M-x hi-lock-mode. (For now do it by hand.) 6. See that highlighting kicks in. My expectation was that once `hi-lock-mode' is turned on `font-lock-mode-hook' will be *automatically* called. Is it the minor mode's responsibility to explicitly call it's fontification handler? > >> Problem area: `font-lock-mode-hook' is not documented and I really >> don't when it is getting called. > > font-lock-mode is a normal minor-mode, so font-lock-mode-hook is called > at the end of running font-lock-mode (both to enable and to disable it). > > > Stefan --=-=-=-- From unknown Sat Aug 09 20:35:08 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 03 May 2013 11:24:06 +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