Demo:
因为code实在太丑了所以有人感兴趣再传gist好了。。。
Update: hack of org-eldoc
Code:
(defun *org-eldoc-get-timestamp (str)
"Return timestamp if on a headline or nil."
(concat
str
" "
(let ((deadline (org-entry-get (point) "DEADLINE" t))
(scheduled (org-entry-get (point) "SCHEDULED" t))
(closed (org-entry-get (point) "CLOSED" t))
(timestamp " "))
(if deadline (setq timestamp (concat timestamp "DEADLINE: " (propertize (substring deadline 1 -1) 'face 'org-deadline-custom) " ")))
(if scheduled (setq timestamp (concat timestamp "SCHEDULED: " (propertize (substring scheduled 1 -1) 'face 'org-scheduled-custom) " ")))
(if closed (setq timestamp (concat timestamp "CLOSED: " (propertize (substring closed 1 -1) 'face 'org-closed-custom) " ")))
timestamp)))
(advice-add 'org-eldoc-get-breadcrumb :filter-return #'*org-eldoc-get-timestamp)
(defun *org-format-outline-path-normalize (str)
(add-face-text-property
0 (length str)
'(:height 1) nil str)
str)
(advice-add 'org-format-outline-path :filter-return #'*org-format-outline-path-normalize)
org-*-custom
face 在之前的code里定义过