I use describe-function
command with SPC h f
to get help on emacs functions. But I want to get documentation on Doom's own functions such as map!
. describe-function
doesn't list this function. How can I get documentation on this and other custom functions?
1 Answer
If you are using Ivy, this is expected. Ivy's user manual states that Ivy uses the exclamation mark for regex negation:
Ivy supports regexp negation with "!". For example, "define key ! ivy quit" first selects everything matching "define.*key", then removes everything matching "ivy", and finally removes everything matching "quit". What remains is the final result set of the negation regexp.
Since Ivy treats minibuffer input as a regexp, the standard regexp identifiers work: "^", "$", "\b" or "[a-z]". The exceptions are spaces, which translate to ".*", and "!" that signal the beginning of a negation group.
You should get what you need if you escape the exclamation mark. In other words, when you use describe-function
, search for
map\!
-
Can you please explain why? Is
!
a special character that needs escaping? Or is this something else? Is that special to Doom? Is it something to do withivy/counsel
as a comment mentions or is that unrelated? Is it a Doom bug?– NickDJan 21, 2022 at 12:51 -
I'm not sure I can, I'm relatively new to Emacs myself, but using the backslash does help finding "Doom's own functions" so I thought it answered the question. If you feel like this answer should be deleted or relegated to a comment I can do so. Jan 21, 2022 at 20:58
-
No, not at all: I'm just trying to make sure that it is as helpful as possible. It would help if the OP chimed in on whether it solved his problem.– NickDJan 21, 2022 at 21:14
-
1Hi @NickD I went ahead and added some information to my answer, hopefully it's more helpful now. Thank you for the input! Feb 9, 2022 at 16:07
*scratch*
, what does it say?(fboundp 'map!)
t
describe-function
on it and it shows up in the list (I think I'm actually gettingcounsel-describe-function
that way, though -- maybe plain describe-function doesn't show macro help?? seems unlikely)map!
, describe-function lists it -- but otherwise, it doesn't show up. In doom it never shows up unless I go to the lenghs above.