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: Sat, 24 Sep 2016 10:17:58 -0800 Organization: AkWebsoft Message-ID: <20160924181758.GC3442@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 1474741125 9615 195.159.176.226 (24 Sep 2016 18:18:45 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 24 Sep 2016 18:18:45 +0000 (UTC) User-Agent: Mutt/1.7.0 (2016-08-17) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Sep 24 20:18:40 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 1bnrX1-0001fp-CK for geh-help-gnu-emacs@m.gmane.org; Sat, 24 Sep 2016 20:18:35 +0200 Original-Received: from localhost ([::1]:35055 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnrWz-0002aG-My for geh-help-gnu-emacs@m.gmane.org; Sat, 24 Sep 2016 14:18:33 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43460) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnrWW-0002YT-OG for help-gnu-emacs@gnu.org; Sat, 24 Sep 2016 14:18:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bnrWR-0006DE-JL for help-gnu-emacs@gnu.org; Sat, 24 Sep 2016 14:18:03 -0400 Original-Received: from tjohnson.mtaonline.net ([64.4.232.191]:50418) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnrWR-0006Co-Ag for help-gnu-emacs@gnu.org; Sat, 24 Sep 2016 14:17:59 -0400 Original-Received: by linus.johnson.com (Postfix, from userid 1000) id 1D1DB2005C4; Sat, 24 Sep 2016 10:17:58 -0800 (AKDT) Mail-Followup-To: help-gnu-emacs@gnu.org 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:111380 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)))) Seems to work as I want - right out of the box! Thanks to Drew ... :) -- Tim http://www.akwebsoft.com, http://www.tj49.com