unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Tim Johnson <tim@akwebsoft.com>
To: Emacs <Help-gnu-emacs@gnu.org>
Subject: Re: Read file into *Help* buffer
Date: Fri, 23 Sep 2016 18:13:38 -0800	[thread overview]
Message-ID: <20160924021338.GB3442@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))))
  Thank you Drew. 

  I'll try this approach tomorrow and report back.
  Cheers

-- 
Tim 
http://www.akwebsoft.com, http://www.tj49.com



  reply	other threads:[~2016-09-24  2:13 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 [this message]
2016-09-24 18:17   ` Tim Johnson

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=20160924021338.GB3442@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.
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).