set-buffer instead of switch-to-buffer

This commit is contained in:
Benson Chu 2021-04-25 07:33:47 -05:00
parent a8f024cc6c
commit 3798823ad4
2 changed files with 2 additions and 2 deletions

View file

@ -29,7 +29,7 @@
(let ((string "") (let ((string "")
match) match)
(save-window-excursion (save-window-excursion
(switch-to-buffer (find-file-noselect "~/MEGA/org/entries/journal.gpg")) (set-buffer (find-file-noselect (my/org-file "gpg/journal.gpg")))
(goto-char (point-min)) (goto-char (point-min))
(while (setq match (while (setq match
(re-search-forward (re-search-forward

View file

@ -32,7 +32,7 @@
(not org-notes-current-file)) (not org-notes-current-file))
(setq org-notes-current-file (setq org-notes-current-file
(read-file-name "Notes file? "))) (read-file-name "Notes file? ")))
(find-file org-notes-current-file) (set-buffer (find-file-noselect org-notes-current-file))
(end-of-buffer)) (end-of-buffer))
(provide 'org-capture-notes) (provide 'org-capture-notes)