unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Printing function documentation via an interactive option
@ 2024-05-09 20:56 Heime
  2024-05-09 21:25 ` [External] : " Drew Adams
  0 siblings, 1 reply; 5+ messages in thread
From: Heime @ 2024-05-09 20:56 UTC (permalink / raw)
  To: Heime via Users list for the GNU Emacs text editor

Would it be possible to display the documentation of the current function 
should a user select the initial value "?".  Furthermore, because I am 
requiring a match, would the initial-value have to be included in COLLECTION ? 


  (interactive
    (list
      (let ( (cseq '("global-activate" "global-deactivate" "?")) )
        (completing-read "Switch: " cseq nil t "?"))))





^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [External] : Printing function documentation via an interactive option
  2024-05-09 20:56 Printing function documentation via an interactive option Heime
@ 2024-05-09 21:25 ` Drew Adams
  2024-05-09 21:46   ` Heime
  0 siblings, 1 reply; 5+ messages in thread
From: Drew Adams @ 2024-05-09 21:25 UTC (permalink / raw)
  To: Heime, Heime via Users list for the GNU Emacs text editor

> Would it be possible to display the documentation of the current function
> should a user select the initial value "?".  Furthermore, because I am
> requiring a match, would the initial-value have to be included in
> COLLECTION ?
> 
> 
>   (interactive
>     (list
>       (let ( (cseq '("global-activate" "global-deactivate" "?")) )
>         (completing-read "Switch: " cseq nil t "?"))))

All that does is put `?' in the minibuffer,
with point just after it.

If you just hit RET at that point then the
string "?" is provided as the value of your
function's first argument.

Unless the body of your function interprets
that "?" string as an instruction to invoke
`describe-function' on your function, then
no, just reading that "?" isn't going to
show the help for your function.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [External] : Printing function documentation via an interactive option
  2024-05-09 21:25 ` [External] : " Drew Adams
@ 2024-05-09 21:46   ` Heime
  2024-05-09 22:02     ` Heime
  2024-05-09 22:06     ` Drew Adams
  0 siblings, 2 replies; 5+ messages in thread
From: Heime @ 2024-05-09 21:46 UTC (permalink / raw)
  To: Drew Adams; +Cc: Heime via Users list for the GNU Emacs text editor






Sent with Proton Mail secure email.

On Friday, May 10th, 2024 at 9:25 AM, Drew Adams <drew.adams@oracle.com> wrote:

> > Would it be possible to display the documentation of the current function
> > should a user select the initial value "?". Furthermore, because I am
> > requiring a match, would the initial-value have to be included in
> > COLLECTION ?
> > 
> > (interactive
> > (list
> > (let ( (cseq '("global-activate" "global-deactivate" "?")) )
> > (completing-read "Switch: " cseq nil t "?"))))
> 
> 
> All that does is put `?' in the minibuffer, with point just after it. If you
> just hit RET at that point then the string "?" is provided as the value of 
> your function's first argument. Unless the body of your function interprets 
> that "?" string as an instruction to invoke` describe-function' on your function, 
> then no, just reading that "?" isn't going to show the help for your function.

Yes, I have a pcase that interprets the "?" as the function argument.
So describe-function can call itself ?




^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [External] : Printing function documentation via an interactive option
  2024-05-09 21:46   ` Heime
@ 2024-05-09 22:02     ` Heime
  2024-05-09 22:06     ` Drew Adams
  1 sibling, 0 replies; 5+ messages in thread
From: Heime @ 2024-05-09 22:02 UTC (permalink / raw)
  To: Heime; +Cc: Drew Adams, Heime via Users list for the GNU Emacs text editor

Sent with Proton Mail secure email.

On Friday, May 10th, 2024 at 9:46 AM, Heime <heimeborgia@protonmail.com> wrote:

> Sent with Proton Mail secure email.
> 
> On Friday, May 10th, 2024 at 9:25 AM, Drew Adams drew.adams@oracle.com wrote:
> 
> > > Would it be possible to display the documentation of the current function
> > > should a user select the initial value "?". Furthermore, because I am
> > > requiring a match, would the initial-value have to be included in
> > > COLLECTION ?
> > > 
> > > (interactive
> > > (list
> > > (let ( (cseq '("global-activate" "global-deactivate" "?")) )
> > > (completing-read "Switch: " cseq nil t "?"))))
> > 
> > All that does is put `?' in the minibuffer, with point just after it. If you just hit RET at that point then the string "?" is provided as the value of your function's first argument. Unless the body of your function interprets that "?" string as an instruction to invoke` describe-function' on your function,
> > then no, just reading that "?" isn't going to show the help for your function.
> 
> Yes, I have a pcase that interprets the "?" as the function argument.
> So describe-function can call itself ?

Have been trying to find the keybindings associated with moving from one item to another
associated with completing-read, but could not find the information. 




^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [External] : Printing function documentation via an interactive option
  2024-05-09 21:46   ` Heime
  2024-05-09 22:02     ` Heime
@ 2024-05-09 22:06     ` Drew Adams
  1 sibling, 0 replies; 5+ messages in thread
From: Drew Adams @ 2024-05-09 22:06 UTC (permalink / raw)
  To: Heime; +Cc: Heime via Users list for the GNU Emacs text editor

> So describe-function can call itself ?

M-x describe-function RET describe-function RET


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-05-09 22:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-09 20:56 Printing function documentation via an interactive option Heime
2024-05-09 21:25 ` [External] : " Drew Adams
2024-05-09 21:46   ` Heime
2024-05-09 22:02     ` Heime
2024-05-09 22:06     ` Drew Adams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).