emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Thorsten Jolitz <tjolitz@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: How to filter agenda for Word1 OR Word2?
Date: Sat, 12 Jul 2014 10:18:19 +0200	[thread overview]
Message-ID: <8761j3m1mc.fsf@gmail.com> (raw)
In-Reply-To: 87egxrpj9d.fsf@mailbox.org

Alexander Baier <alexander.baier@mailbox.org> writes:

> On 2014-07-11 13:26 Martin Beck wrote:
>> I have a search result (created by a search agenda C-C a s) and I
>> want to narrow it down further with additional criteria.
>> I tried to use the "=" key for "Narrow to entries matching regexp",
>> but I did not find out how to combine several terms in here.
>> As long as I only enter one word, it works. But if I want to filter
>> for criteria like
>> Word1 OR Word2
>> or (Word1 OR Word2) AND Word3
>> or (Word1 OR Word2) AND NOT (Word3 OR Word4)
>> I get no results just by entering
>> e.g. Word1|Word2
>> or Word1&Word2
>> I'm sure this is trivial, but I'm not an expert in regular
>> expressions and currently don't see how to solve that.
>> :-(
> Using \(Word1\)\|\(Word2\) works for me. If you find it troublesome to
> type a lot of these escaped parens, you might want to try
> smartparens-mode for auto insertion of the closing _escaped_ paren.
> As an example, if you type "\(", smartparens will automatically insert
> "\)" after point. You can even navigate over these groups via sexps
> commands.

I always wondered how this C-c a s search should work. I can only enter
one word, just like the OP.

None of these (valid) regexps works here:

| (foo|bar)
| \(foo\|bar\)
| \\(foo|bar\\)

This does not work either

| \(foo\)\|\(bar\)

nor does 

| \(\(foo\)\|\(bar\)\)

or simply

| foo|bar


  reply	other threads:[~2014-07-12  8:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-11 11:26 How to filter agenda for Word1 OR Word2? Martin Beck
2014-07-11 23:29 ` Alexander Baier
2014-07-12  8:18   ` Thorsten Jolitz [this message]
2014-07-12 12:25     ` Alexander Baier
2014-07-12 12:40       ` Thorsten Jolitz
2014-07-12 19:14       ` Samuel Wales

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:

  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=8761j3m1mc.fsf@gmail.com \
    --to=tjolitz@gmail.com \
    --cc=emacs-orgmode@gnu.org \


* 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


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