From 965b60f58512b009778b7b5279394bf01d407c3f Mon Sep 17 00:00:00 2001 From: Psionik K <73710933+psionic-k@users.noreply.github.com> Date: Wed, 10 Jan 2024 22:37:28 +0900 Subject: [PATCH] org-macs.el: org-do-remove-indentation correction * lisp/org-macs.el (org-do-remove-indentation): set `buffer-invisibility-spec' to nil before detecting the column or moving to a column. This fixes src_block indentation removal for org-modern-mode but will also correct other cases of hidden indentation. --- lisp/org-macs.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/org-macs.el b/lisp/org-macs.el index 8def5cbb..7f5d2ad8 100644 --- a/lisp/org-macs.el +++ b/lisp/org-macs.el @@ -408,7 +408,8 @@ line. Return nil if it fails." ;; Remove exactly N indentation, but give up if not possible. (when skip-fl (forward-line)) (while (not (eobp)) - (let ((ind (progn (skip-chars-forward " \t") (current-column)))) + (let* ((buffer-invisibility-spec nil) + (ind (progn (skip-chars-forward " \t") (current-column)))) (cond ((< ind n) (if (eolp) (delete-region (line-beginning-position) (point)) (throw :exit nil))) -- 2.42.0