emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Thorsten Jolitz <tjolitz@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: A simple way to search only headlines
Date: Tue, 04 Jun 2013 09:18:27 +0200	[thread overview]
Message-ID: <87k3ma5oos.fsf@gmail.com> (raw)
In-Reply-To: CAOQHXPrR2auvEaeAtAFehYxXbEhknTveqyKUh53kvjVupYc-6w@mail.gmail.com

Xebar Saram <zeltakc@gmail.com> 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

  reply	other threads:[~2013-06-04  7:18 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-01 16:35 A simple way to search only headlines Xebar Saram
2013-06-01 20:10 ` Tassilo Horn
2013-06-03  7:48   ` Sebastien Vauban
2013-06-03 12:16     ` Xebar Saram
2013-06-04  7:18       ` Thorsten Jolitz [this message]
2013-06-04  7:50       ` Sebastien Vauban
2013-06-07 20:31         ` Xebar Saram
2013-06-07 21:50           ` Richard Lawrence
2013-06-08  0:05             ` Xebar Saram
2013-06-08  0:34               ` Richard Lawrence
2013-06-08  5:25             ` Nick Dokos
2013-06-10  7:34               ` Sebastien Vauban
2013-06-10 13:06                 ` Nick Dokos
2013-06-10 15:04                   ` Sebastien Vauban
2013-06-11  4:31                     ` Nick Dokos
2013-06-11 12:27                       ` Suvayu Ali
2013-06-11 14:42                         ` Thorsten Jolitz
2013-06-11 22:01                           ` Suvayu Ali
2013-06-11 23:55                             ` Thorsten Jolitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k3ma5oos.fsf@gmail.com \
    --to=tjolitz@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).