From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Baier Subject: Re: How to filter agenda for Word1 OR Word2? Date: Sat, 12 Jul 2014 01:29:02 +0200 Message-ID: <87egxrpj9d.fsf@mailbox.org> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51698) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5kFh-0000m3-R6 for emacs-orgmode@gnu.org; Fri, 11 Jul 2014 19:29:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X5kFb-0005y7-Ij for emacs-orgmode@gnu.org; Fri, 11 Jul 2014 19:29:17 -0400 Received: from mx2.mailbox.org ([80.241.60.215]:38661) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5kFb-0005we-AU for emacs-orgmode@gnu.org; Fri, 11 Jul 2014 19:29:11 -0400 In-Reply-To: (Martin Beck's message of "Fri, 11 Jul 2014 13:26:31 +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: Martin Beck Cc: emacs orgmode-mailinglist 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. HTH, -- Alexander Baier