From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Basil L. Contovounesios" via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#60977: 29.0.60; Dired: invalid face reference with dir symlinks Date: Sat, 21 Jan 2023 00:02:39 +0000 Message-ID: <87mt6cdaao.fsf@tcd.ie> Reply-To: "Basil L. Contovounesios" Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40171"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Juri Linkov To: 60977@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 21 01:03:29 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pJ1M0-000AFW-Ux for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 21 Jan 2023 01:03:29 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pJ1Ld-0004bx-NJ; Fri, 20 Jan 2023 19:03:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pJ1Lb-0004be-8h for bug-gnu-emacs@gnu.org; Fri, 20 Jan 2023 19:03:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pJ1Lb-0000YL-0E for bug-gnu-emacs@gnu.org; Fri, 20 Jan 2023 19:03:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pJ1La-0006Ds-3Y; Fri, 20 Jan 2023 19:03:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Basil L. Contovounesios" Original-Sender: "Debbugs-submit" Resent-CC: juri@linkov.net, bug-gnu-emacs@gnu.org Resent-Date: Sat, 21 Jan 2023 00:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 60977 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org X-Debbugs-Original-Xcc: Juri Linkov Original-Received: via spool by submit@debbugs.gnu.org id=B.167425937523901 (code B ref -1); Sat, 21 Jan 2023 00:03:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 21 Jan 2023 00:02:55 +0000 Original-Received: from localhost ([127.0.0.1]:47546 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJ1LS-0006DQ-Jl for submit@debbugs.gnu.org; Fri, 20 Jan 2023 19:02:55 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:54966) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJ1LN-0006DB-G4 for submit@debbugs.gnu.org; Fri, 20 Jan 2023 19:02:53 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pJ1LM-0004bC-V3 for bug-gnu-emacs@gnu.org; Fri, 20 Jan 2023 19:02:49 -0500 Original-Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pJ1LJ-0000Ux-Do for bug-gnu-emacs@gnu.org; Fri, 20 Jan 2023 19:02:48 -0500 Original-Received: by mail-wr1-x433.google.com with SMTP id d14so2468969wrr.9 for ; Fri, 20 Jan 2023 16:02:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd.ie; s=google21; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=FgvUPGbBnc3/kpazpPuSLmtc2L5XnaqWOYQpY0/vh6g=; b=CleBOAyI34CcsCUw5Je6FgQ3JQjafi6rn/ZeDcZrR4FfbEs7K/mBlSsfVWhJs5KSfU ieBzIvqgjN86+8h1tsV5bDxykJyqO8hOeItricbQJdis6z32gBHyl0jnfAC/+oakmIfo 9sjGM4/OEVhR89ALtXEXrbCjPIe5Ic74FW89Dyzc86umr4fp0Ulu4T9Ca0ZdMleQLGAO wk+5exbQOJqGk6GJxk4yb4TCxOXPmeP81FgIebNjvYzKdZ7Skdio79QAFVrrgn8bW1bG Vn+8o7iIf9qQeZ+KOy12jSJGj3SJRk696q+E4ZwILX2KQUOAEAs0t8bV+Mz3l28Mq4zK dfzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=FgvUPGbBnc3/kpazpPuSLmtc2L5XnaqWOYQpY0/vh6g=; b=yXylCF8fLuVC4HhAAUCDoa1h/75ZITT5lw4sin7Yn1Fwv9YQkeBQtFoI1E2NiUNZBb 5+puzanT9ZxxzzSVkkLVRMQFxMnkI2wf0cdzSS+rEbW4XL/IWbH4O26Pz5uNVYmZlwoC Irv8F9giQaqI1LVQEAz2XBM91KjLtWXL7vB4EFj36FGRF4qISrHujXro5L2SS2YZ5+/4 WlN4LcRg6kCPGGE7pNKJYGZYGTcB5NsJcQLiaERlh431gpNh33FY/y7UGG1CpZ4QEzQU Gm3vaXSEy7IXaPfJaOsVWZAyB/LBTtAJaTkfdidhVO3ilp4ARl3jhOTTaEJNAXHHqQWj /f0w== X-Gm-Message-State: AFqh2kpvVESVWfQUOtO0rJ6ggLnrUcw8RvYdOjVOgnvE5qe1LYZUmdnv /JXiTxI3Z9qNwpK86Qzsq3B3QyZk6eWA5wKR X-Google-Smtp-Source: AMrXdXsIet58D2eeuBp2IYbGaaElHZfG1Oj3oT7jGzCVUv2gerbzjuhyEX4PFLTGRaojROf2d0OHVA== X-Received: by 2002:adf:fa88:0:b0:2bd:feb5:fb7b with SMTP id h8-20020adffa88000000b002bdfeb5fb7bmr13308344wrr.33.1674259361422; Fri, 20 Jan 2023 16:02:41 -0800 (PST) Original-Received: from localhost ([93.107.216.56]) by smtp.gmail.com with ESMTPSA id c13-20020adffb0d000000b00241fde8fe04sm36523945wrr.7.2023.01.20.16.02.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Jan 2023 16:02:40 -0800 (PST) Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=contovob@tcd.ie; helo=mail-wr1-x433.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:253815 Archived-At: --=-=-= Content-Type: text/plain 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: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=dired.diff 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 --=-=-= Content-Type: text/plain 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)) --=-=-=--