emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] org.el (org-show-context-detail): add option 'ancestors-with


From: Cheong Yiu Fung
Subject: Re: [PATCH] org.el (org-show-context-detail): add option 'ancestors-with-entry
Date: Tue, 20 Apr 2021 00:03:36 +0800
User-agent: Cyrus-JMAP/3.5.0-alpha0-379-g3e3377039f-fm-20210419.003-g3e337703

Hi Nicolas, 

> Don't you need to simply move point within the entry and use `ancestors'
> view?

Yes, but that would work only for one entry. My main use case is to first 
filter tree by `org-sparse-tree', then export all filtered contents with 
`visible-only' option. If I am to use `ancestors' view and move point within 
each entry one by one to expand, it would be very repetitive. I think this is 
helpful for generating HTML page or PDF from matching query quickly. 

Yiufung

On Mon, Apr 19, 2021, at 4:21 PM, Nicolas Goaziou wrote:
> Hello,
> 
> Cheong Yiu Fung <mail@yiufung.net> writes:
> 
> > Hi, I'm proposing a new option in `org-show-context-detail', which shows
> > current headline, its ancestors, *and the entry itself*. This is useful
> > when export matched subtrees and their contents quickly with least
> > manual intervention.
> >
> > Consider when working on different aspects of a project and taking notes
> > as we go:
> >
> > * Project
> > A project tree
> > ** Task1
> > ** Task2
> > *** ASK Something to align
> > Something for discussion
> > ** Task3
> > ** Task4
> > *** ASK Something else to align
> > Something else.
> >
> > At some point, we may wish to export only certain contents. For example,
> > to export headings with TODO keyword of "ASK", along with the task
> > context (ancestors TASK<N> heading name), and their own content for
> > discussion with colleagues. Ideally, this can be done by
> > org-sparse-tree, followed by org-export with visible-only + subtree-only
> > option.
> >
> > Expected output:
> > * Project
> > ** Task2
> > *** ASK Something to align
> > Something for discussion
> > ** Task4
> > *** ASK Something else to align
> > Something else.
> >
> > Current options, though, either require manual expansion to show both
> > ancestors AND entry, which becomes tedious soon;
> >
> > * Project
> > ** Task2
> > *** ASK Something to align
> > ** Task4
> > *** ASK Something else to align
> >
> > or it shows extra contents (`local' will include the *next* heading, in
> > this example, the non-related Task3)
> >
> > * Project
> > *** ASK Something to align
> > Something for discussion
> > ** Task3
> > *** ASK Something else to align
> > Something else.
> >
> > `ancestor-with-entries' is a long name that pose some difficulties to
> > updating documentations, so I wish to have some feedbacks before moving
> > on. Is there better way to achieve this effect? Am I overlooking
> > something?
> 
> Don't you need to simply move point within the entry and use `ancestors'
> view?
> 
> Regards,
> -- 
> Nicolas Goaziou
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]