emacs - 如何在 elisp 中为交互式缓冲区设置名称

标签 emacs elisp

我在 emacs 中定义了以下函数 -

(defun web2py-server ()
 (interactive)
 (shell-command "cd /opt/web2py; python /opt/web2py/web2py.py &"))

以上在emacs中新建了一个缓冲区,如何为窗口设置一个名字“abc”。

谢谢, 穆尔塔萨

最佳答案

为此使用 shell-command 的第二个参数 OUTPUT-BUFFER:

(defun web2py-server ()
 (interactive)
 (shell-command "cd /opt/web2py; python /opt/web2py/web2py.py &"
                (get-buffer-create "abc")))

关于emacs - 如何在 elisp 中为交互式缓冲区设置名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11452724/

相关文章:

emacs - org-mode 不能编辑 C 源代码

windows - Emacs for Windows 中 shell 模式下的 Ack 显示无输出

emacs - Emacs org-agenda-list破坏了我的Windows拆分

Emacs Lisp 打印输出

emacs:添加模式以隐藏-显示列表

python - 我如何在 Emacs 中为某些东西着色?

regex - emacs:是否可以使用emacs regex将具有平衡括号的字符串匹配?

emacs - 如何删除组织模式导出中的标签?

emacs - Emacs模式: how to specify that thing in square brackets should be colored

Emacs——修改 `fill-column-indicator.el` 以在空白处显示