Browse Source

Fix "Not at a block" error on dynamic blocks

* lisp/org.el (org-hide-block-toggle, org-indent-block): Recognize
  dynamic blocks.

Thanks to Eric S Fraga for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/90711
Nicolas Goaziou 4 years ago
parent
commit
3aa27acfcb
1 changed files with 6 additions and 6 deletions
  1. 6 6
      lisp/org.el

+ 6 - 6
lisp/org.el

@@ -7339,9 +7339,9 @@ is non-nil, hide it unconditionally."
   (interactive)
   (let ((element (org-element-at-point)))
     (unless (memq (org-element-type element)
-		  '(center-block comment-block example-block export-block
-				 quote-block special-block src-block
-				 verse-block))
+		  '(center-block comment-block dynamic-block example-block
+				 export-block quote-block special-block
+				 src-block verse-block))
       (user-error "Not at a block"))
     (let* ((start (save-excursion
 		    (goto-char (org-element-property :post-affiliated element))
@@ -22677,9 +22677,9 @@ assumed to be significant there."
     (user-error "Not at a block"))
   (let ((element (org-element-at-point)))
     (unless (memq (org-element-type element)
-		  '(comment-block center-block example-block export-block
-				  quote-block special-block src-block
-				  verse-block))
+		  '(comment-block center-block dynamic-block example-block
+				  export-block quote-block special-block
+				  src-block verse-block))
       (user-error "Not at a block"))
     (org-with-wide-buffer
      (org-indent-region (org-element-property :begin element)