Creating Org mode sparse trees in Emacs and organice

栏目: IT技术 · 发布时间: 5年前

内容简介:When you have lots of information in an Org file, it helps to narrow it down to just the topic that interests you right now. There's many ways to do that depending on what exactly you want to do. Creating anFor example, if you had

When you have lots of information in an Org file, it helps to narrow it down to just the topic that interests you right now. There's many ways to do that depending on what exactly you want to do. Creating an Org mode sparse tree is one of those options! C-c / constructs a sparse tree for selected information in an outline tree, so that the entire document is folded as much as possible, but the selected information is made visible along with the headline structure above it. These are the options how you can filter your Org file down:

Creating Org mode sparse trees in Emacs and organice

For example, if you had this Org file containing lots of different information and you'd want to drill down on your headers on 'cute dogs' which have the appropriate tags dog and cute , you can filter down on :dog:cute which will make your document look like this:

Creating Org mode sparse trees in Emacs and organice

When modifying the document now, it is important to remember that it is a sparse tree! Hence, if you delete the line on point, you might have deleted other lines which were folded down. This might be what you want, but it might also not be. If you filtered down a list of headers on the same nesting level, it's better to make semantic changes like toggling the todo state or adding a tag. Only later, when you're viewing the whole file again (for example by using S-TAB ), you can start deleting lines.

Now, if you're keen on having this kind of power on the go (aka on your smartphone or browser), check out the free and open source project organice ( https://github.com/200ok-ch/organice/ ). In organice, you can manage the same Org files as in Emacs, but even when away from your computer. Looking up the same information in organice looks like this:

Creating Org mode sparse trees in Emacs and organice

In fact, organice has a search feature which is similar to Emacs sparse trees, but it is even more powerful, because you can compose different kinds of searches into one:

You can simply search for TODO check out organice|orgmode . to filter for tasks containing these words. The pipe symbol (|) is a logical OR . The filter is a smart-case search:

  • Lower-case words mean that the filter ignores the case.
  • If a word contains upper-case letters, the filter is case-sensitive.

The following example searches for headlines containing START or FINISHED keywords and the string "states are". You can also use single-quotes.

START|FINISHED "states are"

The next example excludes DONE headlines but requires the tag fun .

-DONE :fun

You can exclude text strings, tags, and properties as well by prepending the minus sign (-).

Last but not least, you can search for headlines with defined properties:

TODO :blocked_by: :assignee:nobody|none

This filters headlines having a property blocked_by (with any value) and a property assignee with a value containing nobody or none .

Enjoy the productivity boost of drilling down into your Org files from your computer and smartphone! Happy hacking^^

If you liked this post and want to say 'thanks', please head over to our free/libre and open source software page - and if you like one of them, give it a star on Github or Gitlab.


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

生命3.0

生命3.0

[美] 迈克斯·泰格马克 / 汪婕舒 / 浙江教育出版社 / 2018-6 / 99.90元

《生命3.0》一书中,作者迈克斯·泰格马克对人类的终极未来进行了全方位的畅想,从我们能活到的近未来穿行至1万年乃至10 亿年及其以后,从可见的智能潜入不可见的意识,重新定义了“生命”“智能”“目标”“意识”,并澄清了常见的对人工智能的误解,将帮你构建起应对人工智能时代动态的全新思维框架,抓住人类与人工智能共生演化的焦点。 迈克斯·泰格马克不仅以全景视角探讨了近未来人工智能对法律、战争、就业和......一起来看看 《生命3.0》 这本书的介绍吧!

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试