Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 515F0431FD9 for ; Sat, 24 Aug 2013 03:50:04 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id H78UcgQ3MCkk for ; Sat, 24 Aug 2013 03:49:57 -0700 (PDT) Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) by olra.theworths.org (Postfix) with ESMTP id 6DB12431FBD for ; Sat, 24 Aug 2013 03:49:57 -0700 (PDT) Received: from guru.guru-group.fi (localhost [IPv6:::1]) by guru.guru-group.fi (Postfix) with ESMTP id 7E36E100086; Sat, 24 Aug 2013 13:49:48 +0300 (EEST) From: Tomi Ollila To: Bastien , notmuch@notmuchmail.org Subject: Re: $(date ...)..$(date ...) request from Emacs In-Reply-To: <87d2p3s70o.fsf@bzg.ath.cx> References: <87d2p3s70o.fsf@bzg.ath.cx> User-Agent: Notmuch/0.16+11~gf21768f (http://notmuchmail.org) Emacs/24.3.1 (x86_64-unknown-linux-gnu) X-Face: HhBM'cA~ MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Aug 2013 10:50:04 -0000 On Sat, Aug 24 2013, Bastien wrote: > Hi again, > > notmuch search $(date +%s -d 2009-10-01)..$(date +%s -d 2009-10-02) > > works wonders from the command line, but not from within Emacs: > > M-x notmuch-search RET $(date +%s -d 2009-10-01)..$(date +%s -d 2009-10-02) there is no shell expansion done to the string... ... however M-x notmuch-search RET date:2009-10-01..2009-10-02 should do it (provided you have at least notmuch 0.15 (or so)) Tomi > > [Sat Aug 24 12:39:15 2013] > A Xapian exception occurred performing query: Unknown range operation > Query string was: $(date +%s -d 2009-10-01)..$(date +%s -d 2009-10-02) > command: notmuch search --format\=sexp --format-version\=1 --sort\=newest-first \$\(date\ \+\%s\ -d\ 2009-10-01\)..\$\(date\ \+\%s\ -d\ 2009-10-02\) > exit status: 1 > stderr: > A Xapian exception occurred performing query: Unknown range operation > Query string was: $(date +%s -d 2009-10-01)..$(date +%s -d 2009-10-02) > > I see --format=sexp -- does that mean we need to protect those > kinds of requests somehow? > > Thanks for your help! > > -- > Bastien > > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch