bug#81467: [PATCH] Make bookmark-jump work with other-window/frame/tab-prefix

Juri Linkov <[email protected]>
Newsgroups gmane.emacs.bugs
Organization LINKOV.NET
Message-ID <[email protected]>
> For example, in bufferlo, I'd pass a nil display-function, if I could, to
> indicate its handlers are doing their own display business (right now we
> pass in #'ignore).

Ideally, we need `advice-let` to detect whether the `display-buffer`
function was called from `bookmark-handle-bookmark`.
And then don't funcall `display-function` to display the same buffer
again.  Unlike `cl-letf`, only `advice-let` would be able to call the
original function.  Here is how its use could look:

(defun bookmark--jump-via (bookmark-name-or-record display-function)
  (let ((was-called nil))
    (advice-let ((display-buffer (:around (ofun &rest args) detect-call)
                  (apply ofun args)
                  (setq was-called t)))
      ;; Some handlers call 'display-buffer'.
      (bookmark-handle-bookmark bookmark-name-or-record))
    (unless was-called
      (funcall display-function buf))))
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.