[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] [PATCH] org.el: Fix indentation in lists after blocks with special e
From: |
Tim Stewart |
Subject: |
[O] [PATCH] org.el: Fix indentation in lists after blocks with special env |
Date: |
Fri, 19 May 2017 23:41:40 -0400 |
User-agent: |
mu4e 0.9.18; emacs 25.1.1 |
* lisp/org.el (org--get-expected-indentation): Fix indentation within
lists after blocks that support a special editing environment.
Testing shows that the indentation within lists is incorrect after
`example-block', `export-block', and `source-block'. The logic falls
through and makes a recursive call to `org-get-indentation' which
results in an indent to the same level as the last line of the block's
contents.
TINYCHANGE
---
lisp/org.el | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/lisp/org.el b/lisp/org.el
index 59f537b..441597a 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -22604,6 +22604,13 @@ ELEMENT."
;; and contents.
((= (line-beginning-position) post-affiliated)
(org--get-expected-indentation element t))
+ ;; Line above is a `#+BEGIN_.../#+END_...' structural
+ ;; element with support for special editing environments.
+ ;; Make sure we indent to the same level as the element
+ ;; instead of its contents.
+ ((member (car (org-element-at-point))
+ '(example-block export-block src-block))
+ (org-get-indentation))
;; POS is after contents in a greater element. Indent like
;; the beginning of the element.
((and (memq type org-element-greater-elements)
--
2.1.4
- [O] [PATCH] org.el: Fix indentation in lists after blocks with special env,
Tim Stewart <=