GNU bug report logs - #60977
29.0.60; Dired: invalid face reference with dir symlinks

Previous Next

Package: emacs;

Reported by: "Basil L. Contovounesios" <contovob <at> tcd.ie>

Date: Sat, 21 Jan 2023 00:03:01 UTC

Severity: normal

Tags: patch

Found in version 29.0.60

Fixed in version 29.1

Done: "Basil L. Contovounesios" <contovob <at> tcd.ie>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 60977 in the body.
You can then email your comments to 60977 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to juri <at> linkov.net, bug-gnu-emacs <at> gnu.org:
bug#60977; Package emacs. (Sat, 21 Jan 2023 00:03:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Basil L. Contovounesios" <contovob <at> tcd.ie>:
New bug report received and forwarded. Copy sent to juri <at> linkov.net, bug-gnu-emacs <at> gnu.org. (Sat, 21 Jan 2023 00:03:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.60; Dired: invalid face reference with dir symlinks
Date: Sat, 21 Jan 2023 00:02:39 +0000
[Message part 1 (text/plain, inline)]
Tags: patch

0. emacs -Q
1. C-h e
2. (let* ((parent (make-temp-file "my-" t))
          (child  (expand-file-name "child" parent))
          (link   (expand-file-name "link" parent)))
     (make-directory child)
     (make-symbolic-link child link)
     (dired parent))
   C-x C-e

Expected:
- Link target fontified with 'dired-directory' face
Result:
- Link target fontified with undefined 'dired-directory-face' face
- *Messages* says 'Invalid face reference: dired-directory-face'

This seems to be a regression in Emacs 29 (https://bugs.gnu.org/57293):

Use a list of text properties to search in symlink filenames in Wdired
0ab49d46ddb 2022-08-27 22:43:40 +0300
https://git.sv.gnu.org/cgit/emacs.git/commit/?id=0ab49d46ddb

Something like this would fix the problem:

[dired.diff (text/x-diff, inline)]
diff --git a/lisp/dired.el b/lisp/dired.el
index 42d15f27a54..2bcb28a0e00 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -789,7 +789,7 @@ dired-font-lock-keywords
                '(dired-move-to-filename)
                nil
                '(1 dired-symlink-face)
-               '(2 '(face dired-directory-face dired-symlink-filename t))))
+               '(2 `(face ,dired-directory-face dired-symlink-filename t))))
    ;;
    ;; Symbolic link to a non-directory.
    (list dired-re-sym
[Message part 3 (text/plain, inline)]
But I don't know whether it's acceptable for emacs-29, or whether it
conses too much during font lock.  In the latter case, we could evaluate
dired-directory-face once (when dired-font-lock-keywords is defined), or
we could use the 'dired-directory' face directly.  WDYT?

Thanks,

-- 
Basil

In GNU Emacs 29.0.60 (build 3, x86_64-pc-linux-gnu, X toolkit, cairo
 version 1.16.0, Xaw3d scroll bars) of 2023-01-20 built on tia
Repository revision: d63e1a89518338bc3450b11d6c2d4644cb0440e1
Repository branch: wt/emacs-29
Windowing system distributor 'The X.Org Foundation', version 11.0.12101006
System Description: Debian GNU/Linux bookworm/sid

Configured using:
 'configure 'CFLAGS=-O0 -ggdb3' --prefix=/home/blc/.local
 --program-suffix=-29 --enable-checking=yes,glyphs
 --enable-check-lisp-object-type --with-file-notification=yes
 --with-native-compilation --with-x-toolkit=lucid --with-x'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES
NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3
THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XAW3D XDBE XIM
XINPUT2 XPM LUCID ZLIB

Important settings:
  value of $LANG: en_IE.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Dired by name

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-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
  buffer-read-only: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message mailcap yank-media puny rfc822
mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util
text-property-search time-date mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils dired-aux cl-loaddefs comp
comp-cstr warnings icons subr-x rx cl-seq cl-macs gv cl-extra help-mode
bytecomp byte-compile cl-lib dired dired-loaddefs rmc iso-transl tooltip
cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type
elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd
fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow
isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax
font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads dbusbind inotify lcms2
dynamic-setting system-font-setting font-render-setting cairo x-toolkit
xinput2 x multi-tty make-network-process native-compile emacs)

