From 623aa30bc165c4aed3cf734840bcc16b7429a8e5 Mon Sep 17 00:00:00 2001 From: Howard Abrams Date: Wed, 15 Mar 2023 09:21:03 -0700 Subject: [PATCH] When Emacs starts, my Mac now pronounces it correctly --- elisp/beep.el | 4 ++-- ha-programming.org | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/elisp/beep.el b/elisp/beep.el index 8999fc2..c5d06a9 100644 --- a/elisp/beep.el +++ b/elisp/beep.el @@ -35,7 +35,7 @@ Customize the variable, `beep-speech-executable'." (let ((command (format beep-speech-executable phrase))) (shell-command command))) -(defun beep--when-finished (phrase) +(defun beep--when-finished (phrase &optional to-speak) "Notify us with string, PHRASE, to grab our attention. Useful after a long process has completed, but use sparingly, as this can be pretty distracting." @@ -43,7 +43,7 @@ as this can be pretty distracting." (when (functionp 'alert) (alert phrase :title "Completed")) (beep--beep) - (beep--speak phrase)) + (beep--speak (or to-speak phrase))) (defun compile-and-notify () "Call `compile' and notify us when finished. diff --git a/ha-programming.org b/ha-programming.org index a07469b..8c6c84d 100644 --- a/ha-programming.org +++ b/ha-programming.org @@ -327,7 +327,7 @@ As I've mentioned [[http://www.howardism.org/Technical/Emacs/beep-for-emacs.html (use-package beep :straight nil ; Already in the load-path - :hook (after-init . (lambda () (beep--when-finished "Emacs has started"))) + :hook (after-init . (lambda () (beep--when-finished "Emacs has started." "Eemacs has started"))) :config (dolist (func '(org-publish org-publish-all