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

Question: how can I add speech to a function if it can't be advised?



Hi,
I'm trying to add speech to the `org-capture' command.
It adds a list of keys to a temporary buffer, and reads the keys you press using `read-char-exclusive'. If the key you press is in its list of valid keys, then it provides a buffer for you to capture an item, using the template you just selected. Otherwise, it gives you an error, waits for 1 second, and prompts you again.
The problem here is that the temporary buffer it pops up is not read by Emacspeak, and I am trying to make this be spoken so that you know what templates are available.
I've looked at the function that does the actual selection, `org-mks', and what it does is to create a temporary buffer, `insert' some text in it to tell you your options, and enter a loop where it reads the character, one at a time. At this point, Emacspeak keystrokes won't work at all.
So, an ideal scenario would be to speak the buffer using `emacspeak-speak-buffer' just before it enters this loop, but I'm not sure how to do this other than asking the authors of `org-capture.el' to refactor this loop out of the `org-mks' function so that it can separately be advised.
Is there a way to do this that is not an obscure hack?
Thanks!


|May 1995 - Last Year |Current Year|


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

Contact Info Page