Memory information:
((conses 16 83436 6516)
 (symbols 48 7258 0)
 (strings 32 24732 1773)
 (string-bytes 1 750425)
 (vectors 16 18404)
 (vector-slots 8 343752 13751)
 (floats 8 42 33)
 (intervals 56 297 0)
 (buffers 984 12))

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60977; Package emacs. (Sun, 22 Jan 2023 17:14:02 GMT) Full text and rfc822 format available.

Message #8 received at 60977 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Cc: 60977 <at> debbugs.gnu.org
Subject: Re: bug#60977: 29.0.60; Dired: invalid face reference with dir
 symlinks
Date: Sun, 22 Jan 2023 19:05:44 +0200
> - Link target fontified with undefined 'dired-directory-face' face
> - *Messages* says 'Invalid face reference: dired-directory-face'
>
> This seems to be a regression in Emacs 29 (https://bugs.gnu.org/57293):

Thanks for finding this regression.

> But I don't know whether it's acceptable for emacs-29, or whether it
> conses too much during font lock.  In the latter case, we could evaluate
> dired-directory-face once (when dired-font-lock-keywords is defined), or
> we could use the 'dired-directory' face directly.  WDYT?

I think the effect of consing is negligible.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60977; Package emacs. (Mon, 23 Jan 2023 21:05:02 GMT) Full text and rfc822 format available.

Message #11 received at 60977 <at> debbugs.gnu.org (full text, mbox):

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Juri Linkov <juri <at> linkov.net>
Cc: 60977 <at> debbugs.gnu.org
Subject: Re: bug#60977: 29.0.60; Dired: invalid face reference with dir
 symlinks
Date: Mon, 23 Jan 2023 21:04:00 +0000
Juri Linkov [2023-01-22 19:05 +0200] wrote:

>> - Link target fontified with undefined 'dired-directory-face' face
>> - *Messages* says 'Invalid face reference: dired-directory-face'
>>
>> This seems to be a regression in Emacs 29 (https://bugs.gnu.org/57293):
>
> Thanks for finding this regression.
>
>> But I don't know whether it's acceptable for emacs-29, or whether it
>> conses too much during font lock.  In the latter case, we could evaluate
>> dired-directory-face once (when dired-font-lock-keywords is defined), or
>> we could use the 'dired-directory' face directly.  WDYT?
>
> I think the effect of consing is negligible.

Thanks for confirming.
I'll install it once we hear from Eli re: emacs-29.

-- 
Basil




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60977; Package emacs. (Tue, 24 Jan 2023 13:30:02 GMT) Full text and rfc822 format available.

Message #14 received at 60977 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Cc: 60977 <at> debbugs.gnu.org, juri <at> linkov.net
Subject: Re: bug#60977: 29.0.60;
 Dired: invalid face reference with dir symlinks
Date: Tue, 24 Jan 2023 15:29:48 +0200
> Cc: 60977 <at> debbugs.gnu.org
> Date: Mon, 23 Jan 2023 21:04:00 +0000
> From:  "Basil L. Contovounesios" via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> >> But I don't know whether it's acceptable for emacs-29, or whether it
> >> conses too much during font lock.  In the latter case, we could evaluate
> >> dired-directory-face once (when dired-font-lock-keywords is defined), or
> >> we could use the 'dired-directory' face directly.  WDYT?
> >
> > I think the effect of consing is negligible.
> 
> Thanks for confirming.
> I'll install it once we hear from Eli re: emacs-29.

I'm sorry, but I don't see any questions you asked me about this
issue, and neither do I see it on debbugs in the discussion of the
issue.  What did I miss?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60977; Package emacs. (Wed, 25 Jan 2023 00:25:01 GMT) Full text and rfc822 format available.

Message #17 received at 60977 <at> debbugs.gnu.org (full text, mbox):

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 60977 <at> debbugs.gnu.org, juri <at> linkov.net
Subject: Re: bug#60977: 29.0.60; Dired: invalid face reference with dir
 symlinks
Date: Wed, 25 Jan 2023 00:23:52 +0000
Eli Zaretskii [2023-01-24 08:29 -0500] wrote:

>> Cc: 60977 <at> debbugs.gnu.org
>> Date: Mon, 23 Jan 2023 21:04:00 +0000
>> From:  "Basil L. Contovounesios" via "Bug reports for GNU Emacs,
>>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>> 
>> >> But I don't know whether it's acceptable for emacs-29, or whether it
>> >> conses too much during font lock.  In the latter case, we could evaluate
>> >> dired-directory-face once (when dired-font-lock-keywords is defined), or
>> >> we could use the 'dired-directory' face directly.  WDYT?
>> >
>> > I think the effect of consing is negligible.
>> 
>> Thanks for confirming.
>> I'll install it once we hear from Eli re: emacs-29.
>
> I'm sorry, but I don't see any questions you asked me about this
> issue, and neither do I see it on debbugs in the discussion of the
> issue.  What did I miss?

My question was whether the patch in https://bugs.gnu.org/60977#5 is
efficient and suitable enough for emacs-29, to fix a font lock
regression.

Thanks,

-- 
Basil




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60977; Package emacs. (Wed, 25 Jan 2023 12:04:02 GMT) Full text and rfc822 format available.

Message #20 received at 60977 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Cc: 60977 <at> debbugs.gnu.org, juri <at> linkov.net
Subject: Re: bug#60977: 29.0.60; Dired: invalid face reference with dir
 symlinks
Date: Wed, 25 Jan 2023 14:02:32 +0200
> From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
> Cc: juri <at> linkov.net,  60977 <at> debbugs.gnu.org
> Date: Wed, 25 Jan 2023 00:23:52 +0000
> 
> Eli Zaretskii [2023-01-24 08:29 -0500] wrote:
> 
> > I'm sorry, but I don't see any questions you asked me about this
> > issue, and neither do I see it on debbugs in the discussion of the
> > issue.  What did I miss?
> 
> My question was whether the patch in https://bugs.gnu.org/60977#5 is
> efficient and suitable enough for emacs-29, to fix a font lock
> regression.

Yes, thanks.




bug marked as fixed in version 29.1, send any further explanations to 60977 <at> debbugs.gnu.org and "Basil L. Contovounesios" <contovob <at> tcd.ie> Request was from "Basil L. Contovounesios" <contovob <at> tcd.ie> to control <at> debbugs.gnu.org. (Wed, 25 Jan 2023 14:34:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60977; Package emacs. (Wed, 25 Jan 2023 14:34:03 GMT) Full text and rfc822 format available.

Message #25 received at 60977-done <at> debbugs.gnu.org (full text, mbox):

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 60977-done <at> debbugs.gnu.org, juri <at> linkov.net
Subject: Re: bug#60977: 29.0.60; Dired: invalid face reference with dir
 symlinks
Date: Wed, 25 Jan 2023 14:33:32 +0000
close 60977 29.1
quit

Eli Zaretskii [2023-01-25 07:03 -0500] wrote:

>> From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
>> Cc: juri <at> linkov.net,  60977 <at> debbugs.gnu.org
>> Date: Wed, 25 Jan 2023 00:23:52 +0000
>> 
>> My question was whether the patch in https://bugs.gnu.org/60977#5 is
>> efficient and suitable enough for emacs-29, to fix a font lock
>> regression.
>
> Yes, thanks.

Done, thanks.

Fix Dired face for directory symlinks
c6613403e5c 2023-01-25 14:32:42 +0000
https://git.sv.gnu.org/cgit/emacs.git/commit/?id=c6613403e5c

-- 
Basil




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 23 Feb 2023 12:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 61 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.