GNU bug report logs -
#66825
last-coding-system-used in basic-save-buffer
Previous Next
Reported by: Juri Linkov <juri <at> linkov.net>
Date: Sun, 29 Oct 2023 18:44:02 UTC
Severity: normal
Fixed in version 30.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
>> I don't understand this alternative. The mode line updating
>> that uses 'project-mode-line-format' that unintentionally
>> changes 'last-coding-system-used' is called from this line
>> in 'basic-save-buffer-2':
>>
>> (write-region nil nil
>> buffer-file-name nil t buffer-file-truename)
>>
>> because this call in 'write_region' updates the mode line:
>>
>> message_with_string ((NUMBERP (append)
>> ? "Updated %s"
>> : ! NILP (append)
>> ? "Added to %s"
>> : "Wrote %s"),
>> visit_file, 1);
>
> How does message_with_string update the mode line?
I'm not know, some deeper function needs to update the mode line
when the multi-line message resizes the echo area.
> And why does last-coding-system-used get set to raw-text-unix in this
> scenario anyway?
Because send_process needs to set it to raw-text-unix for ispell:
send_process (Lisp_Object proc, const char *buf, ptrdiff_t len, Lisp_Object object)
{
Vlast_coding_system_used = CODING_ID_NAME (coding->id);
Here is a backtrace:
send_process
process-send-string
ispell-send-string
ispell-buffer-local-parsing
ispell-accept-buffer-local-defs
flyspell-accept-buffer-local-defs
flyspell--mode-on
flyspell-mode
hack-one-local-variable(mode flyspell)
hack-local-variables-apply
hack-dir-local-variables-non-file-buffer
project--value-in-dir
project-name
project-mode-line-format
eval((project-mode-line-format))
write-region
basic-save-buffer-2
basic-save-buffer-1
basic-save-buffer
save-buffer
This bug report was last modified 1 year and 267 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.