From mboxrd@z Thu Jan 1 00:00:00 1970 From: Suvayu Ali Subject: Re: A simple way to search only headlines Date: Wed, 12 Jun 2013 00:01:12 +0200 Message-ID: <20130611220112.GB30597@kuru.dyndns-at-home.com> References: <86k3mae2mo.fsf@somewhere.org> <87mwr1egjr.fsf@berkeley.edu> <87ip1pkwco.fsf@pierrot.dokosmarshall.org> <86bo7e4dww.fsf@somewhere.org> <87d2ruktd0.fsf@pierrot.dokosmarshall.org> <86txl60zy5.fsf@somewhere.org> <87bo7di7zf.fsf@pierrot.dokosmarshall.org> <20130611122757.GB18792@kuru.dyndns-at-home.com> <87zjuwhfor.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36348) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmWcx-0002jn-9M for emacs-orgmode@gnu.org; Tue, 11 Jun 2013 18:01:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UmWcw-0000mZ-5l for emacs-orgmode@gnu.org; Tue, 11 Jun 2013 18:01:19 -0400 Received: from mail-wg0-x229.google.com ([2a00:1450:400c:c00::229]:41393) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmWcv-0000mU-WA for emacs-orgmode@gnu.org; Tue, 11 Jun 2013 18:01:18 -0400 Received: by mail-wg0-f41.google.com with SMTP id k13so4502387wgh.4 for ; Tue, 11 Jun 2013 15:01:16 -0700 (PDT) Received: from kuru.dyndns-at-home.com (sd44012d5.adsl.online.nl. [212.64.18.213]) by mx.google.com with ESMTPSA id f8sm20097965wiv.0.2013.06.11.15.01.15 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 11 Jun 2013 15:01:15 -0700 (PDT) Content-Disposition: inline In-Reply-To: <87zjuwhfor.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi Thorsten, On Tue, Jun 11, 2013 at 04:42:28PM +0200, Thorsten Jolitz wrote: > Suvayu Ali 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.