help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Printing as documentation


From: Christopher Dimech
Subject: Printing as documentation
Date: Sun, 20 Jun 2021 09:33:42 +0200

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



reply via email to

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