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: Drew Adams
Subject: RE: Read file into *Help* buffer
Date: Fri, 23 Sep 2016 19:03:58 -0700 (PDT)

> 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))))



reply via email to

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