How to enable autocomplete in Emacs Org-Babel?

I would like to include auto-completefor Babel's code blocks in org-mode:

#+begin_src emacs-lisp
(setq )                 <--- language-aware auto-completion here
#+end_src

What do I need to add to my file .emacsto configure auto-completefor this?

+5
source share
2 answers

The most reliable (and completely non org-mode) way to do this involves indirect buffer. Here is a blog post explaining indirect buffers in depth. Basically, an indirect buffer displays the contents of a section of another 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)))

, , . - ( ) .

+2

C-c C-v z, .

C-c C-v z C-c C-v org-babel-switch-to-session-with-code

14.11. .

+1

All Articles