Function: ghostel-default-notify
ghostel-default-notify is a natively compiled function defined in
ghostel.el.
Signature
(ghostel-default-notify TITLE BODY)
Documentation
Default handler for OSC 9 / OSC 777 notifications.
Uses the alert package (https://github.com/jwiegley/alert) when
available - it picks a sensible backend per platform (osascript on
macOS, libnotify on Linux, Growl, terminal-notifier, etc.). Falls
back to message when alert isn't installed. TITLE is the
notification summary; when empty (iTerm2-style OSC 9) the buffer
name is used. BODY is the notification text.
Runs with the originating ghostel buffer current, so an empty TITLE falls back to that buffer's name.
Source Code
;; Defined in /nix/store/1252krff0gb2kisjcpp45m50cpdskfrl-emacs-packages-deps/share/emacs/site-lisp/ghostel.el
(defun ghostel-default-notify (title body)
"Default handler for OSC 9 / OSC 777 notifications.
Uses the `alert' package (https://github.com/jwiegley/alert) when
available - it picks a sensible backend per platform (osascript on
macOS, libnotify on Linux, Growl, terminal-notifier, etc.). Falls
back to `message' when alert isn't installed. TITLE is the
notification summary; when empty (iTerm2-style OSC 9) the buffer
name is used. BODY is the notification text.
Runs with the originating ghostel buffer current, so an empty
TITLE falls back to that buffer's name."
(let ((summary (if (or (null title) (string-empty-p title))
(buffer-name)
title)))
(if (and (require 'alert nil t) (fboundp 'alert))
(alert body :title summary)
(message "%s: %s" summary body))))