emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Improving org-goto isearch
@ 2010-12-25  9:34 Leo Alekseyev
  2011-01-05  3:37 ` Matt Lundin
  0 siblings, 1 reply; 2+ messages in thread
From: Leo Alekseyev @ 2010-12-25  9:34 UTC (permalink / raw)
  To: emacs-orgmode

I use org-goto to quickly jump to a heading that I know contains a
certain word.  More often than not, it's a 2nd, 3rd, ... level
heading.  I've been relying on org-goto for many months, but both of
the current interfaces leave something to be desired.

Let's say I want to be on heading FOO.  Right now, I am looking at the
outline headings+children tree.  I see FOO somewhere in the hierarchy.
 Now, my options are: C-c C-j, the default interface, which spawns a
new temp buffer; it overtakes my split-screen workspace (intrusive and
potentially slow).  Then I have to isearch for FOO and hit C-s until I
land on the correct heading.  In the process, the intermediate
headings that contain FOO will be unfolded (intrusive).

My second option is C-u C-c C-j, the ido/path completion interface
(which only functions provided (setq
org-outline-path-complete-in-steps nil) is set).  Now, the outline
looks completely different because it's all thrown in one big pile in
the minibuffer.  I type FOO, but as luck has it, I have 10 headings
that contain FOO, so I either have to C-s a bunch of times to cycle
through them, or type out the whole tree hierarchy that led to it;
when you make a typo, ido often slows to a crawl...  It can get
annoying.

Here is what I would like to see: the default interface of org-goto,
with the following changes:
(a) don't bother with the temp buffer at all.  If a temp buffer
absolutely has to be created, then don't mess with the layout of the
windows; just let it replace the working org-buffer window.
(b) when isearching through headings, don't unfold things that are folded.

In other words, I simply want the capability to isearch through
headings in an org buffer without messing with its folding state.
Seems like it should be simpler, implementation-wise, than the current
org-goto default, and potentially faster and friendlier.

Of course, given the vastness of org-mode options, there's a nonzero
chance that this functionality already exists -- it's a rather
sensible workflow, IMO.  If so, do point me to it.  If not, please
consider implementing it :)

--Leo

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

* Re: Improving org-goto isearch
  2010-12-25  9:34 Improving org-goto isearch Leo Alekseyev
@ 2011-01-05  3:37 ` Matt Lundin
  0 siblings, 0 replies; 2+ messages in thread
From: Matt Lundin @ 2011-01-05  3:37 UTC (permalink / raw)
  To: Leo Alekseyev; +Cc: emacs-orgmode

Leo Alekseyev <dnquark@gmail.com> writes:

> I use org-goto to quickly jump to a heading that I know contains a
> certain word.  More often than not, it's a 2nd, 3rd, ... level
> heading.  I've been relying on org-goto for many months, but both of
> the current interfaces leave something to be desired.
>
> Let's say I want to be on heading FOO.  Right now, I am looking at the
> outline headings+children tree.  I see FOO somewhere in the hierarchy.
>  Now, my options are: C-c C-j, the default interface, which spawns a
> new temp buffer; it overtakes my split-screen workspace (intrusive and
> potentially slow).  Then I have to isearch for FOO and hit C-s until I
> land on the correct heading.  In the process, the intermediate
> headings that contain FOO will be unfolded (intrusive).

I would recommend setting org-goto-interface to
'outline-path-completion. :)

> My second option is C-u C-c C-j, the ido/path completion interface
> (which only functions provided (setq
> org-outline-path-complete-in-steps nil) is set).  Now, the outline
> looks completely different because it's all thrown in one big pile in
> the minibuffer.  I type FOO, but as luck has it, I have 10 headings
> that contain FOO, so I either have to C-s a bunch of times to cycle
> through them, or type out the whole tree hierarchy that led to it;
> when you make a typo, ido often slows to a crawl...  It can get
> annoying.

You can use the alternative interface without ido. I find the following
settings work quite well, resulting in an alphabetical list of headlines
in the minibuffer, from which I can drill down to lower levels:

(setq org-outline-path-complete-in-steps t)
(setq org-completion-use-ido nil)

You could bind these locally in a custom function if you don't want to
interfere with refile settings.
>
> Here is what I would like to see: the default interface of org-goto,
> with the following changes:
> (a) don't bother with the temp buffer at all.  If a temp buffer
> absolutely has to be created, then don't mess with the layout of the
> windows; just let it replace the working org-buffer window.
> (b) when isearching through headings, don't unfold things that are folded.
>
> In other words, I simply want the capability to isearch through
> headings in an org buffer without messing with its folding state.

Doesn't a simple isearch in the current org buffer already do this? The
outline is temporarily unfolded for each match, but it is neatly folded
up again if you keep pressing C-s.

Best,
Matt

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

end of thread, other threads:[~2011-01-05  3:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-25  9:34 Improving org-goto isearch Leo Alekseyev
2011-01-05  3:37 ` Matt Lundin

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).