Hi,
lines in example blocks are currently indented like the surrounding
begin and end delimiters. ¨This works fine unless, you want to indent
some lines manually; in this case, auto-indenting the buffer reverts
the manual indentation. This patch should prevent this from happening.
Best regards,
Valentin
diff --git a/lisp/org.el b/lisp/org.el
index 11eaf78..428804d 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -19460,10 +19460,14 @@ If point is in an inline task, mark that task
instead."
(save-excursion
(re-search-backward "^[ \t]*#\\+begin_\\([a-z]+\\)" nil t))
(setq column
- (if (equal (downcase (match-string 1)) "src")
- ;; src blocks: let `org-edit-src-exit' handle them
- (org-get-indentation)
- (org-get-indentation (match-string 0)))))
+ (cond ((equal (downcase (match-string 1)) "src")
+ ;; src blocks: let `org-edit-src-exit' handle them
+ (org-get-indentation))
+ ((equal (downcase (match-string 1)) "example")
+ (max (org-get-indentation) (org-get-indentation
(match-string 0))))
+ (t
+ (org-get-indentation (match-string 0)))
+ )))
;; This line has nothing special, look at the previous relevant
;; line to compute indentation
(t