[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Search]

Patch: Reading the State of a Todo Item After It's Changed



Hi,
One problem I faced when using Org mode to write my todo items was that every time I pressed C-c C-t to change the state of a todo item, I needed to press C-e l to get some sort of feedback. So I thought I'd advise the relevant function to make Emacspeak announce the new state.
Here is the patch:
1 file changed, 9 insertions(+)
lisp/emacspeak-org.el | 9 +++++++++

modified   lisp/emacspeak-org.el
@@ -708,6 +708,15 @@ and assign  letter `h' to a template that creates the hyperlink on capture."
        (emacspeak-auditory-icon 'fill-object)
        (message "Filled current paragraph")))
 
+(defadvice org-todo (after emacspeak pre act comp)
+     "Provide auditory feedback when changing the state of a TODO item."
+     (when (ems-interactive-p)
+       (emacspeak-auditory-icon 'button)
+       (let ((state (org-get-todo-state)))
+         (if (null state)
+             (message "State unset")
+           (message state)))))
+
 ;;}}}
 
 (provide 'emacspeak-org)



|May 1995 - Last Year |Current Year|


If you have questions about this archive or had problems using it, please contact us.

Contact Info Page