jwiegley / alert Goto Github PK
View Code? Open in Web Editor NEWA Growl-like alerts notifier for Emacs
License: Other
A Growl-like alerts notifier for Emacs
License: Other
Hi John,
This bit in alert
seems fishy:
(catch 'finish
(dolist (config (append alert-user-configuration
alert-internal-configuration))
(let* ((style-def (cdr (assq (or style (nth 1 config))
alert-styles)))
The body of this loop will only run if one of the two alert-*-configuration
is non-nil; this means that running (alert "This is an alert" :style 'libnotify)
without setting either of these variables will cause the default message
backend to be used.
Is this expected?
terminal-notifier style notification is never displayed but is added to the Notification Center in OS X. The behavior is like I have Do Not Disturb enabled even when I don't. A notification does correctly display when I invoke terminal-notifier
directly via async-shell-command
.
Mac OS Version: macOS Sierra
Emacs version: 25.1.1
Alert version: 1.2
At work, I'm using Emacs for Mac OS X. I installed terminal-notifier using brew, and I cannot get my library to emit notifications using the terminal-notifier style provided by alert, everything I get on Message buffer is this:
hola mundo
[nil 22209 57989 289983 nil alert-remove-when-active (alert-message-remove (:message "hola mundo" :title "*scratch*" :icon nil :severity normal :category nil :buffer #<buffer *scratch*> ...)) nil 0]
Any idea what's going on? thanks!
Hi! I am an emacs user using spacemacs and org-pomodoro which happen to use alert. I didn't receive notificaitons from org-pomodoro because. I am not good with elisp but my hunch is alert is not compatible with emacs 25.1. I kindly request for the compatibility with this one thanks.
Version 1.2 is almost two years and 22 commits old, including some important bug fixes (Eg, 80374af). Could you please tag a release, so that people who get alert from melpa-stable get the bugfixes?
Also, since Emacs 25.x now has package-archive-priorities
, tagged releases for all packages are not needed anymore for people who prefer Melpa Stable. Hence, deleting all the release tags is also an option, alert will then be removed from stable, but properly configured recent Emacs will be able to fallback to Melpa. (Alhough I can't confirm deleting tags is enough to remove a package from Melpa Stable, I believe it can be safely assumed.)
Thanks a lot,
Thibault
On Emacs 28/master I get:
Debugger entered--Lisp error: (invalid-function log4e:deflogger)
log4e:deflogger("alert" "%t [%l] %m" "%H:%M:%S")
alert-log-notify((:message "This is an alert" :title "*Messages*" :icon nil :severity normal :category nil :buffer #<buffer *Messages*> :mode messages-buffer-mode :id nil :data nil))
alert("This is an alert")
eval((alert "This is an alert") t)
eval-expression((alert "This is an alert") nil nil 127)
funcall-interactively(eval-expression (alert "This is an alert") nil nil 127)
call-interactively(eval-expression nil nil)
command-execute(eval-expression)
When I attempt to M-: (alert "This is an alert")
This post gives some ideas about new styles, like dbus, zenity, kdialog or xmessage. even sound alerts.
http://emacs-fu.blogspot.com/2009/11/showing-pop-ups.html
Hi,
Cool product - I use it extensively to build out alerts for Weechat etc.
I've noticed their is no locking/semaphore on the stored original mode-line face. This means that if alert-mode-line-notify if called twice in quick succession, such that the second call occurs before the corresponding call to alert-mode-line-restore occurs from the first call, a race condition occurs.
Ultimately the value persisted by the first call in alert-saved-mode-line-face is overwritten by the first alert's face. At this point the original face is lost and the alert's face is never restored to its original value.
This happens frequently in reality when using alert with Weechat in a busy discussion!
You can actually avoid this using predicates in the user configuration of alerts as shown below.
But unless I've misunderstood how to define model-line alerts, I don't think they are ever useful without the predicate, and so this should probably be implemented in the Lisp code itself?
To reproduce just execute something like:
(alert "This is an alert" :title "Alert" :severity 'high :category 'chat)
(alert "This is an alert" :title "Alert" :severity 'high :category 'chat)
With the alert configuration set to mode-line for any "chat" event.
To fix it using only config you can do the below (this assumes Prelude's mode-line face is default):
'(alert-user-configuration
(quote
((((:category . "chat"))
message
((:continue . t)))
(((:category . "chat")
(:predicate lambda
(name)
(equal
(face-attribute
(quote mode-line)
:foreground)
"#8FB28F")))
mode-line
((:continue . t))))))
@myuhe @hexmode @lurdan @iqbalansari @purcell @fgallina @IvanMalison
To everyone who has contributed code to alert: I would like to include use
package in the next version of Emacs, but to do so, I need copyright
assignment forms to be signed by anyone who has added code to alert. If you do
not wish to sign such a copyright assignment form, let me know so that I can
find a way to back out any changes you may have made.
It's quite possible that due to recent code rewrites, your change may not
appear anymore. If that is the case, I only ask that you verify this, so I can
take you off of the list of people I need assignment forms from.
Thank you!
John
Hello,
Thank you for your amazing package.
In your README you suggested using the notifications package for desktop notifications.
However your package seems to be used by some popular packages out there, like org-alert for example.
Would it be possible to include a built-in style for windows desktop notifications ?
As an example (i'm an elisp newbie), here is what I ended up doing in my own init.el, using the built-in w32-notification-notify
(use-package alert
:config
;; Add the windows desktop notifications if on windows
(when (eq system-type 'windows-nt)
(alert-define-style
'windows-desktop-notification-style
:title "Windows Desktop Notification style"
:notifier
(lambda (info)
(let ((notif-id (w32-notification-notify :title (plist-get info :title) :body (plist-get info :message))))
;; Close it after 3 seconds (no new notification can be sent if left unclosed)
(run-with-timer 3 nil `(lambda() (w32-notification-close ,notif-id))))))
(setq alert-default-style 'windows-desktop-notification-style)))
Thank you for your amazing work for the emacs community
The current toaster is relay on https://github.com/nels-o/toaster, which is broken, while https://github.com/KDE/snoretoast.
The bin file seems can be executed without any extra dependency (.NET 4.0 maybe?), also features 2 level of toast display time, which can integrate with the severity feature.
When I set
(setq alert-default-style 'libnotify)
and then run
(alert "something" :persistent t)
notification is shown, but it disappears after I guess alert-fade-time
.
But if I pass :style
explicitly it works just fine.
(alert "something" :persistent t :style 'libnotify)
It looks like it shoudn't be like this.
No matter how I configure alert-fade-time
, notifications always seem to disappear after 5 secs. I'm using libnotify on Linux.
E.g. I've set:
(setq alert-fade-time 3600)
But still the alerts disappear.
If I manually call notify-send
from the commandline, I can pass through time specification without issue, e.g.:
notify-send -t 60000 "hello world" "goodbye world"
Works as expected.
tmux offers two methods of messaging the user:
Both are suitable for using as alert method.
Not sure if I'll make it to code it soon, just dumping the idea. Comments welcome.
It seems like the :peristent
example in
Line 101 in d085f70
:status
to refer to.
Line 1029 in d085f70
base-info
to a list that doesn't include any :status
, and then the function from the :persistent
key is called on base-info
: Line 1052 in d085f70
Would it be possible to just add that key to base-info
? Perhaps
Line 1079 in d085f70
base-info
then, instead of the separate local variable current-buffer-status
.One minor issue is that [...] simply doing (alert "test test" :id "new-mail") from eval-expression will get immediately removed by the post-command-hook alert-remove-on-command, unless you also provide some :buffer to it.
( via #58 (comment) )
I believe this is not documented and somewhat confusing when testing any style that uses an :remover
.
Is it possible to wrap the post-command-hook in run-with-timer
or similar to fix the issue?
I was poking at some old configs and I saw alert-log-messages
which claims that, when non-nil will cause alerts to go to Alerts
. Huh, I use alerts sometimes, and have had this setting for years and I've never seen an *Alerts*
buffer. So I did some digging.
It looks like this *Alerts*
is a legacy behavior implemented in alert-legacy-log-notify
which only runs when log4e
isn't installed, which can't happen (I think) if you install alert as a package because log4e
always gets pulled in as a dependency.
I managed to do a little big of hacking to my elpa
directory and get it to work, and then in the course of writing up this ticket I managed to figure out how to get log4e
to work.
I'm not sure what the "right" thing to do here is:
log4e
. I personally don't use it for anything else, and (maybe this is a generational thing) but I also haven't really used log4<x>
before and I don't find it super obvious, and I don't really feel like I need a special (optional) logging package that I don't otherwise use, for a really simple alert package (that I do use.)alert-log-messages
is non-nil, we could just call (message (format "[alert:%s] %s" (format-time "%02H:%02M") alert-msg))
and call it good? I don't know that the extra buffer is what I want, and the name of the variable (to me) implies the messages buffer?log4e
, I think it'd be nice to either (both?) document the way to use it (change the variable's docstring, etc.) and also maybe wrap alert--log-open-log
(and friends) in something that seems less "internal" (the --
) or is more clearly named for manipulation. I certainly had to poke around a lot to find this.log4e:deflogger
macro potentially for every message. This is probably fine and works as intended, but I think left to my own devices I'd have a variable or struct in the package that would store the log4e logger and functions? I mean, reasonably speaking I think storing a function pointer/message function for this logging (which could be log4e
or just message
seems reasonable to me? I'm not suggesting you leave me to my devices though.Thoughts? I'm willing to do a little work to sand off this rough corner, but wouldn't want to begin making changes without some kind of initial agreement. π
This sends a message to the minibuffer:
(progn
(setq alert-hide-all-notifications t)
(run-with-timer 0.5 nil
(lambda ()
(alert "Hidden message!" :severity 'normal :title "Alert from erc" :category 'erc))))
Shouldn't alert-hide-all-notifications mean that the alerts are not shown at all?
Hello!
I've just started using this with Mu4e and mu4e-alert. Thanks for going to the effort to build such a handy library.
I know this may sound somewhat strange, but I'd really appreciate the ability to have the app name be another tweakable parameter. While strictly speaking the "app name" is of course emacs, in my DE: solus, (and I imagine I wouldn't be alone) this parameter seems to be used to sort notifications into per-app blocks.
In this respect, I would quite like to be able to use this to sort alerts from different parts of emacs, i.e. have mu4e in its own section in this example.
Line 728 in 7046393
Thanks for your work!
tecosaur.
Otherwise they clutter up the screen (although they do minimize)
Easiest way to reproduce this is as follows
(setq alert-default-style 'libnotify)
(alert "test" :category "test")
Evaluating the above fails with the following
(wrong-type-argument stringp t)
call-process("/usr/bin/notify-send" nil (#<buffer libnotify output> t) nil "--icon" "..." "--app-name" "Emacs" "--hint" "int:transient:1" "--urgency" "normal" "--category" t "scratch" "test")
I would like to package this and use it as part of other applications. Explicitly providing a license to allow for such use would be beneficial.
Thanks.
Arch linux here, with dunst
as a notification manager. My notifications problems are emacs-related only because notify-send "wow"
works from a terminal. Still, I get desktop notifications in emacs with (notifications-notify :title "You've got mail!").
But not with (alert "This is an alert")
, neither with mu4e
nor circe
.
(alert--log-open-log)
sends no particular errors.
I think I have tweaked something bad somewhere because at least, mu4e used to notify my new mail. Alas, I've totally lost my memory about that. Any idea ?
alert.el in the v1.2 release still says
;; Version: 1.1
An issue I've come across in a few different packages now is that they use the builtin notifications
library. But as far as I know, this doesn't work on macOS. As suggested here, this can be solved with define-advice
:
(define-advice notifications-notify
(:override (&rest params) using-alert)
(alert (plist-get params :body)
:title (plist-get params :title)))
In that same comment, the author suggested a minor-mode that would enable this configuration for you. What do you think about this? While I could just copy this snippet into my config, I feel like this affects a wide variety of packages and users, so a minor mode might make sense.
The terminal-notifier command accepts an argument, "execute", that is an arbitrary command to execute when the user clicks on the notification popup it generates. This argument could be leveraged to activate the buffer that issued the alert command (or execute arbitrary emacs code) using the emacsclient -e command. The following has allowed me to pull up the alerting buffer by clicking a notification in my preliminary testing:
(defun alert-notifier-notify (info)
(message "%s" info)
(if alert-notifier-command
(let ((args
(list "-title" (alert-encode-string (plist-get info :title))
;;"-sender" "org.gnu.Emacs"
"-message" (alert-encode-string (plist-get info :message))
"-execute" (switch-to-buffer-command (plist-get info :buffer)))))
(apply #'call-process alert-notifier-command nil nil nil args))
(alert-message-notify info)))
(defun switch-to-buffer-command (buffer-name)
(emacsclient-command (format "(switch-to-buffer \\\"%s\\\")" buffer-name)))
(defun emacsclient-command (command)
(format "\"emacsclient --server-file='%s' -e '%s'\"" server-name command))
The main problems with this approach are the brittleness of relying on server-name, and the fact that sender has to be removed for some odd reason.
Would it be worth it to include something like this in the main repository? Perhaps it could be an optional piece of functionality that would have to be explicitly enabled?
(setq alert-default-style 'osx-notifier)
(alert "haha")
(alert "ζ£")
(alert "π")
The second expression works as expected, however, the third and fourth will fail.
It seems that we do not need encoding here: https://github.com/jwiegley/alert/blob/master/alert.el#L862
FYI, The following warnings are displayed for the *.el file
*** Lint Emacs 24.3.1 2013-06-25 13:50:53 file: alert.el
** Lint M-x lm-verify (list-mnt.el)
Missing: ;; Maintainer:
Missing: ;; URL:
Missing: ;;; History:
Missing: ;;; Code:
** Lint M-x checkdoc-current-buffer (checkdoc.el)
alert.el:232: All variables and subroutines might as well have a documentation string
alert.el:253: All variables and subroutines might as well have a documentation string
alert.el:359: Argument `name' should appear (as NAME) in the doc string
alert.el:488: All variables and subroutines might as well have a documentation string
alert.el:495: All variables and subroutines might as well have a documentation string
alert.el:504: All variables and subroutines might as well have a documentation string
alert.el:517: All variables and subroutines might as well have a documentation string
alert.el:524: All variables and subroutines might as well have a documentation string
alert.el:533: All variables and subroutines might as well have a documentation string
alert.el:537: All variables and subroutines might as well have a documentation string
alert.el:561: All variables and subroutines might as well have a documentation string
alert.el:564: All variables and subroutines might as well have a documentation string
alert.el:589: All variables and subroutines might as well have a documentation string
alert.el:600: All variables and subroutines might as well have a documentation string
alert.el:622: All variables and subroutines might as well have a documentation string
alert.el:631: All variables and subroutines might as well have a documentation string
alert.el:646: All variables and subroutines might as well have a documentation string
alert.el:657: All variables and subroutines might as well have a documentation string
I'm able to generate native OSX alerts without a problem by setting alert-default-style
to osx-notifier
. However, the generated alerts always remain in place for the same fixed length of time, regardless of the value of alert-fade-time
. Is this user option not supposed to work for OSX notifications?
Say a package shows an alert on unread mail, showing the unread mail count every time the count increases. If I use :style 'notifications
and I idle a bit, it might "queue" up a bunch of these and on unidling, I end up with a bunch of "2 unread", "3 unread", "β΅0 unread" etc.
It'd be nice if we could use the :replaces-id
from notifications-notify
to replace old ones.
I think a nice API would be simply (alert "2 unread" :id 'my-special-id)
and then alert internally does
(puthash 'my-special-id
(notifications-notify :body "2 unread"
:replaces-id (gethash 'my-special-id alert-ids))
alert-ids)
or something like that.
Since emacs 24.1 (at least?), emacs supports alerting via dbus directly, rather than using notify-send
. It would, I believe, be easy to replace or enhance the libnotify
alerts to use notifications.el
directly, rather than using notify-send
.
I am happy to implement this. Is there a reason to retain the old use of notify-send
, though? For instance to support emacs older than 24.1?
The parameter :style
isn't handled correctly, so the behavior of #'alert
is overwritten by the default style for some users. That maybe why some users don't receive system notifications as pointed out in
See the following test.
alert-default-style ;; => message
(alert "Hi") ;; => It uses message style.
(alert "Hi" :style 'libnotify) ;; => It uses message style.
(alert "Hi" :style 'message) ;; => It uses message style.
(setq alert-default-style 'libnotify)
(alert "Hi") ;; => It uses libnotify style.
(alert "Hi" :style 'libnotify) ;; => It uses libnotify style.
(alert "Hi" :style 'message) ;; => It uses libnotify style.
(setq alert-default-style 'libnotify) ;; Or replace "libnotify" by your favorite style.
Thanks for this library, it's really useful. I was wondering if it's possible to publish a new version of the library.
I'm using org-alert and termux, but I couldn't get it to work because a new version hasn't been published for a while now, which includes termux integration. I found a hacky workaround by just copying the latest code from this repo into my termux emacs, and maybe a cleaner way would be to set up straight.el. I know that the termux integration is still rough around the edges given existing tickets.
Edit:
The core of the problem seems to be that this code:
(eq (plist-get '(:message "test" :title "test" :severity (quote urgent)) :severity) (quote urgent))
returns nil when I'd expect it (and apparently others) to return t
.
(apply #'call-process "c:/Program Files (x86)/Growl for Windows/growlnotify.exe" nil nil nil (list "test"))
0
executable-find
still works (apply #'call-process (executable-find "growlnotify") nil nil nil (list "test"))
0
(require 'alert)
(alert-growl-notify '(:message "test message" :title "test title" :severity 'urgent))
just returns message text and no growl notification pops up
Result: "c:/Program Files (x86)/Growl for Windows/growlnotify.exe"
[5 times]
Result: (:message "test message" :title "test title" :severity 'urgent)
Result: "test title"
Result: "test title"
[3 times]
Result: (:message "test message" :title "test title" :severity 'urgent)
Result: "test message"
Result: "test message"
[5 times]
Result: (:message "test message" :title "test title" :severity 'urgent)
Result: 'urgent
Result: ((urgent . 2) (high . 2) (moderate . 1) (normal . 0) (low . -1) (trivial . -2))
Result: nil
Result: nil
Wrong type argument: numberp, nil
alert-growl-priorities
(assq 'urgent alert-growl-priorities)
(urgent . 2)
(cdr '(urgent . 2))
2
assq
fails (apply #'call-process (executable-find "growlnotify") nil nil nil (list "test"))
0
The code comments list the following types of notification
;; message - Uses the Emacs `message' facility
;; log - Logs the alert text to *Alerts*, with a timestamp
;; ignore - Ignores the alert entirely
;; fringe - Changes the current frame's fringe background color
;; growl - Uses Growl on OS X, if growlnotify is on the PATH
;; libnotify - Uses libnotify if notify-send is on the PATH
;; notifier - Uses terminal-notifier on OS X, if it is on the PATH
While README.md lists these types:
| message | Uses the Emacs `message` facility |
| log | Logs the alert text to *Alerts*, with a timestamp |
| ignore | Ignores the alert entirely |
| fringe | Changes the current frame's fringe background color |
| growl | Uses Growl on OS X, if growlnotify is on the PATH |
| gntp | Uses gntp, it requires [gntp.el](https://github.com/tekai/gntp.el)|
| notifications | Uses notifications library via D-Bus |
while (mapcar 'car alert-styles)
yields:
(fringe gntp growl ignore ignore libnotify log message notifications notifier toaster)
While tinkering with #101, I wanted to prepend a custom emoji-based icon to messages with certain severities. As handy as alert-severity-faces
and alert-severity-colors
are, there is no [customizable] alert-severity-{string|icon|symbol}
or similar to use in situations where not all the fancy graphical features are available.
Something along to π₯ for urgent
and high
would do.
I guess I might end up implementing it anyway. But, instead of making it a feature only for tmux
alert styles, I thought it could be potentially useful in other alert styles.
So far, just dropping the idea. Comments and feedback welcome.
On Xubuntu 15.10, emacs 24.5.1, alert 20151123.759 from melpa, an alert that goes through 'notifications gives an empty (textless) alert if it contains "<", but if I change that to "<" it shows fine. The "<" of course shows fine when using 'message style, and indeed (notifications-notify :body "<")
gives an empty alert, while (notifications-notify :body "<")
shows the "<".
Hi,
I have a question - is there an easy way to have combine few styles together? What I mean is that, I would like for some messages to be logged via log4e and also via growl.
Messaging styles like notifier support sounds please pass them when set.
For reference what I mean see here:
https://github.com/emacs-mirror/emacs/blob/master/lisp/notifications.el#L169
In gonewest818/dimmer.el#6 (comment) a bug was reported that my package dimmer
gives errors when alert
is also used.
In debugging that, I noticed the underlying issue was this one particular face. The error is that my code computes an adjusted rgb value for each foreground color, but when it calls (color-name-to-rgb "Dark Purple")
I get a nil. Which can also be confirmed in that there is no dark purple in list-colors-display
.
I will obviously need to be more careful in my code, but I thought you might like to know.
With no extra configuration nothing seem to work as expected. Logging is not happening. Here is what I do:
(require 'package)
(add-to-list 'package-archives
'("melpa" . "http://melpa.org/packages/") t)
(setq package-user-dir "~/Dropbox/ELPA")
(package-initialize)
(require 'alert)
(alert "blabla" :style 'fringe) ;; nothing
(alert "blabla" :style 'message) ;; nothing
M-x alert--log-open-log
says [Log4E] Not exist log buffer.
.
Is this project abandoned? Issue tracker seem to suggest so.
GNU Emacs 25.0.93.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.7) of 2016-04-24
Hello!
Trying to run alert:
(alert "TST")
Context:
(executable-find "growlnotify")
finds correct pathNothing happens.
Message log:
TST
[nil 22729 14218 34573 nil alert-remove-when-active (alert-message-remove (:message "TST" :title ".spacemacs" :icon nil :severity normal :category nil :buffer #<buffer .spacemacs> :mode emacs-lisp-mode :data nil)) nil 300000]
Probably incorrext system parameters.
Is there instruction how to run alert under windows?
Per #21 and #22, libnotify notifications are always labeled as transient. In the new release of dunst,transient
notifications are no longer added to history, so there should be an option to turn transient notifications on or off.
https://dunst-project.org/changelog/
Is a variable a good enough way to configure this, or is there a better way to add this? I'm willing to implement this myself, if I know what the best way to add the setting to alert. I don't like adding a new key argument to the alert
function myself.
Good evening,
Tonight I am writing to humbly put in a request for you to tag this project.
The reason is that a lot of users want to rely on the most "stable" release, by
the most broad definition of the term. For me, it is really simple, I am setting
up a "stable" Emacs configuration of my system here https://github.com/grettke/home/blob/master/.emacs.el
and I would like to rely 100% upon MELPA Stable http://stable.melpa.org/#/ .
I've used your package for a long time, love it, and so do many, many others.
This is a way to get that project out to the other thousands and thousands of
users who also rely upon MELPA stable.
All it takes is for you to create a tag, and within hours, it will show up on
MELPA stable.
Can't wait to hear about what you think and whether or not a tag is in this
project's future!
Kind regards,
Grant Rettke
P.S.
This most has been critical to thousands of us for years.
I can't speak for everyone, but I do feel quite strongly that this is
ready for a "release" at whatever number you version it at.
Notification center is great, but I still like growl.
When I start emacs in terminal, the notifier style works well. If I start emacs in gui mode, it fails.
Describe Variable output:
alert-notifier-command is a variable defined in βalert.elβ.
Its value is nil
Original value was
"/usr/local/bin/terminal-notifier"This variable may be risky if used as a file-local variable.
Documentation:
Path to the terminal-notifier command.
From https://github.com/julienXX/terminal-notifier.You can customize this variable.
Additional info:
(executable-find "terminal-notifier")
;; output is /usr/local/bin/terminal-notifier
I'm pretty sure that I have not set alert-notifier-command
variable manually, and no package set it
~/.emacs.d/elpa > ag 'alert-notifier-command'
alert-20180827.422/alert.el
837:(defcustom alert-notifier-command (executable-find "terminal-notifier")
851: (if alert-notifier-command
856: (apply #'call-process alert-notifier-command nil nil nil args))
~/.emacs.d/elpa > cat ~/.emacs | grep "alert-notifier-command"
Version:
I've tried to show alert using sox-notifier
and got this error:
Debugger entered--Lisp error: (file-error "Searching for program" "no such file or directory" "osascript -e 'display notification \"test\" with title \".emacs\"'") call-process("osascript -e 'display notification \"test\" with title \".emacs\"'") apply(call-process "osascript -e 'display notification \"test\" with title \".emacs\"'") alert-osx-notifier-notify((:message "test" :title ".emacs" :icon nil :severity normal :category nil :buffer #<buffer .emacs> :mode emacs-lisp-mode :data nil)) alert-send-notification(#<buffer .emacs> (:message "test" :title ".emacs" :icon nil :severity normal :category nil :buffer #<buffer .emacs> :mode emacs-lisp-mode :data nil) (:title "Notify using native OSX notification" :notifier alert-osx-notifier-notify)) alert("test") eval((alert "test") nil) eval-last-sexp-1(nil) eval-last-sexp(nil) call-interactively(eval-last-sexp nil nil) command-execute(eval-last-seep)
I've fixed it with
defun alert-osx-notifier-notify (info)
(apply #'call-process "osascript" nil nil nil "-e" (list (format "display notification %S with title %S"
(alert-encode-string (plist-get info :message))
(alert-encode-string (plist-get info :title)))))
(alert-message-notify info))
but I'm new to emacs and ELisp and I'm not sure that it's a right way to go.
Would you like to get a PR?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.