Matlab Emacs缓冲区撤消限制

Matlab Emacs缓冲区撤消限制,matlab,emacs,Matlab,Emacs,当我将大量内容打印到标准输出时,我在我的matlab shell缓冲区中得到此警告: Warning (undo): Buffer `*MATLAB*' undo info was 12268000 bytes long. The undo info was discarded because it exceeded `undo-outer-limit'. This is normal if you executed a command that made a huge change to t

当我将大量内容打印到标准输出时,我在我的
matlab shell
缓冲区中得到此警告:

Warning (undo): Buffer `*MATLAB*' undo info was 12268000 bytes long.
The undo info was discarded because it exceeded `undo-outer-limit'.

This is normal if you executed a command that made a huge change
to the buffer.  In that case, to prevent similar problems in the
future, set `undo-outer-limit' to a value that is large enough to
cover the maximum size of normal changes you expect a single
command to make, but not so large that it might exceed the
maximum memory allotted to Emacs.
我的emacs如下所示:


我真的不需要在
matlabshell
中进行任何撤销,这是正确的缓冲区。有没有办法禁用此警告?注意,左边的缓冲区是一个
MATLAB
脚本,这意味着主要模式是MATLAB,当然不应该在那里禁用undo

您的问题有点模棱两可,但假设您说不需要撤消此缓冲区中的内容,则可以按每个缓冲区禁用撤消系统:

buffer-disable-undo is an interactive compiled Lisp function in `simple.el'.

(buffer-disable-undo &optional BUFFER)

Make BUFFER stop keeping undo information.
No argument or nil as argument means do this for the current buffer.
因此,您可以交互地调用M-x
buffer disable undo
RET,或者如果您确信这一点,您可以将其添加到相关模式的挂钩函数中

编辑:

因此,根据问题评论中的额外信息,我建议:

(添加挂钩“matlab外壳模式挂钩”缓冲区禁用撤消)

正如警告信息所说(或用来说?):

您可以通过添加条目来禁用此缓冲区的弹出
(撤消放弃信息)
到用户选项
警告抑制类型
, 在
警告
库中定义

即:

(add-to-list 'warning-suppress-types '(undo discard-info))

(这当然只是禁用警告,而不是撤消数据收集本身。)

我更新了问题<代码>缓冲区禁用撤消部分回答了这个问题。
*MATLAB*
缓冲区处于哪种模式?我可以看到较轻的文本是“M-Shell”。我猜这是一种
matlab外壳模式
,但是如果你使用
C-HM
,你可以告诉我们。@phils,你的猜测是对的。这是matlab外壳模式。左侧和右侧的模式是否不同?是否不同?一种是帮助编辑特定语言的源代码的模式,另一种是与外部运行进程交互的模式。尽管两者都与MATLAB有关,但这两个活动几乎没有共同之处。@phils,谢谢。我不明白在右边的缓冲区上星号是什么意思。这和MATLAB模式有关吗?不,这是缓冲区的名称,就像“frequency_response.m”是左边窗口中缓冲区的名称一样。文件访问缓冲区是以它们访问的文件命名的(但如果打开多个具有相同文件名的文件,则为“未限定”)。像*MATLAB*这样的非文件缓冲区通常有以星号开头和结尾的名称(我不确定这是否是一个有文档记录的约定,但它显然是为了防止与实际文件的命名冲突)。