From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Jolitz Subject: Re: A simple way to search only headlines Date: Tue, 04 Jun 2013 09:18:27 +0200 Message-ID: <87k3ma5oos.fsf@gmail.com> References: <87sj11a8yq.fsf@thinkpad.tsdh.de> <86y5arocrz.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56193) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjlW5-0007R9-F4 for emacs-orgmode@gnu.org; Tue, 04 Jun 2013 03:18:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UjlW3-0004XW-3o for emacs-orgmode@gnu.org; Tue, 04 Jun 2013 03:18:49 -0400 Received: from plane.gmane.org ([80.91.229.3]:35292) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjlW2-0004XE-Rr for emacs-orgmode@gnu.org; Tue, 04 Jun 2013 03:18:46 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UjlVx-00039N-6D for emacs-orgmode@gnu.org; Tue, 04 Jun 2013 09:18:41 +0200 Received: from g231110001.adsl.alicedsl.de ([92.231.110.1]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 04 Jun 2013 09:18:41 +0200 Received: from tjolitz by g231110001.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 04 Jun 2013 09:18:41 +0200 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 Xebar Saram writes: > Thx Seb and Tassilo > > That's great ,i appreciate it! > > Seb, is there a way to quick bind a key to the above series of commands? Just to add another method to search only headlines: use navi-mode.el ,----------------------------- | https://github.com/tj64/navi `----------------------------- There is a tutorial on Worg: ,----------------------------------------------------------- | http://orgmode.org/worg/org-tutorials/org-outside-org.html `----------------------------------------------------------- Using the 'org-outside-org.org' file of this tutorial as an example, if you do (after installation of course) ,------------------------- | (navi-search-and-switch) | It is bound to M-s n. `------------------------- on this file, a (Occur like) *Navi* buffer pops up showing you the first level headlines: ,---------------------------------------------------- | 3 matches for "^\* " in buffer: org-outside-org.org | 15:* Introduction | 46:* Org-mode everywhere | 926:* Screencasts `---------------------------------------------------- Typing '4' in the *Navi* buffer shows you the headlines up to level 4: ,-------------------------------------------------------------- | 30 matches for "^\*\*?\*?\*? " in buffer: org-outside-org.org | 15:* Introduction | 46:* Org-mode everywhere | 50:** File Structuring | 54:*** Orgstruct | 94:*** Outline with Outshine | 99:**** History and Credits | 129:**** Installation | 190:**** Outshine's fundamental idea | 234:**** Fontification, Navigation and Structure Editing | 285:** Subtree and Comment Editing | 289:*** Introduction | 308:*** Outorg | 313:**** Introduction and Installation | 337:**** Usage | 392:**** Outorg vs Poporg | 419:*** Poporg | 428:**** Introduction | 452:**** Installation | 480:**** Usage | 523:**** Known bugs | 559:**** Caveats | 590:**** History | 614:**** Other tools | 644:**** Python | 711:** Remote Buffer Control | 751:*** Navi-mode | 756:**** About navi-mode | 774:**** Installation | 795:**** Usage | 926:* Screencasts `-------------------------------------------------------------- Since these headlines are the result of grep searches, they are *not* folded outline (Org-mode) subtrees but just single lines of text, so you can easily search them with the basic Emacs search commands (C-s and C-r e.g.). Of course you can do much more things in addition to searching headlines. Just to give you two examples: 1. type 'E' in the *Navi* buffer and the buffer is put in *Navi-Edit* mode, i.e.you can edit the headline in the *Navi* buffer and all edits are immediately applied to the associated Org-mode file. This is perfect for runnung Emacs keyboard macros only on the headlines of an Org-mode (or outshine) buffer. Type 'C-c C-c' to go back to read-only *Navi* mode. 2. with point on a headline in the *Navi* buffer, type 'e' and the subtree at point will be offered for editing in a temporary Org-mode buffer. This makes no sense for an .org file, of course, but is great when you structure your source code files (e.g. Emacs Lisp files) with headlines and use outshine.el, because then you can write all comment sections in Org-mode instead of as outcommented text in a source code buffer. -- cheers, Thorsten