reddit / emacs

Search across ALL documentation

reliktary · 2022-10-26 09:36
hi guys, to reduce amount of topics I create here I wish I can use emacs' self-documentation better. I can't quite figure how to search across all the documentation for a specific word or regex if possible. Example: I know that `org-clock-report` table (or clocktable) has `:narrow` param. I initially found it in google but now, since I know it exists, how can I quickly find info about this param directly in emacs? For example I want to find a manual page where this param is mentioned. Is there anything like `apropos-EVERYTHING` command that will look for a word (or regex) in all documentation? Even more. I now know that info about `:narrow` param for clock table can be found in org manual on a page called [The clock table](https://orgmode.org/manual/The-clock-table.html). I know it from google. How could I find this page using emacs? How would you find that page in emacs manual? P.S. I know about describe-* and apropos-* (and info) functions but I don't see any function that does the search across everything. There are also similar questions in the internet and there is a suggestion to search the documentation with `grep` or `zgrep` which I don't find useful. They just search in *.info files which when opened don't behave as info pages. Is greping the only way?
CoraxMorn · 2022-10-26 10:17
The index of the relevant manual is usually good enough for me to find what I'm looking for. In this case I'd probably open the Org manual and search for clock report or something similar in the index, and depending on the size of the page either scroll through or i-search for :narrow. I'd recommend taking a look at the info tutorial, it goes over how to use Emac's built in info reader.
mickeyp · 2022-10-26 11:39
`M-x info-apropos`?
reliktary · 2022-10-26 12:30
`M-x info-apropos` is good but I can't really find anything like `:narrow` or even `The clock table` with it which is the whole section name. Can you? I'm asking if you can because I just figured that my emacs (on macos) didn't have complete info section and many things were missing. Now I guess I fixed it and still can't find any of those.
mickeyp · 2022-10-26 12:33
If it's not in the index then it won't find anything. You're left with `C-s` in the info browser to search for `:narrow` which does indeed find what you are looking for. You can `C-x n w` to widen the info manual also. You now have it as one big page.
reliktary · 2022-10-26 12:34
Yeah, going through index and then use \`C-s\` is what I sometimes do as well. It works great when you need to read the documentation. But it doesn't really work when I need to find something specific in the manual. Something that I saw before but don't remember exactly where.
reliktary · 2022-10-26 12:38
u/CoraxMorn and u/mickeyp you guys are right... the issue is that I tried to use C-s search being in "the top directory" or top index page. C-s in this case worked only on that page obviously and I couldn't find stuff like ":narrow". But when I go specifically to "Org Mode" page I can use C-s search and it will search through whole Org Mode info section and it will find what I'm looking for. You both answered what works, it's just me didn't try your answers properly. thanks a lot
mickeyp · 2022-10-26 14:09
It's easy to get that bit about `C-s` mixed up because most people wuoldn't think that all the nodes in `C-h i` are really their own, separate info manuals.
quokka70 · 2022-10-26 14:17
I didn't know widening did that in Info. Thanks!
arthurno1 · 2022-10-26 19:45
You can search the manual. C-h i opens the manual, and there you can search with i and s. I don't know which functions are bound to those ,but I haven't changed the defaults. I am using Helm, so I will usually press 'm' (menu) to quickly jump to manual I wish, and then if I know where the thing I am looking for is I will press 'm' again and narrow down to section or I will press i and search. I also have this mode enabled, forgotten the name, that shows which parameters are expected in the mode-line when you place cursor after the function name Most of the time that is all I need. I use C-h f when I am not sure what parameters do and how they behave, and read the manual when I am looking up concepts or don't understand how something works.
00-11 · 2022-10-27 02:56
For searching all doc strings (not manuals), you can use command `apropos-documentation`.
cmjennings · 2022-10-27 04:59
Another person who didn't realize you could do that in Info, and another thanks to u/mickeyp! I had a use for this just earlier today!
paretoOptimalDev · 2022-10-27 05:09
I really want text search across all info documents to erase the need for search engines most of the time.