bug#81467: [PATCH] Make bookmark-jump work with other-window/frame/tab-prefix
martin rudalics via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <[email protected]>
| Newsgroups | gmane.emacs.bugs |
|---|---|
| Message-ID | <[email protected]> |
>> I think Juri might be able to propose a condition beyond the simple (unless >> (eq buf (window-buffer)) that solves for that and still avoids issues with >> save-window-excursion limitations where the handler might create a new >> frame and/or tab. > > I think only Martin can help us to find a condition > that detects if display-buffer was already called. > > Maybe to detect when window-configuration was changed > by using a temporary window-configuration-change-hook? It's conceptually impossible to detect whether 'display-buffer' changed the state of any frame - think of the situation where a buffer is already displayed in several windows. 'pop-to-buffer' is slightly different because it should guarantee that the buffer in question is displayed in the selected window (unless exiting a window excursion changes that afterwards). But I have no idea why such a functionality would be needed in the first place. In general, 'get-buffer-window-list', with appropriate arguments, is the canonical function to find out whether a buffer is shown anywhere and which window would be the most suitable for further use. martin