bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#9054: 24.0.50; show source in other window


From: Lars Ingebrigtsen
Subject: bug#9054: 24.0.50; show source in other window
Date: Fri, 10 Sep 2021 12:21:27 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Juri Linkov <juri@linkov.net> writes:

> I use such customization:
>
> * Clicking a link from the =*Help*= buffer opens source code in the same 
> window:
>
> #+begin_src emacs-lisp
> (defun display-buffer-from-help-p (_buffer-name _action)
>   (unless current-prefix-arg
>     (with-current-buffer (window-buffer)
>       (derived-mode-p 'help-mode))))
>
> (push '(display-buffer-from-help-p
>         display-buffer-same-window
>         (inhibit-same-window . nil))
>       display-buffer-alist)
> #+end_src
>

Nice.  It's a bit of a mouthful for users, though.

martin rudalics <rudalics@gmx.at> writes:

>>> The question here is whether you want to follow that "chain of calls" in
>>> the same window where *Help* appeared or in another one - by default the
>>> one selected when you did C-h f.
>>
>> Yes, that would be my preference.
>
> Did you try Juri's proposal?

I don't think we can expect users to do all that just to change the
behaviour of these *Help* commands.  Perhaps if we put the
`display-buffer-from-help-p' function into Emacs.

`help-window-select' is (if you squint at it) the kinda-sorta user
option in the opposite direction, so perhaps the way forward here is to
just define a new user option, or all a new value (`both'?) that affects
how windows are selected from the *Help* window.  I guess a new user
option would be the simplest.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]