[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org 58c5c5882c 3/5: org-columns: Fix when adding spaces
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org 58c5c5882c 3/5: org-columns: Fix when adding spaces to headings |
Date: |
Sun, 20 Aug 2023 06:58:16 -0400 (EDT) |
branch: externals/org
commit 58c5c5882ccf7b0405ef5ac5ce6614078c0a97fe
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>
org-columns: Fix when adding spaces to headings
* lisp/org-colview.el (org-columns): Use markers to store collected
column headline value positions. This is necessary because
`org-columns--display-here' may modify buffer, invalidating headline
positions returned by `org-scan-tags'.
Reported-by: Jakob Schöttl <jschoett@gmail.com>
Link:
https://orgmode.org/list/831f07e0-d86a-a0dc-c967-e48906f520a1@gmail.com
---
lisp/org-colview.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lisp/org-colview.el b/lisp/org-colview.el
index 9699be61b0..10eba15e6e 100644
--- a/lisp/org-colview.el
+++ b/lisp/org-colview.el
@@ -888,7 +888,7 @@ When COLUMNS-FMT-STRING is non-nil, use it as the column
format."
;; Collect contents of columns ahead of time so as to
;; compute their maximum width.
(org-scan-tags
- (lambda () (cons (point) (org-columns--collect-values))) t
org--matcher-tags-todo-only)))
+ (lambda () (cons (point-marker) (org-columns--collect-values)))
t org--matcher-tags-todo-only)))
(when cache
(org-columns--set-widths cache)
(org-columns--display-here-title)
@@ -902,6 +902,7 @@ When COLUMNS-FMT-STRING is non-nil, use it as the column
format."
(setq truncate-lines t))
(dolist (entry cache)
(goto-char (car entry))
+ (move-marker (car entry) nil)
(org-columns--display-here (cdr entry)))))))))
(defun org-columns-new (&optional spec &rest attributes)