From unknown Tue Jun 17 20:10:56 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#9919 <9919@debbugs.gnu.org> To: bug#9919 <9919@debbugs.gnu.org> Subject: Status: 24.0.91; font-lock broken in dired Reply-To: bug#9919 <9919@debbugs.gnu.org> Date: Wed, 18 Jun 2025 03:10:56 +0000 retitle 9919 24.0.91; font-lock broken in dired reassign 9919 emacs submitter 9919 "Drew Adams" severity 9919 normal tag 9919 notabug thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 31 11:14:37 2011 Received: (at submit) by debbugs.gnu.org; 31 Oct 2011 15:14:37 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RKtZN-0006UF-B1 for submit@debbugs.gnu.org; Mon, 31 Oct 2011 11:14:37 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RKtZL-0006U9-Ga for submit@debbugs.gnu.org; Mon, 31 Oct 2011 11:14:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RKtX7-0005BZ-Ce for submit@debbugs.gnu.org; Mon, 31 Oct 2011 11:12:23 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:46809) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKtX7-0005BV-B5 for submit@debbugs.gnu.org; Mon, 31 Oct 2011 11:12:17 -0400 Received: from eggs.gnu.org ([140.186.70.92]:57946) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKtX1-0003rq-HA for bug-gnu-emacs@gnu.org; Mon, 31 Oct 2011 11:12:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RKtWu-00057m-HT for bug-gnu-emacs@gnu.org; Mon, 31 Oct 2011 11:12:11 -0400 Received: from rcsinet15.oracle.com ([148.87.113.117]:48814) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RKtWu-000571-By for bug-gnu-emacs@gnu.org; Mon, 31 Oct 2011 11:12:04 -0400 Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by rcsinet15.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id p9VFC0xv005236 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 31 Oct 2011 15:12:00 GMT Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p9VFBxRK014723 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 31 Oct 2011 15:11:59 GMT Received: from abhmt108.oracle.com (abhmt108.oracle.com [141.146.116.60]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p9VFBrc9020169 for ; Mon, 31 Oct 2011 10:11:53 -0500 Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 31 Oct 2011 08:11:53 -0700 From: "Drew Adams" To: Subject: 24.0.91; font-lock broken in dired Date: Mon, 31 Oct 2011 08:11:53 -0700 Message-ID: <1161A09A8D6E494CBF91D53B99D5FBC2@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcyX32v0cjDKgpEgRy2pUVpARhB4yg== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6109 X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-CT-RefId: str=0001.0A090208.4EAEBAC1.00F4,ss=1,re=0.000,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -6.2 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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.2 (------) This regression started with the second delivery of pretest #1, 2011-10-31. There is no such problem with the first delivery, 2011-10-24. In my setup I use dired+.el, which is here: http://www.emacswiki.org/emacs/download/dired%2b.el. The relevant code is this: (add-hook 'dired-mode-hook '(lambda () (set (make-local-variable 'font-lock-defaults) (cons '(dired-font-lock-keywords diredp-font-lock-keywords-1) ; Two levels. (cdr font-lock-defaults))))) And this: (defvar diredp-font-lock-keywords-1 (list '("^ \\(.+:\\)$" 1 diredp-dir-heading) ; Directory headers '("^ wildcard.*$" 0 'default) ; Override others, e.g. `l' for `diredp-other-priv'. '("^ (No match).*$" 0 'default) ; Override others, e.g. `t' for `diredp-other-priv'. '("[^ .]\\.\\([^. /]+\\)$" 1 diredp-file-suffix) ; Suffix '("\\([^ ]+\\) -> [^ ]+$" 1 diredp-symlink) ; Symbolic links ;; 1) Date/time and 2) filename w/o suffix: (list dired-move-to-filename-regexp (if (or (not (fboundp 'version<)) (version< emacs-version "23.2")) (list 1 'diredp-date-time t t) (list 2 'diredp-date-time t t)) ; Date/time (list "\\(.+\\)$" nil nil (list 0 diredp-file-name 'keep t))) ; Filename ;; Files to ignore (list (concat "^ \\(.*\\(" (concat (mapconcat 'regexp-quote (or (and (boundp 'dired-omit-extensions) dired-omit-extensions) completion-ignored-extensions) "[*]?\\|") "[*]?") ; Allow for executable flag (*). "\\|\\.\\(g?z\\|Z\\)[*]?\\)\\)$") ; Compressed. 1 diredp-ignored-file-name t) '("[^ .]\\.\\([bg]?[zZ]2?\\)[*]?$" 1 diredp-compressed-file-suffix t) ; Compressed (*.z) '("\\([*]\\)$" 1 diredp-executable-tag t) ; Executable (*) ;; Inode, hard-links, & file size (. and , are for the decimal point, depending on locale) ;; See comment for `directory-listing-before-filename-regexp' in `files.el' or `files+.el'. '("\\(\\([0-9]+\\([.,][0-9]+\\)?\\)[BkKMGTPEZY]? \\)" 1 diredp-number) ;; Directory names (list "^..\\([0-9]* \\)*d" (list dired-move-to-filename-regexp nil nil) (list "\\(.+\\)" nil nil '(0 diredp-dir-priv t t))) '("^..\\([0-9]* \\)*.........\\(x\\)" 2 diredp-exec-priv) ;o x '("^..\\([0-9]* \\)*.........\\([lsStT]\\)" 2 diredp-other-priv) ; o misc '("^..\\([0-9]* \\)*........\\(w\\)" 2 diredp-write-priv) ; o w '("^..\\([0-9]* \\)*.......\\(r\\)" 2 diredp-read-priv) ; o r '("^..\\([0-9]* \\)*......\\(x\\)" 2 diredp-exec-priv) ; g x '("^..\\([0-9]* \\)*....[^0-9].\\([lsStT]\\)" 2 diredp-other-priv) ; g misc '("^..\\([0-9]* \\)*.....\\(w\\)" 2 diredp-write-priv) ; g w '("^..\\([0-9]* \\)*....\\(r\\)" 2 diredp-read-priv) ; g r '("^..\\([0-9]* \\)*...\\(x\\)" 2 diredp-exec-priv) ; u x '("^..\\([0-9]* \\)*...\\([lsStT]\\)" 2 diredp-other-priv) ; u misc '("^..\\([0-9]* \\)*..\\(w\\)" 2 diredp-write-priv) ; u w '("^..\\([0-9]* \\)*.\\(r\\)" 2 diredp-read-priv) ; u r '("^..\\([0-9]* \\)*.\\([-rwxlsStT]+\\)" 2 diredp-no-priv keep) ;- '("^..\\([0-9]* \\)*\\([bcsmpS]\\)[-rwxlsStT]" 2 diredp-rare-priv) ; (rare) '("^..\\([0-9]* \\)*\\(l\\)[-rwxlsStT]" 2 diredp-link-priv) ; l (list (concat "^\\([^\n " (char-to-string dired-del-marker) "].*$\\)") 1 diredp-flag-mark-line t) ; Flag/mark lines (list (concat "^\\([" (char-to-string dired-del-marker) "]\\)") ; Deletion flags (D) '(1 diredp-deletion t) '(".+" (dired-move-to-filename) nil (0 diredp-deletion-file-name t))) (list (concat "^\\([^\n " (char-to-string dired-del-marker) "]\\)") ; Flags, marks (except D) 1 diredp-flag-mark t) ) "2nd level of Dired highlighting. See `font-lock-maximum-decoration'.") The local value of `font-lock-defaults' is correctly set to this value, as it is in the earlier pretest #1 and in all prior Emacs releases: ((dired-font-lock-keywords diredp-font-lock-keywords-1) t nil nil beginning-of-line) But none of the specified font-locking is manifested. I see only the default emacs -Q font-locking. I don't know why, and am not sure how to check this further. I've diff'd dired.el, dired-x.el, dired-aux.el, and font-lock.el between the first pretest #1 delivery (2011-10-24) and the second one (2011-10-31), but I don't recognize any change that would affect this. Dunno what other code changes were made between these two pretest deliveries, but something broke font-locking badly in this context. In GNU Emacs 24.0.91.1 (i386-mingw-nt5.1.2600) of 2011-10-30 on MARVIN Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (4.6) --no-opt --cflags -I"D:/devel/emacs/libs/libXpm-3.5.8/include" -I"D:/devel/emacs/libs/libXpm-3.5.8/src" -I"D:/devel/emacs/libs/libpng-dev_1.4.3-1/include" -I"D:/devel/emacs/libs/zlib-dev_1.2.5-2/include" -I"D:/devel/emacs/libs/giflib-4.1.4-1/include" -I"D:/devel/emacs/libs/jpeg-6b-4/include" -I"D:/devel/emacs/libs/tiff-3.8.2-1/include" -I"D:/devel/emacs/libs/gnutls-2.10.1/include" --ldflags -L"D:/devel/emacs/libs/gnutls-2.10.1/lib"' From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 31 18:09:08 2011 Received: (at 9919) by debbugs.gnu.org; 31 Oct 2011 22:09:08 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RL02W-0001JD-8W for submit@debbugs.gnu.org; Mon, 31 Oct 2011 18:09:08 -0400 Received: from rcsinet15.oracle.com ([148.87.113.117]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RL02U-0001J6-EX for 9919@debbugs.gnu.org; Mon, 31 Oct 2011 18:09:07 -0400 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by rcsinet15.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id p9VM6pxO004665 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for <9919@debbugs.gnu.org>; Mon, 31 Oct 2011 22:06:52 GMT Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p9VM6oBR010131 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for <9919@debbugs.gnu.org>; Mon, 31 Oct 2011 22:06:51 GMT Received: from abhmt118.oracle.com (abhmt118.oracle.com [141.146.116.70]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p9VM6j39003795 for <9919@debbugs.gnu.org>; Mon, 31 Oct 2011 17:06:45 -0500 Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 31 Oct 2011 15:06:45 -0700 From: "Drew Adams" To: <9919@debbugs.gnu.org> References: <1161A09A8D6E494CBF91D53B99D5FBC2@us.oracle.com> Subject: RE: bug#9919: 24.0.91; font-lock broken in dired Date: Mon, 31 Oct 2011 15:06:49 -0700 Message-ID: <02C44A1DAC5C497CAD108EF825D585A8@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: <1161A09A8D6E494CBF91D53B99D5FBC2@us.oracle.com> Thread-Index: AcyX32v0cjDKgpEgRy2pUVpARhB4ygAOP9JQ X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6109 X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090204.4EAF1BFC.0095,ss=1,re=0.000,fgs=0 X-Spam-Score: -6.2 (------) X-Debbugs-Envelope-To: 9919 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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.2 (------) Note: If I do M-: (font-lock-refresh-defaults) in Dired then I get the highlighting I should (already) have gotten according to `font-lock-defaults'. Why is this extra call suddenly necessary? What new Emacs 24 "feature" does this map to? Where is the Dev log that corresponds to this change? (I see no change in font-lock.el, for instance.) If this user-visible change is intended, then please (a) update the doc to explain it, and (b) mention the change in NEWS. (BTW, the name `font-lock-refresh-defaults' seems to be unfortunate. Apparently this function does _not_ refresh the font-lock defaults. Instead, it refreshes `font-lock-keywords' (and perhaps other things?) based on the current value of `font-lock-defaults'. The doc string even says the same thing: "... after recomputing from defaults". Recomputing font locking _from defaults_ is very different from refreshing the defaults. The value of `font-lock-defaults' is not "refreshed" or otherwise changed in any way.) From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 31 18:31:23 2011 Received: (at 9919) by debbugs.gnu.org; 31 Oct 2011 22:31:23 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RL0O2-0001q1-UB for submit@debbugs.gnu.org; Mon, 31 Oct 2011 18:31:23 -0400 Received: from rcsinet15.oracle.com ([148.87.113.117]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RL0O1-0001pu-HZ for 9919@debbugs.gnu.org; Mon, 31 Oct 2011 18:31:22 -0400 Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by rcsinet15.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id p9VMT61I026358 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for <9919@debbugs.gnu.org>; Mon, 31 Oct 2011 22:29:07 GMT Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p9VMT5OF022503 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for <9919@debbugs.gnu.org>; Mon, 31 Oct 2011 22:29:06 GMT Received: from abhmt120.oracle.com (abhmt120.oracle.com [141.146.116.72]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p9VMSxh8013707 for <9919@debbugs.gnu.org>; Mon, 31 Oct 2011 17:29:00 -0500 Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 31 Oct 2011 15:28:59 -0700 From: "Drew Adams" To: <9919@debbugs.gnu.org> References: <1161A09A8D6E494CBF91D53B99D5FBC2@us.oracle.com> <02C44A1DAC5C497CAD108EF825D585A8@us.oracle.com> Subject: RE: bug#9919: 24.0.91; font-lock broken in dired Date: Mon, 31 Oct 2011 15:29:05 -0700 Message-ID: <14743DC722C642EC9D87D0FAA95ECD27@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: <02C44A1DAC5C497CAD108EF825D585A8@us.oracle.com> Thread-Index: AcyX32v0cjDKgpEgRy2pUVpARhB4ygAOP9JQAACTrkA= X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6109 X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-CT-RefId: str=0001.0A090207.4EAF2133.0058,ss=1,re=0.000,fgs=0 X-Spam-Score: -6.2 (------) X-Debbugs-Envelope-To: 9919 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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.2 (------) > If this user-visible change is intended, then please (a) > update the doc to explain it, and (b) mention the change in NEWS. Whatever the motivation behind this change (assuming it was intentional), the effect is that font-locking now gets done _twice_ when someone modifies `font-lock-defaults', because of the need to call `font-lock-refresh-defaults'. In my case, this happens each time a Dired buffer is visited. (Likewise buffer menu and finder and...) This is a waste of time. It should be possible to simply update `font-lock-defaults' (e.g. in a mode hook) and have font-locking be done only once, using the updated defaults. Why impose double font-locking? Why should any initial font-locking with the wrong defaults followed by "refreshing" to the right ones be needed? This apparently was not needed in the past. It was such a simple idiom: (set (make-local-variable 'font-lock-defaults) '(nil t nil nil nil (font-lock-fontify-region-function . browse-kill-ring-fontify-region))) (setq font-lock-defaults '(buffer-menu-font-lock-keywords t)) (setq font-lock-defaults '(finder-font-lock-keywords nil nil (("+-*/.<>=!?$%_&~^:@" . "w")) nil)) (set (make-local-variable 'font-lock-defaults) '(compilation-mode-font-lock-keywords t)) ... On n'arrete pas le progres... From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 04 21:37:04 2011 Received: (at 9919) by debbugs.gnu.org; 5 Nov 2011 01:37:04 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RMVBw-0004BU-49 for submit@debbugs.gnu.org; Fri, 04 Nov 2011 21:37:04 -0400 Received: from mail-gx0-f172.google.com ([209.85.161.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RMVBs-0004B2-GR for 9919@debbugs.gnu.org; Fri, 04 Nov 2011 21:37:03 -0400 Received: by ggnv1 with SMTP id v1so2998695ggn.3 for <9919@debbugs.gnu.org>; Fri, 04 Nov 2011 18:34:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-type; bh=sTj4suRS/pQt3PI1ZF3B4wswcGYx+kVCRylH7RP3KuM=; b=V4B6x0pi3K+1DgKSTRXAwKQNisjhAub2bhpbOLL30jFAVccmkaSngquPR5ROzzx5iU b1gyvXaBbKeLNQV6Sx7YW4C/zaStRdOG3bQJG1WzgJt6N1FibGT0Q8lowKbb/V7BRe5B z0V+cso5SCRGTl9O6mN21auksuyOd+k35Vkaw= Received: by 10.236.180.101 with SMTP id i65mr24126134yhm.21.1320456862658; Fri, 04 Nov 2011 18:34:22 -0700 (PDT) Received: from MARVIN (71-212-156-190.hlrn.qwest.net. [71.212.156.190]) by mx.google.com with ESMTPS id 32sm13499551anu.10.2011.11.04.18.34.20 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 04 Nov 2011 18:34:21 -0700 (PDT) From: Christoph Scholtes To: "Drew Adams" Subject: Re: bug#9919: 24.0.91; font-lock broken in dired In-Reply-To: <1161A09A8D6E494CBF91D53B99D5FBC2@us.oracle.com> (Drew Adams's message of "Mon, 31 Oct 2011 08:11:53 -0700") References: <1161A09A8D6E494CBF91D53B99D5FBC2@us.oracle.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (windows-nt) Date: Fri, 04 Nov 2011 19:34:09 -0600 Message-ID: <86k47fuzce.fsf@googlemail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 9919 Cc: 9919@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -4.1 (----) "Drew Adams" writes: > This regression started with the second delivery of pretest #1, > 2011-10-31. There is no such problem with the first delivery, > 2011-10-24. > > In my setup I use dired+.el, which is here: > http://www.emacswiki.org/emacs/download/dired%2b.el. > [...] > But none of the specified font-locking is manifested. I see only the > default emacs -Q font-locking. I don't know why, and am not sure how > to check this further. Drew, I cannot reproduce this with the 24.0.91 Windows Pretest binary or my current trunk build. I downloaded dired+.el and put it in the Emacs path. With emacs -Q, I do M-x load-library and load dired+.el. The dired buffer shows your custom font-locking. I then tried (require 'dired+) in my init.el and it also showed the font-locking correctly when invoking dired. Could anything have changed in your setup? Christoph From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 05 11:33:02 2011 Received: (at 9919) by debbugs.gnu.org; 5 Nov 2011 15:33:03 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RMiEw-00087I-FM for submit@debbugs.gnu.org; Sat, 05 Nov 2011 11:33:02 -0400 Received: from acsinet15.oracle.com ([141.146.126.227]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RMiEv-00086v-57 for 9919@debbugs.gnu.org; Sat, 05 Nov 2011 11:33:01 -0400 Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by acsinet15.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id pA5FUI24010499 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 5 Nov 2011 15:30:19 GMT Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id pA5FUHw2005568 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 5 Nov 2011 15:30:18 GMT Received: from abhmt102.oracle.com (abhmt102.oracle.com [141.146.116.54]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id pA5FUCCr029165; Sat, 5 Nov 2011 10:30:12 -0500 Received: from dradamslap1 (/10.159.57.161) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 05 Nov 2011 08:30:12 -0700 From: "Drew Adams" To: "'Christoph Scholtes'" References: <1161A09A8D6E494CBF91D53B99D5FBC2@us.oracle.com> <86k47fuzce.fsf@googlemail.com> Subject: RE: bug#9919: 24.0.91; font-lock broken in dired Date: Sat, 5 Nov 2011 08:30:13 -0700 Message-ID: <01BD44CE3569404796A5C8252DDA7BDB@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: <86k47fuzce.fsf@googlemail.com> Thread-Index: AcybWw9sYEQTQ5VESJOaCCzxm9a4dwAdA4oA X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6109 X-Source-IP: ucsinet21.oracle.com [156.151.31.93] X-CT-RefId: str=0001.0A090203.4EB5568B.00C2,ss=1,re=0.000,fgs=0 X-Spam-Score: -6.2 (------) X-Debbugs-Envelope-To: 9919 Cc: 9919@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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.2 (------) > I cannot reproduce this with the 24.0.91 Windows Pretest binary or my > current trunk build. > I downloaded dired+.el and put it in the Emacs path. With > emacs -Q, I do M-x load-library and load dired+.el. The dired > buffer shows your custom font-locking. > I then tried (require 'dired+) in my init.el and it also showed the > font-locking correctly when invoking dired. > Could anything have changed in your setup? No nothing changed in my setup. But I added the workaround to dired+.el, as I mentioned, so you will not see the bug with the latest dired+.el. See the 2011/10/21 change-log entry. To see the bug, just remove the call to `font-lock-refresh-defaults'. There is only one such call, preceded by this comment: ;; Emacs 24+: Need to refresh `font-lock-keywords' from `font-lock-defaults'. (BTW, this bug was also reported to me by dired+.el users. It has nothing to do with my setup.) From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 16 21:51:16 2011 Received: (at control) by debbugs.gnu.org; 17 Nov 2011 02:51:16 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RQs4K-0007Bw-Fx for submit@debbugs.gnu.org; Wed, 16 Nov 2011 21:51:16 -0500 Received: from fencepost.gnu.org ([140.186.70.10] ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RQs4I-0007Bp-RT for control@debbugs.gnu.org; Wed, 16 Nov 2011 21:51:15 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RQs3W-0002P1-IK for control@debbugs.gnu.org; Wed, 16 Nov 2011 21:50:26 -0500 Date: Wed, 16 Nov 2011 21:50:26 -0500 Message-Id: Subject: control message for bug 9919 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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.4 (------) merge 6662 9919 From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 16 21:53:01 2011 Received: (at control) by debbugs.gnu.org; 17 Nov 2011 02:53:01 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RQs60-0007Ej-SG for submit@debbugs.gnu.org; Wed, 16 Nov 2011 21:53:01 -0500 Received: from fencepost.gnu.org ([140.186.70.10] ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RQs5y-0007Eb-C7 for control@debbugs.gnu.org; Wed, 16 Nov 2011 21:52:58 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RQs5B-0002VT-UH for control@debbugs.gnu.org; Wed, 16 Nov 2011 21:52:09 -0500 Date: Wed, 16 Nov 2011 21:52:09 -0500 Message-Id: Subject: control message for bug 6662 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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.4 (------) forwarded 6662 http://lists.gnu.org/archive/html/emacs-devel/2010-07/msg01057.html From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 09 10:53:17 2012 Received: (at 9919) by debbugs.gnu.org; 9 Jan 2012 15:53:17 +0000 Received: from localhost ([127.0.0.1]:51185 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RkHXA-0002WB-QM for submit@debbugs.gnu.org; Mon, 09 Jan 2012 10:53:17 -0500 Received: from acsinet15.oracle.com ([141.146.126.227]:20345) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RkHX8-0002Vw-3m for 9919@debbugs.gnu.org; Mon, 09 Jan 2012 10:53:15 -0500 Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by acsinet15.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id q09FqqRg005246 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for <9919@debbugs.gnu.org>; Mon, 9 Jan 2012 15:52:53 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 q09Fqpu6009275 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for <9919@debbugs.gnu.org>; Mon, 9 Jan 2012 15:52:52 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 q09FqpxO028128 for <9919@debbugs.gnu.org>; Mon, 9 Jan 2012 09:52:51 -0600 Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 09 Jan 2012 07:52:51 -0800 From: "Drew Adams" To: <9919@debbugs.gnu.org> References: <1161A09A8D6E494CBF91D53B99D5FBC2@us.oracle.com><86k47fuzce.fsf@googlemail.com> <01BD44CE3569404796A5C8252DDA7BDB@us.oracle.com> Subject: RE: bug#9919: 24.0.91; font-lock broken in dired Date: Mon, 9 Jan 2012 07:52:50 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <01BD44CE3569404796A5C8252DDA7BDB@us.oracle.com> Thread-Index: AcybWw9sYEQTQ5VESJOaCCzxm9a4dwAdA4oADMXO5iA= X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-CT-RefId: str=0001.0A090206.4F0B0D55.0106,ss=1,re=0.000,fgs=0 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 9919 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: -4.2 (----) > > I cannot reproduce this with the 24.0.91 Windows Pretest > > binary or my current trunk build. > > I downloaded dired+.el and put it in the Emacs path. With > > emacs -Q, I do M-x load-library and load dired+.el. The dired > > buffer shows your custom font-locking. > > I then tried (require 'dired+) in my init.el and it also showed the > > font-locking correctly when invoking dired. > > Could anything have changed in your setup? > > No nothing changed in my setup. But I added the workaround > to dired+.el, as I mentioned, so you will not see the bug with the latest > dired+.el. See the 2011/10/21 change-log entry. > > To see the bug, just remove the call to `font-lock-refresh-defaults'. > There is only one such call, preceded by this comment: > ;; Emacs 24+: Need to refresh `font-lock-keywords' from > `font-lock-defaults'. > > (BTW, this bug was also reported to me by dired+.el users. It > has nothing to do with my setup.) ping. I am still getting reports about this wrt dired+.el from users on GNU/Linux. So perhaps my workaround is not sufficient there - dunno. In any case, this is a regression and a performance problem. It should not be necessary to explicitly refontify (fontify twice). From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 09 12:04:31 2012 Received: (at 9919) by debbugs.gnu.org; 9 Jan 2012 17:04:31 +0000 Received: from localhost ([127.0.0.1]:51208 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RkIe6-00047b-Uv for submit@debbugs.gnu.org; Mon, 09 Jan 2012 12:04:31 -0500 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:36023) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RkIe4-00047U-RG for 9919@debbugs.gnu.org; Mon, 09 Jan 2012 12:04:29 -0500 Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q09H4C9b003273; Mon, 9 Jan 2012 12:04:12 -0500 Received: by pastel.home (Postfix, from userid 20848) id B510258D84; Mon, 9 Jan 2012 12:04:10 -0500 (EST) From: Stefan Monnier To: "Drew Adams" Subject: Re: bug#9919: 24.0.91; font-lock broken in dired Message-ID: References: <1161A09A8D6E494CBF91D53B99D5FBC2@us.oracle.com> <86k47fuzce.fsf@googlemail.com> <01BD44CE3569404796A5C8252DDA7BDB@us.oracle.com> Date: Mon, 09 Jan 2012 12:04:10 -0500 In-Reply-To: (Drew Adams's message of "Mon, 9 Jan 2012 07:52:50 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (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 RV4096=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4096> : streams <718182> : uri <1043651> X-Spam-Score: -3.5 (---) X-Debbugs-Envelope-To: 9919 Cc: 9919@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.5 (---) > I am still getting reports about this wrt dired+.el from users on > GNU/Linux. So perhaps my workaround is not sufficient there - dunno. Whenever you change font-lock-defaults, you need to cause font-lock-keywords (and the text already font-locked) to be refreshed, unless you know for sure that font-lock-mode has not yet been started. > In any case, this is a regression and a performance problem. I don't see any evidence of a performance problem. Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 09 14:00:28 2012 Received: (at 9919) by debbugs.gnu.org; 9 Jan 2012 19:00:28 +0000 Received: from localhost ([127.0.0.1]:51283 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RkKSI-00072m-Sx for submit@debbugs.gnu.org; Mon, 09 Jan 2012 14:00:27 -0500 Received: from rcsinet15.oracle.com ([148.87.113.117]:57828) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RkKSF-00072Y-9v for 9919@debbugs.gnu.org; Mon, 09 Jan 2012 14:00:24 -0500 Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by rcsinet15.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id q09J01v7012763 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 9 Jan 2012 19:00:01 GMT Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q09IxxT9016380 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 9 Jan 2012 19:00:00 GMT Received: from abhmt109.oracle.com (abhmt109.oracle.com [141.146.116.61]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q09Ixw8R025317; Mon, 9 Jan 2012 12:59:59 -0600 Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 09 Jan 2012 10:59:58 -0800 From: "Drew Adams" To: "'Stefan Monnier'" References: <1161A09A8D6E494CBF91D53B99D5FBC2@us.oracle.com><86k47fuzce.fsf@googlemail.com><01BD44CE3569404796A5C8252DDA7BDB@us.oracle.com> Subject: RE: bug#9919: 24.0.91; font-lock broken in dired Date: Mon, 9 Jan 2012 10:59:58 -0800 Message-ID: <7F9343C4FA564C29BE7E8576E5A25183@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: AczO8Lm0VYlcA7LgS/GZIdn5SF2iKQAAYvZA X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-CT-RefId: str=0001.0A090206.4F0B3932.001A,ss=1,re=0.000,fgs=0 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 9919 Cc: 9919@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: -4.2 (----) > > I am still getting reports about this wrt dired+.el from users on > > GNU/Linux. So perhaps my workaround is not sufficient there - dunno. > > Whenever you change font-lock-defaults, you need to cause > font-lock-keywords (and the text already font-locked) to be refreshed, > unless you know for sure that font-lock-mode has not yet been started. Your "whenever" obviously does not apply to Emacs 20-22, since `font-lock-refresh-defaults' does not even exist in those releases. And at least for my code, "whenever" is true only for Emacs 24, not Emacs 23 (which also has `font-lock-refresh-defaults'). And the problem did not exist in Emacs 24 either, until the build where I reported the bug. I have this code, which has always worked and still works with Emacs 20 through 23.3: (add-hook 'dired-mode-hook (lambda () (set (make-local-variable 'font-lock-defaults) (cons '(dired-font-lock-keywords diredp-font-lock-keywords-1) (cdr font-lock-defaults))) ;; Emacs 24+: Need to refresh `font-lock-keywords' from `font-lock-defaults'. (when (fboundp 'font-lock-refresh-defaults) (font-lock-refresh-defaults)))) The last bit, which invokes `font-lock-refresh-defaults', I had to add for Emacs 24. Similarly, for buff-menu+.el, I need to do likewise on `buffer-menu-mode-hook'. Again, this workaround is needed only for Emacs 24. > > In any case, this is a regression and a performance problem. > > I don't see any evidence of a performance problem. This means, in effect, that fontification must now be done twice, or else it is incorrect. That's the performance hit I meant: font-locking twice. What has always given correct fontification before with a single fontification (and still does, in the published Emacs releases) now does not, I must re-fontify completely. Am I missing something here? Is there a way to get what's needed without fontifying twice? That's expensive. What's the cause of this change/regression? Thx. From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 09 17:37:11 2012 Received: (at 9919) by debbugs.gnu.org; 9 Jan 2012 22:37:11 +0000 Received: from localhost ([127.0.0.1]:51417 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RkNq3-0004FT-HK for submit@debbugs.gnu.org; Mon, 09 Jan 2012 17:37:11 -0500 Received: from chene.dit.umontreal.ca ([132.204.246.20]:51430) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RkNq0-0004FH-RK for 9919@debbugs.gnu.org; Mon, 09 Jan 2012 17:37:10 -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 q09MapWB007629; Mon, 9 Jan 2012 17:36:51 -0500 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id CE803B4177; Mon, 9 Jan 2012 17:36:51 -0500 (EST) From: Stefan Monnier To: "Drew Adams" Subject: Re: bug#9919: 24.0.91; font-lock broken in dired Message-ID: References: <1161A09A8D6E494CBF91D53B99D5FBC2@us.oracle.com> <86k47fuzce.fsf@googlemail.com> <01BD44CE3569404796A5C8252DDA7BDB@us.oracle.com> <7F9343C4FA564C29BE7E8576E5A25183@us.oracle.com> Date: Mon, 09 Jan 2012 17:36:51 -0500 In-Reply-To: <7F9343C4FA564C29BE7E8576E5A25183@us.oracle.com> (Drew Adams's message of "Mon, 9 Jan 2012 10:59:58 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (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 RV4096=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4096> : streams <718246> : uri <1043809> X-Spam-Score: -3.5 (---) X-Debbugs-Envelope-To: 9919 Cc: 9919@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.5 (---) >> > I am still getting reports about this wrt dired+.el from users on >> > GNU/Linux. So perhaps my workaround is not sufficient there - dunno. >> Whenever you change font-lock-defaults, you need to cause >> font-lock-keywords (and the text already font-locked) to be refreshed, >> unless you know for sure that font-lock-mode has not yet been started. > Your "whenever" obviously does not apply to Emacs 20-22, since > `font-lock-refresh-defaults' does not even exist in those releases. It does: notice I don't mention font-lock-refresh-defaults which merely makes it easy (it was introduced just to make it easier to solve this problem). > And at least for my code, "whenever" is true only for Emacs 24, not > Emacs 23 (which also has `font-lock-refresh-defaults'). And the > problem did not exist in Emacs 24 either, until the build where > I reported the bug. No, your code was wrong and always has been: you change only font-lock-defaults, whereas you do not know for a fact that font-lock-mode has not yet been enabled. In earlier Emacsen, in normal circumstances, you just got lucky. > I have this code, which has always worked and still works with Emacs > 20 through 23.3: Code that works in practice doesn't mean correct code. > (add-hook > 'dired-mode-hook > (lambda () > (set (make-local-variable 'font-lock-defaults) > (cons '(dired-font-lock-keywords diredp-font-lock-keywords-1) > (cdr font-lock-defaults))) Great. Now after running the above code, the user adds (add-hook 'dired-mode-hook (lambda () (font-lock-mode 1))) and suddenly the bug shows up even in Emacs-23. >> I don't see any evidence of a performance problem. > This means, in effect, that fontification must now be done twice, or > else it is incorrect. That's the performance hit I meant: > font-locking twice. Evidence of a performance problem requires measures, times, things like that. You're talking about some hypothetical problem based on your understanding of how things work. Things don't always work the way we think they do. We have plenty of hypothetical performance problems in Emacs that I'm not going to worry about them. > What's the cause of this change/regression? Nothing very deep. The moment when font-lock-mode gets enabled has changed. I'm not convinced the new time is really much better, but I'm not convinced the old time was better either. Basically it used to be enabled after running the mode hook, which made it difficult to disable font-lock-mode via a mode-hook check, wherea now it gets enabled before, so you can just do (add-hook 'dired-mode-hook (lambda () (if foo (font-lock-mode -1)))) -- Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 09 19:04:49 2012 Received: (at 9919) by debbugs.gnu.org; 10 Jan 2012 00:04:49 +0000 Received: from localhost ([127.0.0.1]:51459 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RkPCq-0006Fr-IE for submit@debbugs.gnu.org; Mon, 09 Jan 2012 19:04:49 -0500 Received: from rcsinet15.oracle.com ([148.87.113.117]:34952) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RkPCo-0006Fe-D6 for 9919@debbugs.gnu.org; Mon, 09 Jan 2012 19:04:47 -0500 Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by rcsinet15.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id q0A04Mvq009559 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 10 Jan 2012 00:04:23 GMT Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q0A04Llt027388 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 10 Jan 2012 00:04:22 GMT Received: from abhmt110.oracle.com (abhmt110.oracle.com [141.146.116.62]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q0A04LXA021260; Mon, 9 Jan 2012 18:04:21 -0600 Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 09 Jan 2012 16:04:20 -0800 From: "Drew Adams" To: "'Stefan Monnier'" References: <1161A09A8D6E494CBF91D53B99D5FBC2@us.oracle.com><86k47fuzce.fsf@googlemail.com><01BD44CE3569404796A5C8252DDA7BDB@us.oracle.com><7F9343C4FA564C29BE7E8576E5A25183@us.oracle.com> Subject: RE: bug#9919: 24.0.91; font-lock broken in dired Date: Mon, 9 Jan 2012 16:04:19 -0800 Message-ID: <7828076964A745E39311AEB941AD52F0@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: AczPHzIyWtXJZjBJSo2C7y/C+YDf7QAB0Ljg X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-CT-RefId: str=0001.0A090209.4F0B8088.0022,ss=1,re=0.000,fgs=0 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 9919 Cc: 9919@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: -4.2 (----) > > (add-hook > > 'dired-mode-hook > > (lambda () > > (set (make-local-variable 'font-lock-defaults) > > (cons '(dired-font-lock-keywords > > diredp-font-lock-keywords-1) > > (cdr font-lock-defaults))) > > Now after running the above code, the user adds > (add-hook 'dired-mode-hook (lambda () (font-lock-mode 1))) > and suddenly the bug shows up even in Emacs-23. OK, so Emacs broke it in 23 instead of 24. ;-) That does not happen in Emacs 20-22 AFAICT. What's the gotcha for Emacs 20-22? What does a user need to do in Emacs 20-22 to show that this code won't DTRT? Let me put it this way: I've never seen the problem in Emacs 20-22, and I've never received a report from anyone mentioning such a problem with that code. Did you receive any Emacs 20-22 bug reports, for example, from users who, like me, did not understand that such problematic behavior was inherent? Not that such reports would have corresponded to real bugs, from what you say, but presumably there would have been at least someone who was bitten by what you say has always been an inherent gotcha/problem. I'm just curious why this is manifested in 24 without doing anything, and in 23 if you do as you note above, but not at all (AFAICT) in 20-22. > > What's the cause of this change/regression? > > Nothing very deep. The moment when font-lock-mode gets enabled > has changed. I'm not convinced the new time is really much > better, but I'm not convinced the old time was better either. Was that change made in Emacs 23 or 24? See my question above - just trying to understand the differences between (a) 20-22, (b) 23, and (c) 24. > Basically it used to be enabled after running the mode hook, > which made it difficult to disable font-lock-mode via a > mode-hook check, wherea now it gets enabled before, so you can just do > > (add-hook 'dired-mode-hook (lambda () (if foo (font-lock-mode -1)))) I see. Thanks for the explanation. Makes sense. From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 09 20:26:36 2012 Received: (at 9919) by debbugs.gnu.org; 10 Jan 2012 01:26:36 +0000 Received: from localhost ([127.0.0.1]:51539 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RkQTz-0002jT-G4 for submit@debbugs.gnu.org; Mon, 09 Jan 2012 20:26:36 -0500 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:45608) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RkQTv-0002jK-Ur for 9919@debbugs.gnu.org; Mon, 09 Jan 2012 20:26:33 -0500 Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q0A1QD0V028922; Mon, 9 Jan 2012 20:26:14 -0500 Received: by pastel.home (Postfix, from userid 20848) id 7E6F958D84; Mon, 9 Jan 2012 20:26:11 -0500 (EST) From: Stefan Monnier To: "Drew Adams" Subject: Re: bug#9919: 24.0.91; font-lock broken in dired Message-ID: References: <1161A09A8D6E494CBF91D53B99D5FBC2@us.oracle.com> <86k47fuzce.fsf@googlemail.com> <01BD44CE3569404796A5C8252DDA7BDB@us.oracle.com> <7F9343C4FA564C29BE7E8576E5A25183@us.oracle.com> <7828076964A745E39311AEB941AD52F0@us.oracle.com> Date: Mon, 09 Jan 2012 20:26:11 -0500 In-Reply-To: <7828076964A745E39311AEB941AD52F0@us.oracle.com> (Drew Adams's message of "Mon, 9 Jan 2012 16:04:19 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (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 RV4096=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4096> : streams <718286> : uri <1043878> X-Spam-Score: -3.5 (---) X-Debbugs-Envelope-To: 9919 Cc: 9919@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.5 (---) > OK, so Emacs broke it in 23 instead of 24. ;-) That does not happen > in Emacs 20-22 AFAICT. What's the gotcha for Emacs 20-22? What does > a user need to do in Emacs 20-22 to show that this code won't DTRT? AFAIK the example will break your code in any version of Emacs that supports font-lock. >> Nothing very deep. The moment when font-lock-mode gets enabled >> has changed. I'm not convinced the new time is really much >> better, but I'm not convinced the old time was better either. > Was that change made in Emacs 23 or 24? Emacs-24. The change is to global-font-lock-mode, BTW. Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 09 20:35:40 2012 Received: (at 9919) by debbugs.gnu.org; 10 Jan 2012 01:35:40 +0000 Received: from localhost ([127.0.0.1]:51543 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RkQcm-0002wJ-Bk for submit@debbugs.gnu.org; Mon, 09 Jan 2012 20:35:40 -0500 Received: from acsinet15.oracle.com ([141.146.126.227]:39037) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RkQck-0002wB-7c for 9919@debbugs.gnu.org; Mon, 09 Jan 2012 20:35:39 -0500 Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by acsinet15.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id q0A1ZJmf016268 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 10 Jan 2012 01:35:20 GMT Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q0A1ZI05019944 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 10 Jan 2012 01:35:19 GMT Received: from abhmt113.oracle.com (abhmt113.oracle.com [141.146.116.65]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q0A1ZHgl018238; Mon, 9 Jan 2012 19:35:18 -0600 Received: from dradamslap1 (/10.159.40.40) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 09 Jan 2012 17:35:17 -0800 From: "Drew Adams" To: "'Stefan Monnier'" References: <1161A09A8D6E494CBF91D53B99D5FBC2@us.oracle.com><86k47fuzce.fsf@googlemail.com><01BD44CE3569404796A5C8252DDA7BDB@us.oracle.com><7F9343C4FA564C29BE7E8576E5A25183@us.oracle.com><7828076964A745E39311AEB941AD52F0@us.oracle.com> Subject: RE: bug#9919: 24.0.91; font-lock broken in dired Date: Mon, 9 Jan 2012 17:35:15 -0800 Message-ID: <1067B72F0E8C4C4B84BDCA3027CEE3E1@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: AczPNts4DP7YumJ0S8G7go8osOQOHAAAPmnw X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: ucsinet21.oracle.com [156.151.31.93] X-CT-RefId: str=0001.0A020205.4F0B95D8.00CD,ss=1,re=0.000,fgs=0 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 9919 Cc: 9919@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: -4.2 (----) > > That does not happen in Emacs 20-22 AFAICT. > > What's the gotcha for Emacs 20-22? What does a user need to > > do in Emacs 20-22 to show that this code won't DTRT? > > AFAIK the example will break your code in any version of Emacs > that supports font-lock. Nope, not the recipe you gave, at least. Try it. That's why I asked (still asking). > >> Nothing very deep. The moment when font-lock-mode gets enabled > >> has changed. I'm not convinced the new time is really much > >> better, but I'm not convinced the old time was better either. > > Was that change made in Emacs 23 or 24? > > Emacs-24. > The change is to global-font-lock-mode, BTW. Hm. I knew about that change, but didn't understand the consequences. You can close this as not-a-bug, if you like. Thx. From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 09 22:14:58 2012 Received: (at control) by debbugs.gnu.org; 10 Jan 2012 03:14:58 +0000 Received: from localhost ([127.0.0.1]:51615 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RkSAs-0005B2-7t for submit@debbugs.gnu.org; Mon, 09 Jan 2012 22:14:58 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.183]:37086) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RkSAq-0005Ap-7E; Mon, 09 Jan 2012 22:14:56 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAAKsC09FxKkV/2dsb2JhbABDrFWBBoFyAQEEAVYjEAs0EhQYDSSIDbZhjBEEiDmaVIRS X-IronPort-AV: E=Sophos;i="4.71,484,1320642000"; d="scan'208";a="155963275" Received: from 69-196-169-21.dsl.teksavvy.com (HELO ceviche.home) ([69.196.169.21]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 09 Jan 2012 22:14:38 -0500 Received: by ceviche.home (Postfix, from userid 20848) id A76946610B; Mon, 9 Jan 2012 22:14:37 -0500 (EST) From: Stefan Monnier To: "Drew Adams" Subject: Re: bug#9919: 24.0.91; font-lock broken in dired Message-ID: References: <1161A09A8D6E494CBF91D53B99D5FBC2@us.oracle.com> <86k47fuzce.fsf@googlemail.com> <01BD44CE3569404796A5C8252DDA7BDB@us.oracle.com> <7F9343C4FA564C29BE7E8576E5A25183@us.oracle.com> <7828076964A745E39311AEB941AD52F0@us.oracle.com> <1067B72F0E8C4C4B84BDCA3027CEE3E1@us.oracle.com> Date: Mon, 09 Jan 2012 22:14:37 -0500 In-Reply-To: <1067B72F0E8C4C4B84BDCA3027CEE3E1@us.oracle.com> (Drew Adams's message of "Mon, 9 Jan 2012 17:35:15 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: control Cc: 9919-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) tags 9919 notabug thanks >> > That does not happen in Emacs 20-22 AFAICT. >> > What's the gotcha for Emacs 20-22? What does a user need to >> > do in Emacs 20-22 to show that this code won't DTRT? >> AFAIK the example will break your code in any version of Emacs >> that supports font-lock. > Nope, not the recipe you gave, at least. Try it. > That's why I asked (still asking). Don't know, then, there must be something else at play. Stefan From unknown Tue Jun 17 20:10:56 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, 07 Feb 2012 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