On Wed, Jun 09 2010, Tassilo Horn wrote: > (defvar th-notify-body-to-id-map (make-hash-table :test 'string=) > "Maps BODY values of notifications to the last notification ID. > If ID is -1, then any further notifications with that body will > be skipped.") > > (defun th-notify (&rest args) > "Create a notification popup. > For ARGS, see `notifications-notify'. > If there was a notification with the same BODY before, that one > will be replaced by the current notification." > (require 'notifications) > (let* ((body (plist-get args :body)) > (replace-id (or (gethash body th-notify-body-to-id-map) > (plist-get args :replaces-id)))) > (unless (eql replace-id -1) > (puthash > body > (apply 'notifications-notify > (plist-put (plist-put args :replaces-id replace-id) > :timeout 0)) > th-notify-body-to-id-map)))) What about adding: :on-close `(lambda (reason) (when (eq reason 'dismissed) (puthash ,body -1 th-notify-body-to-id-map))) in `args' ? -- Julien Danjou // ᐰ http://julien.danjou.info