From: Tak Kunihiro <homeros.misasa@gmail.com>
To: Juri Linkov <juri@linkov.net>
Cc: 35487@debbugs.gnu.org, tkk@misasa.okayama-u.ac.jp
Subject: bug#35487: Make visiting function from help-mode more customizable
Date: Fri, 10 May 2019 08:10:13 +0900 [thread overview]
Message-ID: <8636lnp6lm.fsf@misasa.okayama-u.ac.jp> (raw)
In-Reply-To: <87sgu0wps5.fsf@mail.linkov.net> (Juri Linkov's message of "Mon, 29 Apr 2019 22:54:34 +0300")
Juri Linkov <juri@linkov.net> writes:
>> I often want to visit function from help-mode in `this window' in
>> stead of `other window'. To do so, I found that to revise
>> help-function in help-function-def works.
>>
>> I propose to (1) move help-function described as lambda function out
>> of button definition and (2) make function to visit function from
>> help-mode customizable.
>>
>> After the revision, I can visit function from help-mode in `this
>> windows' as shown below.
>
> I have exactly the same problem. Fortunately, we have a powerful
> customization mechanism of display-buffer-alist to allow clicking
> a link from the *Help* buffer to open source code in the same window:
>
> #+begin_src emacs-lisp
> (custom-set-variables
> '(display-buffer-alist
> '((display-buffer-condition-from-help display-buffer-same-window))))
>
> (defun display-buffer-condition-from-help (_buffer-name _action)
> (string-match-p "\\`\\*\\(Help\\)\\*\\(\\|<[0-9]+>\\)\\'" (buffer-name (current-buffer))))
> #+end_src
Thank you for the solution! Now from *Help* buffer I can open source
code in the same window by mouse click.
As a side effect, `C-h f' opens *Help* buffer in the same window. I
still want to open *Help* in other window (original behavior). Do you
have idea to do so?
next prev parent reply other threads:[~2019-05-09 23:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-29 12:30 bug#35487: Make visiting function from help-mode more customizable Tak Kunihiro
2019-04-29 19:54 ` Juri Linkov
2019-05-09 23:10 ` Tak Kunihiro [this message]
2019-05-10 8:00 ` martin rudalics
2019-05-11 20:42 ` Juri Linkov
2019-05-16 8:52 ` Tak Kunihiro
2019-05-16 20:25 ` Stefan Monnier
2019-05-17 10:03 ` Tak Kunihiro
2019-05-28 21:09 ` Juri Linkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8636lnp6lm.fsf@misasa.okayama-u.ac.jp \
--to=homeros.misasa@gmail.com \
--cc=35487@debbugs.gnu.org \
--cc=juri@linkov.net \
--cc=tkk@misasa.okayama-u.ac.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).