org-colview: Fix `org-columns' with a prefix argument
* lisp/org-colview.el (org-columns): Fix `org-columns' with a prefix argument. * testing/lisp/test-org-colview.el (test-org-colview/columns-scope): Update test. Reported-by: Hendrik Tews <hendrik@askra.de> <http://permalink.gmane.org/gmane.emacs.orgmode/113721>
This commit is contained in:
parent
400cd95bba
commit
444d2673bb
|
@ -781,6 +781,7 @@ view for the whole buffer unconditionally.
|
||||||
When COLUMNS-FMT-STRING is non-nil, use it as the column format."
|
When COLUMNS-FMT-STRING is non-nil, use it as the column format."
|
||||||
(interactive "P")
|
(interactive "P")
|
||||||
(org-columns-remove-overlays)
|
(org-columns-remove-overlays)
|
||||||
|
(when global (goto-char (point-min)))
|
||||||
(move-marker org-columns-begin-marker (point))
|
(move-marker org-columns-begin-marker (point))
|
||||||
(org-columns-goto-top-level)
|
(org-columns-goto-top-level)
|
||||||
;; Initialize `org-columns-current-fmt' and
|
;; Initialize `org-columns-current-fmt' and
|
||||||
|
|
|
@ -104,9 +104,10 @@
|
||||||
(lambda () (get-char-property (point) 'org-columns-value))))))
|
(lambda () (get-char-property (point) 'org-columns-value))))))
|
||||||
(should
|
(should
|
||||||
(equal
|
(equal
|
||||||
'("H1" "H2" "H3" "H4")
|
'("1" "1")
|
||||||
(org-test-with-temp-text "Top\n* H1\n** <point>H2\n*** H3\n* H4"
|
(org-test-with-temp-text
|
||||||
(let ((org-columns-default-format "%ITEM")) (org-columns t))
|
"Top\n* H1\n** <point>H2\n:PROPERTIES:\n:A: 1\n:END:"
|
||||||
|
(let ((org-columns-default-format "%A{+}")) (org-columns t))
|
||||||
(org-map-entries
|
(org-map-entries
|
||||||
(lambda () (get-char-property (point) 'org-columns-value)))))))
|
(lambda () (get-char-property (point) 'org-columns-value)))))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue