我应该向 .emacs 文件中的 switch-to-buffer 参数传递什么?
我在 .emacs 文件中的以下行中收到错误:
(switch-to-buffer *Completions*)
错误:作为变量的符号值无效
我在 switch-to-buffer
上执行了 describe-function
并发现我可以向它传递一个 BUFFER (以及我当前不需要的另一个可选参数)。我做错了什么?
只是一些注意事项:
一个。我还需要两个类似的行 (switch-to-buffer *grep*)
和 (switch-to-buffer *compilation*)
所以使用 的简单解决方案(switch-to-completions)
并不能解决我所有的问题。
b.我需要的所有缓冲区都已打开,所以我认为这不是问题。
I am getting an error in my .emacs file at the following line:
(switch-to-buffer *Completions*)
error: symbols value as variable is void
I did a describe-function
on switch-to-buffer
and found I CAN pass it a BUFFER (and another optional argument which I do not currently need). What am I doing wrong?
Just a few notes:
a. I also need two similar lines (switch-to-buffer *grep*)
and (switch-to-buffer *compilation*)
so the simple solution of using (switch-to-completions)
won't solve all of my problems.
b. All of the buffers I require are already open, so I don't think that is the problem.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
尝试
Try
您可以指定缓冲区名称,如下所示:
来自文档:
You can specify a buffer name, as such:
From the docs:
Dewayne 所说的含义是,如果您尝试以编程方式执行操作,并且不想特别处理,则可以将从
(buffer-list)
返回的对象传递给函数。字符串作为中介。The implication of what Dewayne said is that you can pass objects returned from things like
(buffer-list)
to functions, if you're trying to do things programmatically, and don't particularly want to deal with strings as an intermediary.