我在windows 10上运行emacs-27.1,当我尝试用c退出emacs时,会遇到解码问题。
Emacs阻止我退出并报告错误如下:
These default coding systems were tried to encode text
in the buffer ‘ *temp file*’:
(prefer-utf-8 (45 . 4194262) (46 . 4194268) (47 . 4194241) (48 . 4194297))
(utf-8 (45 . 4194262) (46 . 4194268) (47 . 4194241) (48 . 4194297))
However, each of them encountered characters it couldn’t encode:
prefer-utf-8 cannot encode these:
utf-8 cannot encode these:
Click on a character (or switch to this window by ‘C-x o’
and select the characters by RET) to jump to the place it appears,
where ‘C-u C-x =’ will give information about it.
Select one of the safe coding systems listed below,
or cancel the writing with C-g and edit the buffer
to remove or modify the problematic characters,
or specify any other coding system (and risk losing
the problematic characters).
raw-text no-conversion

不幸的是,没有这样一个名为“temp文件”的缓冲区:
~/s/a/e/current/bin λ (buffer-list)
(#<buffer *eshell*> #<buffer *scratch*> #<buffer *Minibuf-1*> #<buffer primate-org-agenda.el> #<buffer my-config> #<buffer todo.today.org> #<buffer CAPTURE-todo.today.org> #<buffer *Ibuffer*> #<buffer *doom*> #<buffer *Minibuf-0*> #<buffer *Messages*> #<buffer *code-conversion-work*> #<buffer *Echo Area 0*> #<buffer *Echo Area 1*> #<buffer *code-converting-work*> #<buffer *helm-mode-load-file*> #<buffer *which-key*> #<buffer *Custom-Work*> #<buffer *helm-mode-basic-save-buffer*>)遵循以前的错误报告准则
position: 371 of 819 (45%), column: 29
character: (displayed as ) (codepoint 4194262, #o17777726, #x3fffd6)
charset: eight-bit (Raw bytes 128-255)
code point in charset: 0xD6
syntax: w which means: word
category: L:Left-to-right (strong)
to input: type "C-x 8 RET 3fffd6"
buffer code: #xD6
file code: not encodable by coding system utf-8
display: no font available
Character code properties: customize what to show
general-category: Cn (Other, Not Assigned)
decomposition: (4194262) (' ')
Here is a ‘help-xref’ button labeled ‘ ’.
There is an overlay here:
From 342 to 379
face hl-line
priority -50
window #<window 18 on *Warning*>
There are text properties here:
button (t)
category help-xref-button
face link
help-args (" *temp file*" 45)
help-echo "mouse-2, RET: jump to this character"
help-function [Show]

有什么办法可以解决这个问题吗?
发布于 2021-07-09 23:31:18
Linux上的相同问题:Ubuntu20.4加载PNG上的Emacs27.1。它不会让我杀死缓冲区。
解决办法
关闭撤消树模式。撤销树至少将文件的某些内容写入Linux上的临时缓冲区- temp,在您的Windows上写入临时文件--将其写入磁盘,杀死缓冲区,然后由于编码问题而无法清理。
https://stackoverflow.com/questions/63644928
复制相似问题