emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals-release/org 238a80d 1/2: org-colview.el (org-columns):


From: ELPA Syncer
Subject: [elpa] externals-release/org 238a80d 1/2: org-colview.el (org-columns): Replace org-map-entries with org-scan-tags
Date: Mon, 3 May 2021 10:57:11 -0400 (EDT)

branch: externals-release/org
commit 238a80d3ad8406af4205e31684ddd066e6230742
Author: Nicholas Savage <nick@nicksavage.ca>
Commit: Bastien <bzg@gnu.org>

    org-colview.el (org-columns): Replace org-map-entries with org-scan-tags
    
    * lisp/org-colview.el (org-columns): Replace call to `org-map-entries'
    to build cache with `org-scan-tags'.
    
    Simplifies `org-columns' to call `org-scan-tags' instead of
    `org-map-entries'.  This is to fix a bug where an unexpected non-existent
    agenda file error was thrown if the buffer that `org-columns' was called
    on was not yet saved to disk.  This also simplifies `org-columns' and
    prevents unnecessary agenda preparation functions from running.
---
 lisp/org-colview.el | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/lisp/org-colview.el b/lisp/org-colview.el
index 9dad8c7..8226a94 100644
--- a/lisp/org-colview.el
+++ b/lisp/org-colview.el
@@ -836,12 +836,11 @@ Also sets `org-columns-top-level-marker' to the new 
position."
 (defun org-columns (&optional global columns-fmt-string)
   "Turn on column view on an Org mode file.
 
-Column view applies to the whole buffer if point is before the
-first headline.  Otherwise, it applies to the first ancestor
-setting \"COLUMNS\" property.  If there is none, it defaults to
-the current headline.  With a `\\[universal-argument]' prefix \
-argument, turn on column
-view for the whole buffer unconditionally.
+Column view applies to the whole buffer if point is before the first
+headline.  Otherwise, it applies to the first ancestor setting
+\"COLUMNS\" property.  If there is none, it defaults to the current
+headline.  With a `\\[universal-argument]' prefix \ argument, GLOBAL,
+turn on column view for the whole buffer unconditionally.
 
 When COLUMNS-FMT-STRING is non-nil, use it as the column format."
   (interactive "P")
@@ -867,9 +866,8 @@ When COLUMNS-FMT-STRING is non-nil, use it as the column 
format."
        (let ((cache
               ;; Collect contents of columns ahead of time so as to
               ;; compute their maximum width.
-              (org-map-entries
-               (lambda () (cons (point) (org-columns--collect-values)))
-               nil nil (and org-columns-skip-archived-trees 'archive))))
+               (org-scan-tags
+               (lambda () (cons (point) (org-columns--collect-values))) t 
org--matcher-tags-todo-only)))
          (when cache
            (org-columns--set-widths cache)
            (org-columns--display-here-title)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]