Created
January 12, 2024 09:39
-
-
Save xenodium/848713ee8d9321ea4cdf4ebddb8e211d to your computer and use it in GitHub Desktop.
Add own elisp-demos snippets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun advised:elisp-demos--search (orig-fun symbol) | |
(cl-letf* ((orig-insert-file-contents (symbol-function 'insert-file-contents)) | |
((symbol-function 'insert-file-contents) | |
(lambda (filename &optional visit beg end replace) | |
(apply orig-insert-file-contents filename visit beg end replace nil) | |
(apply orig-insert-file-contents "/private/tmp/mine.org" visit beg end replace nil)))) | |
(funcall orig-fun symbol))) | |
(advice-add 'elisp-demos--search :around #'advised:elisp-demos--search) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment