emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Sparse tree using regexp
@ 2010-12-07 12:18 Juri Artamonov
  2010-12-07 12:29 ` Marco (m) Wahl
  0 siblings, 1 reply; 6+ messages in thread
From: Juri Artamonov @ 2010-12-07 12:18 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 469 bytes --]

Hello,

I have aquamacs and I have org file. I would like to leave lines that which
contains only words TODO or INPROGRESS.

I do Ctrl-C + / + / and then enter regular expression. If I enter TODO or
just INPROGRESS then it works but when I try to enter TODO|INPROGRESS or
TODO\|INPROGRESS in order to see records containing one of these words then
no records are shown.

Could you please advice how to use regexp here for orgmode?

Thank you,
                    Juri.

[-- Attachment #1.2: Type: text/html, Size: 578 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Sparse tree using regexp
  2010-12-07 12:18 Sparse tree using regexp Juri Artamonov
@ 2010-12-07 12:29 ` Marco (m) Wahl
  2010-12-07 13:04   ` suvayu ali
  2010-12-07 13:44   ` Juri Artamonov
  0 siblings, 2 replies; 6+ messages in thread
From: Marco (m) Wahl @ 2010-12-07 12:29 UTC (permalink / raw)
  To: emacs-orgmode

Juri Artamonov <jartamonov@gmail.com> writes:

> Hello,
>
> I have aquamacs and I have org file. I would like to leave lines that
> which contains only words TODO or INPROGRESS.
>
> I do Ctrl-C + / + / and then enter regular expression. If I enter TODO
> or just INPROGRESS then it works but when I try to enter
> TODO|INPROGRESS or TODO\|INPROGRESS in order to see records containing
> one of these words then no records are shown.
>
> Could you please advice how to use regexp here for orgmode?

what about '\(TODO\)\|\(INPROGRESS\)'?

hth
-- 
m

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

* Re: Re: Sparse tree using regexp
  2010-12-07 12:29 ` Marco (m) Wahl
@ 2010-12-07 13:04   ` suvayu ali
  2010-12-07 13:44   ` Juri Artamonov
  1 sibling, 0 replies; 6+ messages in thread
From: suvayu ali @ 2010-12-07 13:04 UTC (permalink / raw)
  To: Marco (m) Wahl; +Cc: Juri Artamonov, emacs-orgmode

On Tue, Dec 7, 2010 at 1:29 PM, Marco (m) Wahl <marcowahl@gmail.com> wrote:
> Juri Artamonov <jartamonov@gmail.com> writes:
>
>> Hello,
>>
>> I have aquamacs and I have org file. I would like to leave lines that
>> which contains only words TODO or INPROGRESS.
>>
>> I do Ctrl-C + / + / and then enter regular expression. If I enter TODO
>> or just INPROGRESS then it works but when I try to enter
>> TODO|INPROGRESS or TODO\|INPROGRESS in order to see records containing
>> one of these words then no records are shown.
>>
>> Could you please advice how to use regexp here for orgmode?
>
> what about '\(TODO\)\|\(INPROGRESS\)'?
>

But shouldn't it be possible to get the sparse tree with the simpler
"TODO\|INPROGRESS" regex anyway? I tried it and it worked as expected
(with GNU Emacs on Linux). The OP could also try using the Todo kwd
option, `C-c / T'. When prompted, a simple expression like
"TODO|INPROGRESS" should work. (note the absence of backslash).

Maybe some variable setting is interfering with the matching, or maybe
its an Aquamacs bug. Just a few thoughts.

-- 
Suvayu

Open source is the future. It sets us free.

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

* Re: Re: Sparse tree using regexp
  2010-12-07 12:29 ` Marco (m) Wahl
  2010-12-07 13:04   ` suvayu ali
@ 2010-12-07 13:44   ` Juri Artamonov
  2010-12-07 14:06     ` Marco (m) Wahl
  1 sibling, 1 reply; 6+ messages in thread
From: Juri Artamonov @ 2010-12-07 13:44 UTC (permalink / raw)
  To: Marco (m) Wahl, emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 1020 bytes --]

Hello Marco,

this way it's working. Do you know why it's required additional brackets and
it's handling?

Thank you,
                  Juri.

