From: Juri Linkov <juri@linkov.net>
To: 69740@debbugs.gnu.org
Cc: Dmitry Gutov <dmitry@gutov.dev>
Subject: bug#69740: project-mode-line-format restarts ispell process on every keystroke
Date: Tue, 12 Mar 2024 09:53:37 +0200 [thread overview]
Message-ID: <86jzm7q41q.fsf@mail.linkov.net> (raw)
[related to bug#69703]
When .dir-locals.el contains:
((nil . ((mode . flyspell))))
here is a backtrace that illustrates the problem:
flyspell-mode()
set-auto-mode-0(flyspell-mode t)
hack-one-local-variable(mode flyspell)
hack-local-variables-apply()
hack-dir-local-variables-non-file-buffer()
project--value-in-dir(project-vc-name "/tmp/test/")
project-name((vc Git "/tmp/test/"))
project-mode-line-format()
eval((project-mode-line-format) t)
redisplay_internal\ \(C\ function\)()
This can be fixed by not allowing to run any mode
while reading a project name from dir-locals.
So here is a patch that fixes it:
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 9622b1b6768..8578af1cde4 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -808,8 +808,8 @@ project--value-in-dir
(with-temp-buffer
(setq default-directory dir)
(let ((enable-local-variables :all))
- (hack-dir-local-variables-non-file-buffer))
- (symbol-value var)))
+ (hack-dir-local-variables))
+ (alist-get var file-local-variables-alist)))
(cl-defmethod project-buffers ((project (head vc)))
(let* ((root (expand-file-name (file-name-as-directory (project-root project))))
next reply other threads:[~2024-03-12 7:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-12 7:53 Juri Linkov [this message]
2024-03-13 17:42 ` bug#69740: project-mode-line-format restarts ispell process on every keystroke Dmitry Gutov
2024-03-14 17:37 ` Juri Linkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86jzm7q41q.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=69740@debbugs.gnu.org \
--cc=dmitry@gutov.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.