fix(details): do not display user keywords if using format string
This commit is contained in:
parent
2dc8010056
commit
343a08665f
|
@ -1975,7 +1975,8 @@ ARG must be either tags (a list of symbols) or a plist."
|
|||
(let (contents custom)
|
||||
(if (chronometrist-plist-p list)
|
||||
(setq custom chronometrist-details-display-key-values
|
||||
contents (chronometrist-plist-key-values list))
|
||||
contents (seq-remove #'keywordp
|
||||
(chronometrist-plist-key-values list)))
|
||||
(setq custom chronometrist-details-display-tags
|
||||
contents list))
|
||||
(if (and contents custom)
|
||||
|
@ -1983,7 +1984,7 @@ ARG must be either tags (a list of symbols) or a plist."
|
|||
((pred stringp)
|
||||
(mapconcat
|
||||
(lambda (elt) (format custom elt))
|
||||
list " "))
|
||||
contents " "))
|
||||
((pred functionp)
|
||||
(funcall custom list)))
|
||||
"")))
|
||||
|
|
|
@ -3140,7 +3140,8 @@ ARG must be either tags (a list of symbols) or a plist."
|
|||
(let (contents custom)
|
||||
(if (chronometrist-plist-p list)
|
||||
(setq custom chronometrist-details-display-key-values
|
||||
contents (chronometrist-plist-key-values list))
|
||||
contents (seq-remove #'keywordp
|
||||
(chronometrist-plist-key-values list)))
|
||||
(setq custom chronometrist-details-display-tags
|
||||
contents list))
|
||||
(if (and contents custom)
|
||||
|
@ -3148,7 +3149,7 @@ ARG must be either tags (a list of symbols) or a plist."
|
|||
((pred stringp)
|
||||
(mapconcat
|
||||
(lambda (elt) (format custom elt))
|
||||
list " "))
|
||||
contents " "))
|
||||
((pred functionp)
|
||||
(funcall custom list)))
|
||||
"")))
|
||||
|
@ -3167,8 +3168,10 @@ ARG must be either tags (a list of symbols) or a plist."
|
|||
(chronometrist-details-display-key-values "%s"))
|
||||
(should (equal (chronometrist-details-rows-helper nil) ""))
|
||||
(should (equal (chronometrist-details-rows-helper nil) ""))
|
||||
(should (equal (chronometrist-details-rows-helper tags) "a b c"))
|
||||
(should (equal (chronometrist-details-rows-helper plist) ":a 1 :b 2 :c 3")))))
|
||||
(should (equal (chronometrist-details-rows-helper tags)
|
||||
"a b c"))
|
||||
(should (equal (chronometrist-details-rows-helper plist)
|
||||
"1 2 3")))))
|
||||
#+END_SRC
|
||||
|
||||
**** row-transformers :extension:variable:
|
||||
|
|
Reference in New Issue