Skip to content

Instantly share code, notes, and snippets.

@camdez
Created May 6, 2015 16:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save camdez/8988ff7c5a8a52750e77 to your computer and use it in GitHub Desktop.
Save camdez/8988ff7c5a8a52750e77 to your computer and use it in GitHub Desktop.
Play sound in Emacs when mark is pushed. Interesting for discovering which commands push mark. (If not using OS X, insert appropriate sound file path.)
;; $ ls /System/Library/Sounds/
;; Basso.aiff Bottle.aiff Funk.aiff Hero.aiff Ping.aiff Purr.aiff Submarine.aiff
;; Blow.aiff Frog.aiff Glass.aiff Morse.aiff Pop.aiff Sosumi.aiff Tink.aiff
(defun camdez/push-mark--play-sound (&optional location nomsg activate)
(play-sound-file "/System/Library/Sounds/Pop.aiff" 20))
(advice-add 'push-mark :after #'camdez/push-mark--play-sound)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment