mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2025-02-08 21:38:10 +00:00
colview: Display active time stamps as inactive
* lisp/org-colview.el (org-columns--displayed-value): Convert active time stamp values to inactive time stamps to avoid duplicate entries in the agenda. * testing/lisp/test-org-colview.el (test-org-colview/dblock): Add tests.
This commit is contained in:
parent
75902a4732
commit
7684b59c78
@ -257,6 +257,8 @@ value for ITEM property."
|
||||
(if org-hide-leading-stars ?\s ?*))
|
||||
"* "))))
|
||||
(concat stars (org-link-display-format value))))
|
||||
(`(,(or "DEADLINE" "SCHEDULED" "TIMESTAMP") . ,_)
|
||||
(replace-regexp-in-string org-ts-regexp "[\\1]" value))
|
||||
(`(,_ ,_ ,_ ,_ nil) value)
|
||||
;; If PRINTF is set, assume we are displaying a number and
|
||||
;; obey to the format string.
|
||||
|
@ -1519,7 +1519,24 @@
|
||||
(org-test-with-temp-text
|
||||
"* H src_emacs-lisp{(+ 1 1)} 1\n<point>#+BEGIN: columnview\n#+END:"
|
||||
(let ((org-columns-default-format "%ITEM")) (org-update-dblock))
|
||||
(buffer-substring-no-properties (point) (point-max))))))
|
||||
(buffer-substring-no-properties (point) (point-max)))))
|
||||
;; Active time stamps are displayed as inactive.
|
||||
(should
|
||||
(equal
|
||||
"#+BEGIN: columnview
|
||||
| ITEM | d | s | t |
|
||||
|------+------------------+------------------+------------------|
|
||||
| H | [2020-05-14 Thu] | [2020-05-11 Mon] | [2020-06-10 Wed] |
|
||||
#+END:"
|
||||
(org-test-with-temp-text
|
||||
"* H
|
||||
SCHEDULED: <2020-05-11 Mon> DEADLINE: <2020-05-14 Thu>
|
||||
<2020-06-10 Wed>
|
||||
<point>#+BEGIN: columnview\n#+END:"
|
||||
(let ((org-columns-default-format
|
||||
"%ITEM %DEADLINE(d) %SCHEDULED(s) %TIMESTAMP(t)"))
|
||||
(org-update-dblock))
|
||||
(buffer-substring-no-properties (point) (point-max))))))
|
||||
|
||||
(provide 'test-org-colview)
|
||||
;;; test-org-colview.el ends here
|
||||
|
Loading…
x
Reference in New Issue
Block a user