From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christopher Dimech Newsgroups: gmane.emacs.help Subject: Printing as documentation Date: Sun, 20 Jun 2021 09:33:42 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="993"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: philip-agee@africamel.net Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jun 20 09:34:20 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1luryG-000AcF-M2 for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 20 Jun 2021 09:34:20 +0200 Original-Received: from localhost ([::1]:34726 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1luryF-0004hz-0I for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 20 Jun 2021 03:34:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57970) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lurxj-0004hj-Oh for help-gnu-emacs@gnu.org; Sun, 20 Jun 2021 03:33:47 -0400 Original-Received: from mout.gmx.net ([212.227.17.21]:56271) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lurxh-0003GA-Dp for help-gnu-emacs@gnu.org; Sun, 20 Jun 2021 03:33:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1624174422; bh=R7opKM11TIl90IKRI2/srGxMMUAzTwCFlQsjKtxSEXI=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=HM4YA+FeRrhvCinu6sHHf8s5EekUIJMXXQz4uVQtq53r5YDSVCbwsPnWmsrLn2kaX k6O8MJMaPypPYDaQm61xy1nNDDeboSjC7mVOIatREw5wXDhy0DD9AX7MGSAPc5K1lB MJFEJqp8cKPwzRM7xuiPQgQfiZzJzQ4UExOlLzfE= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [92.251.44.132] ([92.251.44.132]) by web-mail.gmx.net (3c-app-mailcom-bs16.server.lan [172.19.170.184]) (via HTTP); Sun, 20 Jun 2021 09:33:42 +0200 Importance: normal Sensitivity: Normal In-Reply-To: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:L5FibMn3u+o5oM1We9rd8DskrZoWZj6ipxMIaLkDZG35PED0YkMHUx1WLUSr63TLYuunm rxjFz66LWkjhlAcONWm44kzIIopg74SUgV+3UNi5W/gA8MTiZDaDPQ7KqumNq4aj3fGjYX/NEN6i VKzMayx6MEw7X8fc9uS4/kwaTgJ286IyL3rhR8FnQU46MmSadgXKgnm1EVLraouvcJ5/tSFTIbdJ DTg6BohcQfRgUPNYSPDUOqU3fDqWVPnI6LsM7s9Rd0BWhN1BvDkeuwPYaQ2oTPjpkpewaM8hZ6sW dw= X-UI-Out-Filterresults: notjunk:1;V03:K0:VQQBuEA0maA=:9R8B97Pevs65bSk7ZGFipJ fwCt0Bf60KtZfodsUWxWPoZ1S7RB/kFkaRfnZq9/OdJeB6ZCcvAnZ0HsuVSUkhPFPJ/osbttT p8PZc+rQhJKMkJ1MNHcijh/mm9SxZz5mE+msUoS4toSTSLWCDYJ5X2gwRpQRyjy+UkXSov/D3 Y3Sn5JRrUsfo8M35IPfXITrEDSUdPdP41mZwbKskkA12wRU5xgAGq2cBZOiKzn6KDdUzhTvyc 3Cudbm2sgpA+j/X8MmP5LAFzaBiOfYxjv7vcJMg62C05DvQ4hNrT5kseZsEmJOVt4XAvrIWFM k95WBK0weQ7sVATxLGHxWoJA7V0UaIj0HaB6IUspv4vYjPWNpxwJ/QpyD6JbmJPvA2Z2NxZPT sM9F8ZoXBaonzBp9k6u7XbjoRuA/KYd3FEysT5y2z5zTSBA2AlbQXRqOeWbE+Qidxpt17qJ+m cOyh3QyPaJkXniA8aSSe9mrY/R2qUIrl0T7FCtvnQPpPq04a0yWBz4ngYYSbIRBRTO+GAa1ME 1nPaP+SrA5ICi9tXdWZi9OBqrcPi/M05r+rDrX05LEJ0o1kHhuTGWBmyFvf3TWHx3KpXDO3hR tZpen+sErSgpiQAAG+UOUfh1gUMzIWiQg64TilkeBUVnmK2nhufEhCt5ksYv8jIITLp1e1JZp i63Oqa0GNz0Ybzt/WigKD5xUqahkbeVtcSRPrzR4q+7/OaBgeznCt2v0OrSMv5zHyLqv/VmWl x+TKrwzhl/JNeP22QXI6NFSlH3E2UElQ5CtbXpf1FgWq7B0tBGPCyiyRYEPQR5v4RuJBj6i8 Received-SPF: pass client-ip=212.227.17.21; envelope-from=dimech@gmx.com; helo=mout.gmx.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:131082 Archived-At: Try using (defun typex () "todo docstring" (interactive) (with-help-window (help-buffer) (with-current-buffer (help-buffer) (print "test"))) ) > Sent: Sunday, June 20, 2021 at 5:54 PM > From: philip-agee@africamel=2Enet > To: help-gnu-emacs@gnu=2Eorg > Subject: Printing as documentation > > Have tried the following code, but is giving me > invalid function: "*he= lp*" >=20 >=20 >=20 > (defun myfunc () > =C2=A0 "todo docstring" > =C2=A0 (interactive) >=20 > =C2=A0 (setq bufr (help-buffer)) > =C2=A0 (print "test" bufr) ) >=20 >=20 >=20 >=20 >=20 >=20 > From: philip-agee@africamel=2Enet > To: help-gnu-emacs@gnu=2Eorg > Subject: Printing as documentation > Date: 20/06/2021 06:41:31 Europe/Paris >=20 >=20 > When I wish to see the self documentation I use >=20 > C-h f myfunc >=20 > I get a temporary help buffer displaying the docstring for myfunc=2E >=20 > Is it possible to to do the same kind of thing when calling a descriptio= n function "mydesc"=2E > so that the print function are show in a temporary=C2=A0 help buffer? >=20 > (defun mydesc () > "docstring for mydesc" >=20 > (print "The brown fox" help) > (print "jumps over the fence" help) ) >=20 > M-x mydesc >=20 > wiil then behave similar to doing >=20 > C-h f somefunc=20 >=20 >=20 >