sta*_*ner 5 emacs autocomplete org-mode babel
我想启用auto-completeBabel代码块org-mode:
#+begin_src emacs-lisp
(setq ) <--- language-aware auto-completion here
#+end_src
Run Code Online (Sandbox Code Playgroud)
.emacs为了配置auto-complete这个,我需要添加到我的文件中?
聚会迟到了,但今天默认的(和推荐的没有其他黑客的方法)是使用今天映射到的 'org-edit-special 切换到该“大块头”的专用 elisp 缓冲区
cc-'
点击相同的返回到您的组织文件编辑。
C-c C-v z当您处于代码块中时,您可以切换到具有正确模式和自动完成功能的专用会话。
C-c C-v z或者C-c C-v org-babel-switch-to-session-with-code
查看组织文档 14.11 键绑定和有用的功能以获取更多信息。
最可靠(并且完全不org-mode具体)的方法涉及到一个indirect buffer. 这是一篇深入解释间接缓冲区的博客文章。基本上,间接缓冲区镜像另一个缓冲区的一部分内容。
(defun narrow-to-region-indirect (start end)
"Restrict editing in this buffer to the current region, indirectly."
(interactive "r")
(deactivate-mark)
(let ((buf (clone-indirect-buffer nil nil)))
(with-current-buffer buf
(narrow-to-region start end))
(switch-to-buffer buf)))
Run Code Online (Sandbox Code Playgroud)
此时,您将拥有一个新缓冲区,其中包含您之前创建的区域。您可以为该缓冲区启用主要模式并进行满意的编辑 - 您所做的更改(就像任何好的镜子应该做的那样)反映在原始文档中。