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))))