简体   繁体   English

搜索数百个组织模式文件而不将其加载到Emacs中?

[英]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'? 有什么方法可以搜索这些文件中的特定关键字或构建议程,而不必将其加载到Emacs中,可能使用诸如“ ag”之类的外部搜索工具?

You can search them using Icicles . 您可以使用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. Icicle次要模式下, Cx Cf绑定到一个多完成命令,该命令使您可以与文件名或文件内容(或两者)进行匹配。 You can change the match patterns on the fly. 您可以随时更改匹配模式。 Buffer *Completions* shows you the files that match. 缓冲区*Completions*向您显示匹配的文件。

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. 每个模式本身都可以是一个正则表达式(或子字符串),但是将多个简单模式组合起来要比为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. 或者,如果您喜欢( Cg ),则可以不访问任何一个,只需使用命令来找到匹配的对象。 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.). 您可以使用CM-RETCM-down等获取有关特定匹配文件的信息(文件类型,权限,大小,上次访问时间,创建时间等)。

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 . 您可以作用于比看一些其他的方式其中任意数量,使用指定的复用功能:只需绑定变量icicle-candidate-alt-action-fn这个功能在命令你编写调用icicle-find-file-of-content Lots more features --- see Icicles - File-Name Input . 许多其他功能---参见“ 冰柱-文件名输入”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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