简体   繁体   中英

Searching hundreds of org-mode files without loading them into Emacs?

I've compiled hundres of org-mode files in a specific directory.

Is there any way to search these files for specific keywords, or build agendas, without loading them into Emacs, possibly using external search tools such as `ag'?

You can search them using Icicles . In Icicle minor mode, Cx Cf is bound to a multi-completion command that lets you match against the file name or the file content, or both. You can change the match patterns on the fly. Buffer *Completions* shows you the files that match.

And you can use progressive completion , combining any number of search patterns. Each pattern can itself be a regexp (or a substring), but it is a lot easier to combine several simple patterns than it is to come up with one complex pattern to DTRT. You can also negate patterns (obtain the complement of the match set).

You can visit any of the matching files that you like -- any number of them during the same command invocation. Or you can visit none of them if you like ( Cg ), and just use the command to locate those that match. You can use CM-RET , CM-down , etc. to get information about particular matching files (file type, permissions, size, last access time, creation time, etc.).

You can act on any number of them in some other way than visiting, using an alternate function that you specify: Just bind variable icicle-candidate-alt-action-fn to this function in a command you write that invokes icicle-find-file-of-content . Lots more features --- see Icicles - File-Name Input .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM