emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Top-level headers in org-sparse-tree
@ 2008-09-09 14:06 Iris Jackson
  2008-09-10 14:30 ` Bernt Hansen
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Iris Jackson @ 2008-09-09 14:06 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 873 bytes --]

Hi,
I recently started using org mode and I really like it.  I have a single
file that contains all information about a project like TODOs, project
specs, user documentation, development notes, etc.  For example, the way I
generate the project specs is to first create a sparse tree matching on the
tag I assigned to the specs, then HTML exporting it.

The problem I encountered is that org-tags-sparse-tree shows top-level
headers even if they don't contain the selected tag.  Is there a simple way
to turn that off?  For example, if I have a top level section called "Bugs",
and it does not contain the "project spec" tag, then I don't want it to show
up in the result :-)

I think this functionality is controlled by org-make-tags-matcher on line
9382 of org.el (version 6.06b), but this function is too intimidating for me
to try to change it.

Please advise.  Thanks!

[-- Attachment #1.2: Type: text/html, Size: 1047 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Top-level headers in org-sparse-tree
  2008-09-09 14:06 Top-level headers in org-sparse-tree Iris Jackson
@ 2008-09-10 14:30 ` Bernt Hansen
  2008-09-10 14:40 ` R: " Giovanni Ridolfi
  2008-09-13 16:18 ` Carsten Dominik
  2 siblings, 0 replies; 6+ messages in thread
From: Bernt Hansen @ 2008-09-10 14:30 UTC (permalink / raw)
  To: Iris Jackson; +Cc: emacs-orgmode

"Iris Jackson" <iris.a.jackson@gmail.com> writes:

> I recently started using org mode and I really like it.  I have a single file
> that contains all information about a project like TODOs, project specs, user
> documentation, development notes, etc.  For example, the way I generate the
> project specs is to first create a sparse tree matching on the tag I assigned
> to the specs, then HTML exporting it.
>
> The problem I encountered is that org-tags-sparse-tree shows top-level headers
> even if they don't contain the selected tag.  Is there a simple way to turn
> that off?  For example, if I have a top level section called "Bugs", and it
> does not contain the "project spec" tag, then I don't want it to show up in
> the result :-)
>
> I think this functionality is controlled by org-make-tags-matcher on line 9382
> of org.el (version 6.06b), but this function is too intimidating for me to try
> to change it.
>
> Please advise.  Thanks!

You can highlight the region you want to export then

M-x narrow-to-region

Do your export and then

M-x widen

to restrict what is included in the export.

Hope that helps.

-Bernt

^ permalink raw reply	[flat|nested] 6+ messages in thread

* R: Top-level headers in org-sparse-tree
  2008-09-09 14:06 Top-level headers in org-sparse-tree Iris Jackson
  2008-09-10 14:30 ` Bernt Hansen
@ 2008-09-10 14:40 ` Giovanni Ridolfi
  2008-09-10 15:20   ` Giovanni Ridolfi
  2008-09-13 16:18 ` Carsten Dominik
  2 siblings, 1 reply; 6+ messages in thread
From: Giovanni Ridolfi @ 2008-09-10 14:40 UTC (permalink / raw)
  To: emacs-orgmode

--- Mar 9/9/08, Iris Jackson <iris.a.jackson@gmail.com> ha scritto:
> The problem I encountered is that org-tags-sparse-tree
> shows top-level
> headers even if they don't contain the selected tag. 
> Is there a simple way
> to turn that off?  For example, if I have a top level
> section called "Bugs",
> and it does not contain the "project spec" tag,
> then I don't want it to show
> up in the result :-)

does the manual at section: "Tag inheritance"
help you?:

------------------------------------------------------------------------
To limit tag inheritance to specific tags, or to turn it off entirely,
use the variable `org-use-tag-inheritance'.

   When a headline matches during a tags search while tag inheritance
is turned on, all the sublevels in the same tree will match as well(1).
The list of matches may then become very long.  If you only want to
see the first tags match in a subtree, configure the variable
`org-tags-match-list-sublevels'.

   ---------- Footnotes ----------

   (1) This is only true if the the search does not involve more
complex tests including properties (*note Property searches::).
-----------------------------------------------------------------------

cheers,
Giovanni

