GNU bug report logs - #66317
Project mode-line

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Tue, 3 Oct 2023 06:33:01 UTC

Severity: wishlist

Fixed in version 30.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


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

From: Juri Linkov <juri <at> linkov.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: dmitry <at> gutov.dev, 66317 <at> debbugs.gnu.org, sbaugh <at> catern.com
Subject: Re: bug#66317: Project mode-line
Date: Wed, 18 Oct 2023 20:20:31 +0300
>> There is another problem: calling 'project-name' while evaluating
>> 'mode-line-format' often changes the coding system mode-line indicator
>> from U (utf-8) to raw-text during saving the current buffer.
>>
>> Here is a backtrace:
>>
>> - project-name
>> - project--value-in-dir (that uses with-temp-buffer)
>> - hack-dir-local-variables-non-file-buffer
>> - hack-local-variables-apply
>>
>> Then in the last function the coding system is broken
>> in two different ways:
>>
>> 1. by 'hack-one-local-variable' in `emacs -Q`
>
> How and where?
>
>> 2. by (run-hooks 'hack-local-variables-hook)
>>    in buffers where flyspell-mode is enabled
>>    'flyspell-hack-local-variables-hook' breaks
>>    the coding system too.
>
> Why?

The bug occurs when multiple lines are displayed in the echo area.
Then '(:eval (project-mode-line-format)) is called twice.
At the end of the first call 'buffer-file-coding-system'
is still correct: utf-8.  But at the beginning of the
second call it's already wrong: raw-text.

I guess it was a mistake to allow specifying the project name
in .dir-locals.el.  A better place would be in ~/.emacs.d/projects.




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

Previous Next


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