From: Tim Johnson <tim@akwebsoft.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Read file into *Help* buffer
Date: Sat, 24 Sep 2016 10:17:58 -0800 [thread overview]
Message-ID: <20160924181758.GC3442@mail.akwebsoft.com> (raw)
In-Reply-To: <068a523a-bb08-440d-9b2f-38beb3f7cb92@default>
* Drew Adams <drew.adams@oracle.com> [160923 18:07]:
> > Is there a way to read a specific text file into a buffer
> > (defaulting as *Help*) with help-mode activated?
> >
> > I.E. I'd like to use some text files to be loaded in the same manner
> > that would take effect if I invoked help-command or any other
> > "help-oriented" command.
>
> Functions `help-buffer' and `with-help-window' can help.
>
> Something like this:
>
> (defun file-to-help (file)
> "..."
> (with-current-buffer (help-buffer)
> (with-help-window (help-buffer)
> (insert-file-contents (expand-file-name file)
> nil nil nil :REPLACE))))
Seems to work as I want - right out of the box!
Thanks to Drew ...
:)
--
Tim
http://www.akwebsoft.com, http://www.tj49.com
prev parent reply other threads:[~2016-09-24 18:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-24 0:29 Read file into *Help* buffer Tim Johnson
2016-09-24 2:03 ` Drew Adams
2016-09-24 2:13 ` Tim Johnson
2016-09-24 18:17 ` Tim Johnson [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160924181758.GC3442@mail.akwebsoft.com \
--to=tim@akwebsoft.com \
--cc=help-gnu-emacs@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.