mirror of
https://github.com/org-roam/org-roam
synced 2025-09-20 16:10:56 -05:00
(fix)completions: fix highlighting of formatted/truncated strings (#1895)
* (fix)org-roam-unlinked-references-section: Use truncate-string-ellipsis The variable can be set to a unicode ellipsis. * (fix)org-roam-node-read--format-entry: Fix highlighting for truncation Fix #1801. The truncated part of the string is made invisible. Matching on the whole string remains possible. * (fix)org-roam-format-template: Preserve string properties like format If the variable value carries properties itself, these properties take precedence. Display templates can be properties with this change. (setq org-roam-node-display-template (concat (propertize "${title:*}" 'face 'font-lock-keyword-face) " " (propertize "${tags:10}" 'face 'font-lock-constant-face)))
This commit is contained in:
@@ -127,7 +127,9 @@ value (possibly nil). Adapted from `s-format'."
|
||||
(let ((v (progn
|
||||
(set-match-data saved-match-data)
|
||||
(funcall replacer var default-val))))
|
||||
(if v (format "%s" v) (signal 'org-roam-format-resolve md)))
|
||||
(if v
|
||||
(format (apply #'propertize "%s" (text-properties-at 0 var)) v)
|
||||
(signal 'org-roam-format-resolve md)))
|
||||
(set-match-data replacer-match-data))))
|
||||
(if (functionp template)
|
||||
(funcall template)
|
||||
|
Reference in New Issue
Block a user