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 4BA34431FD0 for ; Sun, 4 Sep 2011 19:22:25 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0.363 X-Spam-Level: X-Spam-Status: No, score=0.363 tagged_above=-999 required=5 tests=[RDNS_DYNAMIC=0.363] 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 1i5lCbqsgW8U for ; Sun, 4 Sep 2011 19:22:24 -0700 (PDT) Received: from mail.antono.info (ec2-50-19-243-116.compute-1.amazonaws.com [50.19.243.116]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id B5687431FB6 for ; Sun, 4 Sep 2011 19:22:24 -0700 (PDT) Received: by mail.antono.info (Postfix, from userid 1003) id E2D18615B7; Mon, 5 Sep 2011 02:22:53 +0000 (UTC) Received: from libero (unknown [178.121.201.33]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.antono.info (Postfix) with ESMTPSA id ECB7160381; Mon, 5 Sep 2011 02:22:50 +0000 (UTC) From: Antono Vasiljev To: Jani Nikula , Jameson Graef Rollins , Tomi Ollila Subject: Re: [PATCH] emacs: Sort saved searches In-Reply-To: <8739gcw4lj.fsf@nikula.org> References: <1314966486-20708-1-git-send-email-jani@nikula.org> <8739gdb7z8.fsf@nikula.org> <878vq4agex.fsf@servo.factory.finestructure.net> <8739gcw4lj.fsf@nikula.org> User-Agent: Notmuch/0.6.1-1 (http://notmuchmail.org) Emacs/24.0.50.1 (i686-pc-linux-gnu) Date: Mon, 05 Sep 2011 05:22:17 +0300 Message-ID: <87fwkbd8yu.fsf@antono.info> MIME-Version: 1.0 Content-Type: text/plain Cc: notmuch@notmuchmail.org 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: Mon, 05 Sep 2011 02:22:25 -0000 On Sun, 04 Sep 2011 21:21:44 +0300, Jani Nikula wrote: > Hmm. Let's look at this from another perspective: do you know if there's > a reasonable way to make ordering of the customized saved searches > easier? It's not exactly user friendly to move items up and down in the > list. Or to sort them. > > On the other hand, the tags are sorted. Saved searches are not. Should > it be possible to display tags in user defined order...? > > I know I can twist this the way I want and carry my own modifications, > but I'd like to make notmuch user friendly for people who don't know > elisp. Note exactrly on Your topic, but my solution for the problem is anything-notmuch: ;; Notmuch Anything Source ;; anything-sources (defvar notmuch-anything-source-saved-searches '((name . "Notmuch Mail - Saved Searches") (candidates . notmuch-saved-searches) (action ("Search with notmuch" . notmuch-search)) (candidate-number-limit . 100) ;; (requires-pattern . 2) "Source for completing anything saved searches.")) (defun notmuch-anything (&optional rehash) (interactive (list current-prefix-arg)) (anything :sources 'notmuch-anything-source-saved-searches :preselect "inbox" :buffer "*notmuch-saved-searches*")) (define-key notmuch-hello-mode-map "S" 'notmuch-anything) It is possible to include this directly to notmuch, wrapped to (eval-after-load 'notmuch '(progn code ...)) ? -- http://antono.info/ http://twitter.com/antono http://github.com/antono