Dired Mode In Latest Emacs Is Broken

When I try to enter a dired directory Ctrl+x d I get this message:

Symbol’s value as variable is void: enable-dir-local-variables

I immediately searched that term on line and found this thread:

https://lists.gnu.org/archive/html/help-gnu-emacs/2025-05/msg00122.html

I don’t have time to investigate further but will return to it later today.

The issue you’re running into is likely a direct result of this patch, which addresses CVE-2024-53920. I suggest looking at both as well as this blog post that’s related to it.

If you feel this is affecting your workflow, please open an upstream bug report to https://issues.redhat.com as you are very likely not the only one running into this issue and discuss your case. CentOS Stream 9, while the latest emacs with that patch hasn’t been sent out, will likely be affected soon in version emacs-27.2-15.el9.

Not much I can do on jira. Even searching is painful there. But in the thread I linked there is a temporary solution until that end of upstream sorts it out.

Add this to your .emacs config:

;; temporary hack to try to get Dired to work

(defvar enable-dir-local-variables nil)

This works for now.

The affected version is:
GNU Emacs 27.2 (build 1, x86_64-redhat-linux-gnu, GTK+ Version 3.24.31, cairo version 1.17.4) of 2025-05-12

1 Like

The update to emacs in Rockylinux 9.6 has restored the Dired functionality without the need for the fix described above.

emacs-27.2-13.el9_6.x86_64

1 Like