On Tue, Dec 7, 2010 at 12:29 PM, Marco (m) Wahl <marcowahl@gmail.com> wrote:

> Juri Artamonov <jartamonov@gmail.com> writes:
>
> > Hello,
> >
> > I have aquamacs and I have org file. I would like to leave lines that
> > which contains only words TODO or INPROGRESS.
> >
> > I do Ctrl-C + / + / and then enter regular expression. If I enter TODO
> > or just INPROGRESS then it works but when I try to enter
> > TODO|INPROGRESS or TODO\|INPROGRESS in order to see records containing
> > one of these words then no records are shown.
> >
> > Could you please advice how to use regexp here for orgmode?
>
> what about '\(TODO\)\|\(INPROGRESS\)'?
>
> hth
> --
> m
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>

[-- Attachment #1.2: Type: text/html, Size: 1668 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Sparse tree using regexp
  2010-12-07 13:44   ` Juri Artamonov
@ 2010-12-07 14:06     ` Marco (m) Wahl
  2010-12-07 15:36       ` Matt Lundin
  0 siblings, 1 reply; 6+ messages in thread
From: Marco (m) Wahl @ 2010-12-07 14:06 UTC (permalink / raw)
  To: emacs-orgmode

hi Juri,

>     > I do Ctrl-C + / + / and then enter regular expression. If I enter TODO
>     > or just INPROGRESS then it works but when I try to enter
>     > TODO|INPROGRESS or TODO\|INPROGRESS in order to see records containing
>     > one of these words then no records are shown.
>     >
>     > Could you please advice how to use regexp here for orgmode?
>    
>     what about '\(TODO\)\|\(INPROGRESS\)'?
> this way it's working.

that's good.

> Do you know why it's required additional brackets and it's handling?

i just reactivated my regexp-brain-cells and saw the brackets. ;)
possibly you want to dive into regexps.  then you will get aquainted
with the brackets for grouping.

but ali noticed that you don't need brackets on his box.  maybe it's a
bug (or inconvenience) in aquamacs.  see his post and hopefully some
follow-ups.

ciao

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

* Re: Sparse tree using regexp
  2010-12-07 14:06     ` Marco (m) Wahl
@ 2010-12-07 15:36       ` Matt Lundin
  0 siblings, 0 replies; 6+ messages in thread
From: Matt Lundin @ 2010-12-07 15:36 UTC (permalink / raw)
  To: Marco m Wahl; +Cc: Juri Artamonov, emacs-orgmode

marcowahl@gmail.com (Marco (m) Wahl) writes:

> hi Juri,
>
>>     > I do Ctrl-C + / + / and then enter regular expression. If I enter TODO
>>     > or just INPROGRESS then it works but when I try to enter
>>     > TODO|INPROGRESS or TODO\|INPROGRESS in order to see records containing
>>     > one of these words then no records are shown.
>>     >
>>     > Could you please advice how to use regexp here for orgmode?
>>    
>>     what about '\(TODO\)\|\(INPROGRESS\)'?
>> this way it's working.
>
> that's good.
>
>> Do you know why it's required additional brackets and it's handling?
>
> i just reactivated my regexp-brain-cells and saw the brackets. ;)
> possibly you want to dive into regexps.  then you will get aquainted
> with the brackets for grouping.
>
> but ali noticed that you don't need brackets on his box.  maybe it's a
> bug (or inconvenience) in aquamacs.  see his post and hopefully some
> follow-ups.
>

The parentheses are redundant. Perhaps it is an Aquamacs issue. With
GnuEmacs 24 on Linux, the following search works fine:

C-c / / TODO\|STARTED

That said, for this use, a TODO keyword search will be quicker and more
accurate, as the regexp search above will match "todo" or "started"
anywhere in the buffer. Here's the todo search:

C-c / T TODO|STARTED

Best,
Matt

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

end of thread, other threads:[~2010-12-07 15:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-07 12:18 Sparse tree using regexp Juri Artamonov
2010-12-07 12:29 ` Marco (m) Wahl
2010-12-07 13:04   ` suvayu ali
2010-12-07 13:44   ` Juri Artamonov
2010-12-07 14:06     ` Marco (m) Wahl
2010-12-07 15:36       ` 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).