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: Juri Linkov
Subject: bug#9054: 24.0.50; show source in other window
Date: Thu, 09 Sep 2021 20:20:27 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

>> What I would like: Either a function that displays the source for the
>> function at point in the other window or for the *Help* buffer to open
>> the source file in the same window (i.e. the window which displays the
>> *Help* buffer).
>
> Yes, it would be nice to allow displaying the source in the same window
> as the *Help* buffer was displayed in.  Martin, can this somehow be done
> via `display-buffer-alist', or would we have to add a new user option
> for `help-mode' for this?

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





reply via email to

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