__________________________________________________
Do You Yahoo!?
Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto spazio gratuito per i tuoi file e i messaggi 
http://mail.yahoo.it

^ permalink raw reply	[flat|nested] 6+ messages in thread

* R: Top-level headers in org-sparse-tree
  2008-09-10 14:40 ` R: " Giovanni Ridolfi
@ 2008-09-10 15:20   ` Giovanni Ridolfi
  0 siblings, 0 replies; 6+ messages in thread
From: Giovanni Ridolfi @ 2008-09-10 15:20 UTC (permalink / raw)
  To: emacs-orgmode

> > The problem I encountered is that org-tags-sparse-tree
> > shows top-level
> > headers even if they don't contain the selected
> tag. 
> > Is there a simple way
> > to turn that off?

(setq org-show-hierarchy-above nil)

Giovanni


__________________________________________________
Do You Yahoo!?
Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto spazio gratuito per i tuoi file e i messaggi 
http://mail.yahoo.it

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Top-level headers in org-sparse-tree
  2008-09-09 14:06 Top-level headers in org-sparse-tree Iris Jackson
  2008-09-10 14:30 ` Bernt Hansen
  2008-09-10 14:40 ` R: " Giovanni Ridolfi
@ 2008-09-13 16:18 ` Carsten Dominik
  2014-11-17  7:54   ` Adam
  2 siblings, 1 reply; 6+ messages in thread
From: Carsten Dominik @ 2008-09-13 16:18 UTC (permalink / raw)
  To: Iris Jackson; +Cc: emacs-orgmode

Hi Iris,

Org considers the version of the file with only top-levels shown as  
the most folded version and does not provide commands that will hide  
these.

If the sparse tree exposes an entry deep in the hierarchy, it will  
also show the entire headline hierarchy above it.  In another reply to  
your message, Giovanni has pointed out correctly that the variable org- 
show-hierarchy-above can be used to turn off this feature.  However,  
the top-level headlines are always excluded from this, they are always  
visible.  Maybe you have set up your file in a way that each project  
is a top-level headline?  A way out would then be to demote all these  
to level two under a top-level headline "Projects" or so.  If you then  
turn off `org-show-hierarchy-above', maybe you will get closer to the  
view you did expect.

HTH

- Carsten

On Sep 9, 2008, at 4:06 PM, Iris Jackson wrote:

> Hi,
>
> I recently started using org mode and I really like it.  I have a  
> single file that contains all information about a project like  
> TODOs, project specs, user documentation, development notes, etc.   
> For example, the way I generate the project specs is to first create  
> a sparse tree matching on the tag I assigned to the specs, then HTML  
> exporting it.
>
> The problem I encountered is that org-tags-sparse-tree shows top- 
> level headers even if they don't contain the selected tag.  Is there  
> a simple way to turn that off?  For example, if I have a top level  
> section called "Bugs", and it does not contain the "project spec"  
> tag, then I don't want it to show up in the result :-)
>
> I think this functionality is controlled by org-make-tags-matcher on  
> line 9382 of org.el (version 6.06b), but this function is too  
> intimidating for me to try to change it.
>
> Please advise.  Thanks!
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Top-level headers in org-sparse-tree
  2008-09-13 16:18 ` Carsten Dominik
@ 2014-11-17  7:54   ` Adam
  0 siblings, 0 replies; 6+ messages in thread
From: Adam @ 2014-11-17  7:54 UTC (permalink / raw)
  To: emacs-orgmode

Carsten Dominik <dominik <at> science.uva.nl> writes:

> 
> Hi Iris,
> 
> Org considers the version of the file with only top-levels shown as  
> the most folded version and does not provide commands that will hide  
> these.

I would also like to see org-sparse-tree filter top-level headlines by tags.
It seems strange that this behavior would not be consistent... is this a
bug?

Perhaps this can be changed by hooking in some elisp, following
org-sparse-tree…?

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-11-17  8:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-09 14:06 Top-level headers in org-sparse-tree Iris Jackson
2008-09-10 14:30 ` Bernt Hansen
2008-09-10 14:40 ` R: " Giovanni Ridolfi
2008-09-10 15:20   ` Giovanni Ridolfi
2008-09-13 16:18 ` Carsten Dominik
2014-11-17  7:54   ` Adam

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).