On Mon, May 3, 2010 at 8:03 PM, briandunnington
<
briandu...@gmail.com> wrote:
>
>> > Can you explain what your use case is?
>>
>> Sure. We are discussing how to add notification capabilities to Emacs:
>>
>>
http://permalink.gmane.org/gmane.emacs.devel/124446
>
> i read the discussion at that link, but was still wondering what the
> specific uses cases were for waiting for callback responses from the
> notifications. other than 'it would be useful' (which i agree, it
> could be) do you have any specific examples that this would enable?
Hi Brian, thanks for asking.
In Emacs you can run growlnotify.exe as suprocess and set a
"sentinental" on it. A "sentinental" is a callback function that is
run when the process finishes.
So with a "sentinental" you could let Emacs do what you want when the
user clicks the Growl notification - ie if growlnotify could wait.
> on the Windows side, the equivalent growlnotify command currently
> waits for the GNTP response so it knows if the message was sent
> successfully or not (-OK or -ERROR response), but then does not wait
> for any callback response. (that is mainly because the Windows
> growlnotify currently only allows specifying url-based callbacks and
> not socket callbacks, so there is nothing to wait for in the first
> place). it wouldnt be too hard to add this functionality, but without
> understanding the need, it could be a case of adding unnecessary
> complexity for a small gain.
The gain on the Emacs side is that this is easy to implement and any
Emacs user could immediately use Growl notifications from within Emacs
without having to upgrade Emacs. All that is needed is adding an Emacs
library that calls growlnotify as I described above.
There are of course other uses I can imagine for a /wait switch, but
this is what I have been thinking of.