help-gnu-emacs
[Top][All Lists]
Advanced

[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: Fri, 23 Sep 2016 18:13:38 -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))))
  Thank you Drew. 

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

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]