在组织模式中是否有某种狭义的上下文? [英] Is there some kind of narrow-to-context in org-mode?

查看:52
本文介绍了在组织模式中是否有某种狭义的上下文?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Org 的narrow-to-subtree 很棒,但有时我也想看到父节点的链,而不是所有的叔节点.

Org's narrow-to-subtree is wonderful, but sometimes I also want to see the chain of parent nodes, without all the uncle nodes.

例如,给定这棵树:

* a
** a.a     <- extraneous great uncle
** a.b
*** a.b.a  <- extraneous uncle
*** a.b.b  <- want to see context for this
**** a.b.b.a
**** a.b.b.b

我想缩小我的视野来看到这个:

I want to narrow my view to see this:

* a
** a.b
*** a.b.b  <- want to see context for this
**** a.b.b.a
**** a.b.b.b

我怎样才能做到这一点?

How can I make this happen?

推荐答案

AFAIK,没有这样的缩小工具 - 但函数 org-display-outline-path 将显示a/ab"对于有问题的标题,即当前标题上方标题的轮廓路径.如果您希望它永久可见,您可以将函数添加到模式行指示器 - 或者使用(通常不存在的)标题行,它有更多的增长空间.试试这个文件:

AFAIK, there is no such narrowing facility - but the function org-display-outline-path will display "a/a.b" for the heading in question, i.e. the outline path of headings above your current heading. You can add the function to the modeline indicator if you want it to be permanently visible - or perhaps use the (normally absent) header line which has more space to grow. Try with this file:

* foo

#+BEGIN_SRC emacs-lisp
(setq header-line-format '(:eval (org-display-outline-path)))
#+END_SRC

#+RESULTS:
: (:eval (org-display-outline-path))


** bar

*** baz

评估代码块以设置标题行格式变量,然后查看当光标位于** bar"标题或*** baz"标题上时标题行的内容.

Evaluate the code block to set the header-line-format-variable and then see what the header line says when the cursor is on the "** bar" header or the "*** baz" header.

这篇关于在组织模式中是否有某种狭义的上下文?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