diff options
author | Carsten Dominik <carsten.dominik@gmail.com> | 2009-05-05 09:57:00 +0200 |
---|---|---|
committer | Carsten Dominik <carsten.dominik@gmail.com> | 2009-05-05 10:23:47 +0200 |
commit | e1f6e949ed92ed60bb95966a92154f9be734365b (patch) | |
tree | 8d8a2a18d8d866bcfd76947ccd31dbbef02116c3 | |
parent | d79696d9147c53a5ec6aeb599b8fa09e348c1a43 (diff) | |
download | org-mode-e1f6e949ed92ed60bb95966a92154f9be734365b.tar.gz |
Clock history: Present all tasks fontified
Bernt Hansen requested this.
-rwxr-xr-x | lisp/ChangeLog | 5 | ||||
-rw-r--r-- | lisp/org-clock.el | 6 | ||||
-rw-r--r-- | lisp/org.el | 9 |
3 files changed, 19 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d8f35ad..0c0ac5d 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,10 @@ 2009-05-05 Carsten Dominik <carsten.dominik@gmail.com> + * org-clock.el (org-clock-insert-selection-line): Make sure tasks + are properly fontified before shown in the selection menu. + + * org.el (org-fontify-like-in-org-mode): New function. + * org-latex.el (org-export-latex-links): Use the property list to retrieve the default image attributes. diff --git a/lisp/org-clock.el b/lisp/org-clock.el index c2f1c1c..aee0ebf 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -238,6 +238,9 @@ of a different task.") (t (error "Invalid task choice %c" rpl)))))) (defun org-clock-insert-selection-line (i marker) + "Insert a line for the clock selection menu. +And return a cons cell with the selection character integer and the marker +pointing to it." (when (marker-buffer marker) (let (file cat task) (with-current-buffer (org-base-buffer (marker-buffer marker)) @@ -249,7 +252,8 @@ of a different task.") cat (or (org-get-category) (progn (org-refresh-category-properties) (org-get-category))) - task (org-get-heading 'notags))))) + task (org-fontify-like-in-org-mode + (org-get-heading 'notags) org-odd-levels-only))))) (when (and cat task) (insert (format "[%c] %-15s %s\n" i cat task)) (cons i marker))))) diff --git a/lisp/org.el b/lisp/org.el index bd06844..0e286c4 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -4490,6 +4490,15 @@ between words." '(org-font-lock-keywords t nil nil backward-paragraph)) (kill-local-variable 'font-lock-keywords) nil)) +(defun org-fontify-like-in-org-mode (s &optional odd-levels) + "Fontify string S like in Org-mode" + (with-temp-buffer + (insert s) + (let ((org-odd-levels-only odd-levels)) + (org-mode) + (font-lock-fontify-buffer) + (buffer-string)))) + (defvar org-m nil) (defvar org-l nil) (defvar org-f nil) |