From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tim Johnson Newsgroups: gmane.emacs.help Subject: Re: Read file into *Help* buffer Date: Fri, 23 Sep 2016 18:13:38 -0800 Organization: AkWebsoft Message-ID: <20160924021338.GB3442@mail.akwebsoft.com> References: <20160924002918.GA3442@mail.akwebsoft.com> <068a523a-bb08-440d-9b2f-38beb3f7cb92@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1474683277 32371 195.159.176.226 (24 Sep 2016 02:14:37 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 24 Sep 2016 02:14:37 +0000 (UTC) User-Agent: Mutt/1.7.0 (2016-08-17) To: Emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Sep 24 04:14:32 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bncTy-00071l-3E for geh-help-gnu-emacs@m.gmane.org; Sat, 24 Sep 2016 04:14:26 +0200 Original-Received: from localhost ([::1]:54627 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bncTw-0002Wd-3t for geh-help-gnu-emacs@m.gmane.org; Fri, 23 Sep 2016 22:14:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35724) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bncTJ-0002Ul-8l for Help-gnu-emacs@gnu.org; Fri, 23 Sep 2016 22:13:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bncTE-0001mf-3J for Help-gnu-emacs@gnu.org; Fri, 23 Sep 2016 22:13:44 -0400 Original-Received: from tjohnson.mtaonline.net ([64.4.232.191]:46951) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bncTD-0001mA-Qk for Help-gnu-emacs@gnu.org; Fri, 23 Sep 2016 22:13:40 -0400 Original-Received: by linus.johnson.com (Postfix, from userid 1000) id 3BCD020054E; Fri, 23 Sep 2016 18:13:38 -0800 (AKDT) Mail-Followup-To: Emacs Content-Disposition: inline In-Reply-To: <068a523a-bb08-440d-9b2f-38beb3f7cb92@default> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 64.4.232.191 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:111379 Archived-At: * Drew Adams [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