[英]Jumping to a specified window in Emacs doesn't work when done programatically
I am trying to select the third window (I have opened 6 in my frame) in Emacs.我正在尝试 Emacs 中的 select 第三个 window (我在我的框架中打开了 6 个)。
The problem is that this:问题在于:
(select-window 3)
doesn't work.不起作用。
It throws this error in debugger:它在调试器中抛出此错误:
(wrong-type-argument window-live-p 3)
(错误类型参数 window-live-p 3)
How to make it work?如何让它发挥作用?
select-window
takes a window object as argument, not a number. select-window
将 window object 作为参数,而不是数字。 The function window-list
gives you a list of window objects in the current frame. function
window-list
为您提供当前帧中 window 对象的列表。 You can select one of them to pass to select-window
, eg您可以 select 其中之一传递给
select-window
,例如
(select-window (nth 2 (window-list)))
will select the window that is the third[1] element of the list that window-list
returns.将 select window 是
window-list
返回的列表的第三个 [1] 元素。
Do Ch f nth
and Ch f window-list
for more information on these functions.执行
Ch f nth
和Ch f window-list
以获取有关这些功能的更多信息。
[1] Note that list elements are indexed from 0. [1] 请注意,列表元素从 0 开始索引。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.