From: plugd Date: Mon, 17 Jan 2022 14:45:46 +0000 (+0100) Subject: Fix bookmark jumping when buffer doesn't exist. (Daniel Semyonov) X-Git-Tag: v3.3.0~2 X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?a=commitdiff_plain;h=a9137269875a8e79ce238280227297061d6e246f;p=elpher.git Fix bookmark jumping when buffer doesn't exist. (Daniel Semyonov) --- diff --git a/elpher.el b/elpher.el index f2397e9..d6d2458 100644 --- a/elpher.el +++ b/elpher.el @@ -6,7 +6,7 @@ ;; Copyright (C) 2021 Omar Polo ;; Copyright (C) 2021 Noodles! ;; Copyright (C) 2021 Abhiseck Paira -;; Copyright (C) 2021 Daniel Semyonov +;; Copyright (C) 2021-2022 Daniel Semyonov ;; Copyright (C) 2020-2021 Alex Schroeder ;; Copyright (C) 2020 Zhiwei Chen ;; Copyright (C) 2020 condy0919 @@ -1920,10 +1920,11 @@ then making that buffer the current buffer. It should not switch to the buffer." (let* ((url (cdr (assq 'location bookmark))) (cleaned-url (string-trim url)) - (page (elpher-page-from-url cleaned-url))) + (page (elpher-page-from-url cleaned-url)) + (buffer (get-buffer-create elpher-buffer-name))) (elpher-with-clean-buffer (elpher-visit-page page)) - (set-buffer (get-buffer elpher-buffer-name)) + (set-buffer buffer) nil)) (defun elpher-bookmark-link ()