[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Read file into *Help* buffer
From: |
Tim Johnson |
Subject: |
Re: Read file into *Help* buffer |
Date: |
Sat, 24 Sep 2016 10:17:58 -0800 |
User-agent: |
Mutt/1.7.0 (2016-08-17) |
* 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