We’re rewarding the question askers & reputations are being recalculated! Read more.

New answers tagged


I'm not 100% that the issue you have is the same one I did, but I solved it with: (setq org-src-preserve-indentation t)


indent-region indents the region according to the current mode. In a Lisp mode (e.g. emacs-lisp-mode), selecting that as the region and using TAB indents it as you say you expect, not as you show. Why would expect it to behave similarly in Org mode? (The section of the tutorial that you cite doesn't say anything about indentation, BTW.) C-h f indent-...


I am currently discussing a potential patch for as an answer to this question. The code that answers my original question looks like this: (if (or (= (point) calculate-lisp-indent-last-sexp) (eq (char-after (1+ containing-sexp)) ?:) (eq (char-before containing-sexp) ?') (let ((quoted-p nil) (point nil) (...


Select the whole code (e.g. by pressing C-Space at the start and using cursor keys to get to the end) and run indent-region (bound to C-M-\ in my Emacs).

Top 50 recent answers are included