unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Tak Kunihiro <tkk@misasa.okayama-u.ac.jp>
Cc: 35487@debbugs.gnu.org
Subject: bug#35487: Make visiting function from help-mode more customizable
Date: Mon, 29 Apr 2019 22:54:34 +0300	[thread overview]
Message-ID: <87sgu0wps5.fsf@mail.linkov.net> (raw)
In-Reply-To: <20190429.213014.526232842075202623.tkk@misasa.okayama-u.ac.jp> (Tak Kunihiro's message of "Mon, 29 Apr 2019 21:30:14 +0900 (JST)")

> 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





  reply	other threads:[~2019-04-29 19:54 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 [this message]
2019-05-09 23:10   ` Tak Kunihiro
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=87sgu0wps5.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=35487@debbugs.gnu.org \
    --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).