[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Printing as documentation
From: |
philip-agee |
Subject: |
Printing as documentation |
Date: |
Sun, 20 Jun 2021 09:43:32 +0200 (CEST) |
It does work. I have found
with-output-to-temp-buffer too.
In addition to print there is
insert
Any comments on how to choose between the different commands?
From: Christopher Dimech <dimech@gmx.com>
To: philip-agee@africamel.net
Subject: Printing as documentation
Date: 20/06/2021 09:33:42 Europe/Paris
Cc: help-gnu-emacs@gnu.org
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.net
> To: help-gnu-emacs@gnu.org
> Subject: Printing as documentation
>
> Have tried the following code, but is giving me > invalid function: "*help*"
>
>
>
> (defun myfunc ()
> "todo docstring"
> (interactive)
>
> (setq bufr (help-buffer))
> (print "test" bufr) )
>
>
>
>
>
>
> From: philip-agee@africamel.net
> To: help-gnu-emacs@gnu.org
> Subject: Printing as documentation
> Date: 20/06/2021 06:41:31 Europe/Paris
>
>
> When I wish to see the self documentation I use
>
> C-h f myfunc
>
> I get a temporary help buffer displaying the docstring for myfunc.
>
> Is it possible to to do the same kind of thing when calling a description
> function "mydesc".
> so that the print function are show in a temporary help buffer?
>
> (defun mydesc ()
> "docstring for mydesc"
>
> (print "The brown fox" help)
> (print "jumps over the fence" help) )
>
> M-x mydesc
>
> wiil then behave similar to doing
>
> C-h f somefunc
>
>
>