Hi Kévin.
Kévin Le Gouguec <kevin.legoug...@gmail.com> writes: >>> #+begin_src emacs-lisp >>> (add-hook 'org-mode-hook (lambda () (electric-indent-mode -1))) >>> #+end_src >> >> Unfortunately this has side effects: it changes at least the way >> parentheses and indentation interact when opening a Babel source code >> block. It might be a good idea to mention this in ORG-NEWS. > > Could you give us a precise recipe? (Starting from emacs -Q and an > empty Org buffer) > > I've fiddled a bit with source blocks just now and I'm noticing some > weirdness that I suspect might be due to electric-indent-mode > re-indenting the previous line when hitting RET (or C-j when disabling > electric-indent-mode), but nothing specific to parentheses. At the minimum it changes the way parentheses indent automatically when editing source code blocks. Below is a minimal demo, documented using our favorite system. All the best, and stay safe. Jarmo * Demo of the effect of disabling elint 1. Save this org into file =org-elint-disable.org= 2. Save the following elisp into =minimal-org.el=, replacing the location of org mode with your path: #+begin_src elisp (add-to-list 'load-path (expand-file-name "~/src/org-mode/lisp")) (add-to-list 'load-path (expand-file-name "~/src/org-mode/contrib/lisp" t)) (add-hook 'org-mode-hook (lambda () (electric-indent-mode -1))) #+end_src 3. Toggle the last line #+begin_src elisp (add-hook 'org-mode-hook (lambda () (electric-indent-mode -1))) #+end_src in =minimal-org.el= to see the following effect: 1. Open this file with #+begin_src sh emacs -Q -l minimal-org.el org-elint-disable.org #+end_src 2. Type C-c ' for (org-edit-special) in the source code block below, and follow the instructions on the comment line. #+begin_src java :exports none :classname Demo class Demo { // 1st press RET at the end of this line, then type TAB and } #+end_src