简体   繁体   English

emacs 24中消息显示行为已更改

[英]message display behavior changed in emacs 24

I typically use emacs with a single frame split into 2 windows stacked vertically. 我通常使用带有单个框架的emacs,将其分成垂直堆叠的2个窗口。

In emacs 23 (and before), when i happen upon a line with a compiler warning, the echo area/minibuffer will expand to show the entire text of the message (if the message is more than one line), but the 2 main windows will be otherwise unaffected (so the bottom window may lose a line or 2 of display temporarily). 在emacs 23(及之前的版本)中,当我碰到一行带有编译器警告的行时,echo区域/迷你缓冲区将展开以显示消息的整个文本(如果消息多于一行),但是有2个主窗口否则不会受影响(因此底部窗口可能会暂时丢失一行或两行显示)。

In emacs 24, however, the whole bottom window (above the minibuffer) shifts upwards so that the top window ends up losing a line or 2 of display temporarily. 但是,在emacs 24中, 整个底部窗口(在微型缓冲区上方)向上移动,因此顶部窗口最终会暂时丢失一行或两行显示。 I find it very visually disconcerting that the whole bottom window shifts and would like to go back to the emacs 23 (and earlier) behavior. 我在视觉上感到非常困惑,整个底部窗口发生了变化,并希望回到emacs 23(及更早版本)的行为。

I've looked through the emacs manual (windows, frames, minibuffer, echo area) and the version 24 NEWS and have not been able to find any mention of a change that might cause this behavior or a variable which might be able to control this behavior. 我浏览了emacs手册(窗口,框架,微型缓冲区,回显区域)和版本24 NEWS,却找不到任何可能引起此行为的更改或可能控制此行为的变量行为。 Any pointers would be greatly appreciated. 任何指针将不胜感激。

UPDATE: 更新:

to reproduce the behavior: 重现该行为:

  1. open emacs 24, split frame into 2 windows, one above the other 打开emacs 24,将框架分成2个窗口,一个在另一个窗口上
  2. open some buffer full of text in top window 在顶部窗口中打开一些充满文本的缓冲区
  3. open "*scratch*" buffer in bottom window 在底部窗口中打开"*scratch*"缓冲区
  4. add this snippet to your scratch buffer and execute it from the cursor (using eval-last-sexp , Cx Ce ), make sure that the test message is long enough that it wraps in the window 将此代码段添加到您的暂存缓冲区中,然后从光标处执行(使用eval-last-sexpCx Ce ),确保测试消息足够长,可以将其包装在窗口中

(message "this is a very long message that will cause the minibuffer window to show more than one line of text and cause the whole bottom window to shift as a result in emacs 24")

this should cause the "*scratch*" buffer window to shift up when the minibuffer displays the message, and back down when the message goes away. 当微型缓冲区显示消息时,这将导致"*scratch*"缓冲区窗口向上移动 ,而当消息消失时,该窗口将向下移动。 if you try the same test in emacs 23, the "*scratch*" buffer window will not move . 如果您在emacs 23中尝试相同的测试,则"*scratch*"缓冲区窗口将不会移动

UPDATE 2: 更新2:

To clarify further (maybe my description is confusing to some), but problem is not with the minibuffer behavior. 为了进一步阐明(也许我的描述有些混乱),但是问题在于minibuffer的行为。 the behavior of the minibuffer is just fine and has not changed (it temporarily resizes to display all the text). 微型缓冲区的行为很好,并且没有更改(它会临时调整大小以显示所有文本)。 the behavior i am referring to is that of the window above the minibuffer (the lower window of the 2 main buffer windows). 我指的是迷你缓冲区上方的窗口(2个主缓冲区窗口的下部窗口)的行为。 in emacs 23 this window did not move at all (so the lower lines were temporarily obscured). 在emacs 23中,此窗口完全没有移动 (因此下面的行暂时被遮盖了)。 in emacs 24, all the text in this window shifts up as the minibuffer resizes. 在emacs 24中, 此窗口中的所有文本随着minibuffer调整大小而上 this is the new, problematic behavior. 这是新的有问题的行为。

虽然我不知道是什么原因导致了您所使用的版本中行为的确切变化,但似乎已在24.2.50.1和更高版本中恢复了该行为。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM