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 174E9431FB6 for ; Tue, 2 Sep 2014 13:22:55 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 H-d5P1e0EcAk for ; Tue, 2 Sep 2014 13:22:47 -0700 (PDT) Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 7D1B4431FAF for ; Tue, 2 Sep 2014 13:22:47 -0700 (PDT) Received: by mail-wi0-f172.google.com with SMTP id n3so15034708wiv.17 for ; Tue, 02 Sep 2014 13:22:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:in-reply-to:references :user-agent:date:message-id:mime-version:content-type; bh=Je4N5AHSKw1qdJdvezbJBqzWHgl/9fYGqaSM7BCZ2JM=; b=ilq50w+pu1w3b10utn5h70vzY3935Mgr0diLb24fR1QkSZy0Dhp3VjJd1xkpJ3rPLi BHo3z8hiCVGRDMiBoN0kOKcBS9xmd7tADmWl7ZovLVov++FD8CTYDjzY5izU0C/XK97j vfFUs7xxkVYKuDN87y69eheOqGEdRFHOGUXy3TAa1PCxurMLaaB9lREGnRyqt6Su0zbx CRdyaB5+BxH2unR8pJnORjPqdN7x4CnwC2hckulf0naU3Y82Lo06m2fdKJmH3RLjcg7p UJw/0K/eyqO6rGLy+2kpBIkqfWgEuSsnimegw6paNuR8ZFgfX0UzLF2nFOOxjULEIzs/ Q2QA== X-Gm-Message-State: ALoCoQnh63qRzygOVaDvRoWMNYl5fu7f/7g+ziJWF57E3+ZkzIOD3htACXv/SBiV99CvW/B9Wt1I X-Received: by 10.180.100.202 with SMTP id fa10mr24800810wib.32.1409689364746; Tue, 02 Sep 2014 13:22:44 -0700 (PDT) Received: from localhost (dsl-hkibrasgw2-58c374-75.dhcp.inet.fi. [88.195.116.75]) by mx.google.com with ESMTPSA id am1sm11680220wjc.29.2014.09.02.13.22.43 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Sep 2014 13:22:44 -0700 (PDT) From: Jani Nikula To: Mark Walters , notmuch@notmuchmail.org Subject: Re: [PATCH v2] emacs: jump: sort-order bugfix In-Reply-To: <1409684164-28407-1-git-send-email-markwalters1009@gmail.com> References: <1409661049-23417-1-git-send-email-markwalters1009@gmail.com> <1409684164-28407-1-git-send-email-markwalters1009@gmail.com> User-Agent: Notmuch/0.18.1+65~g9f0f30f (http://notmuchmail.org) Emacs/24.3.1 (x86_64-pc-linux-gnu) Date: Tue, 02 Sep 2014 23:22:42 +0300 Message-ID: <87tx4pvkkt.fsf@nikula.org> 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: Tue, 02 Sep 2014 20:22:55 -0000 On Tue, 02 Sep 2014, Mark Walters wrote: > default-value needs its argument to be quoted. > > Slightly strangely default-value of 't or nil is 't or nil > respectively so the code > > (default-value notmuch-search-oldest-first) > > just gives the current value of notmuch-search-oldest-first rather > than intended default-value of this variable. > > The symptom is that if you are in a search buffer and use notmuch jump > to run a saved search which does not have an explicitly set sort order > then the sort order of the saved-search is inherited from the current > search buffer rather than being the default search order. > > Thanks to Jani for finding the bug. This fixes the issue, thanks for the patch. Jani. > --- > > This time with a fuller commit message. > > (Part of the reason I did not send more before is I had not checked > what the exact outcome of the buggy code was: it was obvious what the > code was intended to do, and that with the extra quote it > would do what it was intended to do.) > > Best wishes > > Mark > > > > > > > > emacs/notmuch-jump.el | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/emacs/notmuch-jump.el b/emacs/notmuch-jump.el > index 5eb0949..0193f8c 100644 > --- a/emacs/notmuch-jump.el > +++ b/emacs/notmuch-jump.el > @@ -51,7 +51,7 @@ (defun notmuch-jump-search () > (case (plist-get saved-search :sort-order) > (newest-first nil) > (oldest-first t) > - (otherwise (default-value notmuch-search-oldest-first))))) > + (otherwise (default-value 'notmuch-search-oldest-first))))) > (push (list key name > `(lambda () (notmuch-search ',query ',oldest-first))) > action-map))))) > -- > 1.7.10.4 > > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch