emacs: Show org inbox length in modeline
This commit is contained in:
parent
d23f707dc0
commit
37c743dd05
1 changed files with 8 additions and 0 deletions
|
@ -253,6 +253,14 @@
|
||||||
(ido-find-file-in-dir org-directory)
|
(ido-find-file-in-dir org-directory)
|
||||||
)
|
)
|
||||||
(defun set-creation-date-heading-property () (org-set-property "CREATED" (format-time-string (org-time-stamp-format t t))))
|
(defun set-creation-date-heading-property () (org-set-property "CREATED" (format-time-string (org-time-stamp-format t t))))
|
||||||
|
(defun chvp--org-inbox-length ()
|
||||||
|
(length (org-map-entries t t (list (concat org-directory "/inbox.org"))))
|
||||||
|
)
|
||||||
|
(defun chvp--org-inbox-length-modeline ()
|
||||||
|
(let ((org-len (chvp--org-inbox-length)))
|
||||||
|
(if (<= org-len 0) nil
|
||||||
|
(concat "Org inbox: " (propertize (format "%d" org-len) 'face 'error)))))
|
||||||
|
(add-to-list 'global-mode-string '(:eval (chvp--org-inbox-length-modeline)))
|
||||||
:general
|
:general
|
||||||
(lmap
|
(lmap
|
||||||
:keymaps 'org-mode-map
|
:keymaps 'org-mode-map
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue