Browse Source

org-colview: Fix "wrong-type-argument markerp nil"

* lisp/org-colview.el (org-columns-remove-overlays): Fix
"wrong-type-argument markerp nil".

When calling `org-agenda-columns', `org-columns-top-level-marker' is
not set. Handle this situation.

Reported-by: Benjamin Beckwith <bnbeckwith@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-09/msg00566.html>
Nicolas Goaziou 7 years ago
parent
commit
226d2fcaa2
1 changed files with 2 additions and 1 deletions
  1. 2 1
      lisp/org-colview.el

+ 2 - 1
lisp/org-colview.el

@@ -464,7 +464,8 @@ for the duration of the command.")
       (kill-local-variable 'org-previous-header-line-format)
       (remove-hook 'post-command-hook 'org-columns-hscroll-title 'local))
     (set-marker org-columns-begin-marker nil)
-    (set-marker org-columns-top-level-marker nil)
+    (when (markerp org-columns-top-level-marker)
+      (set-marker org-columns-top-level-marker nil))
     (org-with-silent-modifications
      (mapc #'delete-overlay org-columns-overlays)
      (setq org-columns-overlays nil)