emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] A simple way to search only headlines


From: Suvayu Ali
Subject: Re: [O] A simple way to search only headlines
Date: Wed, 12 Jun 2013 00:01:12 +0200
User-agent: Mutt/1.5.21 (2012-12-30)

Hi Thorsten,

On Tue, Jun 11, 2013 at 04:42:28PM +0200, Thorsten Jolitz wrote:
> Suvayu Ali <address@hidden> writes:
> 
> > I wonder if semantic search can be leveraged to achieve the same.  It
> > might open other possibilities: searching only links, list items, source
> > blocks, ...  I think you get the point.  :-p
> 
> navi-mode.el works for Org-mode buffers too, e.g. using 

I think you misunderstood somewhat what I was suggesting.

As far as I understand, navi-mode uses an interface like occur; it
presents a separate buffer with the results which you can then use to
navigate to the results.  Am I correct?

What I was suggesting (and how I understood the OPs question) was, to
restrict regular (i)search to headlines.  Consider the following example
Org buffer:


  * Top heading
  
  ** Sub-heading 1
  + List entry
  + Another entry with an enumerated list
    1. Foo
    2. Bar
  
  ** Another sub-heading


Now with such restriction enabled, `C-s A n o t h e r' will navigate to
the headline (just like regular isearch-forward)

  ** Another sub-heading

not the list item

  + Another entry with an enumerated list

As far as I know, functionality like this exists for traditional source
code buffers using semantic search.  I was wondering if it is possible
to leverage that mechanism to get the behaviour described above.  If it
is indeed possible, it could be hacked to work for other Org syntax
elements like links, lists, source blocks, drawers, etc.

Hopefully I didn't misunderstand your post and I was clearer expressing
myself this time.

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.



reply via email to

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