From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 122C3431FBC for ; Thu, 22 May 2014 01:59:23 -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 sKd-mh42etNI for ; Thu, 22 May 2014 01:59:17 -0700 (PDT) Received: from zproxy120.enst.fr (zproxy120.enst.fr [137.194.52.34]) by olra.theworths.org (Postfix) with ESMTP id 74A3C431FAE for ; Thu, 22 May 2014 01:59:17 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zproxy120.enst.fr (Postfix) with ESMTP id 7FE5610055A; Thu, 22 May 2014 10:59:13 +0200 (CEST) Received: from zproxy120.enst.fr ([127.0.0.1]) by localhost (zproxy120.enst.fr [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 1VN9HJkofbls; Thu, 22 May 2014 10:59:09 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zproxy120.enst.fr (Postfix) with ESMTP id 5324D100544; Thu, 22 May 2014 10:59:09 +0200 (CEST) X-Virus-Scanned: amavisd-new at zproxy120.enst.fr Received: from zproxy120.enst.fr ([127.0.0.1]) by localhost (zproxy120.enst.fr [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id IMcP7Vl-UEVM; Thu, 22 May 2014 10:59:09 +0200 (CEST) Received: from localhost (bauxite.int-evry.fr [157.159.110.64]) by zproxy120.enst.fr (Postfix) with ESMTPSA id 2B2E2100541; Thu, 22 May 2014 10:59:09 +0200 (CEST) From: Olivier Berger To: Mark Walters Subject: Re: Improving spam-tagging keybinding function to act on region in emacs In-Reply-To: <87wqde6xup.fsf@qmul.ac.uk> References: <87oazb9k5f.fsf@inf-8660.int-evry.fr> <87mweuzy87.fsf@qmul.ac.uk> <87bnv92521.fsf@inf-8660.int-evry.fr> <87wqde6xup.fsf@qmul.ac.uk> User-Agent: Notmuch/0.18 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-pc-linux-gnu) Date: Thu, 22 May 2014 10:59:07 +0200 Message-ID: <87wqdechpg.fsf@inf-8660.int-evry.fr> 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: Thu, 22 May 2014 08:59:23 -0000 Mark Walters writes: > On Wed, 07 May 2014, Olivier Berger wrote: >>> >> >> Note that I'm now using the following : >> (define-key notmuch-search-mode-map "S" >> (lambda (&optional beg end) >> "mark messages in thread as spam" >> (interactive (notmuch-search-interactive-region)) >> (notmuch-search-tag '("+spam" "-inbox") beg end) >> (if (eq beg end) (notmuch-search-next-thread)))) >> >> This offers the possibility to jump to the next line when tagging >> individual lines, and not do so when acting on a region. >> >> Btw, such a difference in behaviour may be a tiny, but still nice >> improvement on the code of notmuch-search-archive-thread too. > > I think this is worth doing: do you want to send a patch? The above lisp > is fine but I would replace the "if" by "when". (The main difference is > that "when" cannot take an else clause so using when flags up that there > is not an else clause.) > > If the above is inconvenient then I am happy to post such a patch. > AFAI'm concerned, feel free to do so ;) Best regards, -- Olivier BERGER http://www-public.telecom-sudparis.eu/~berger_o/ - OpenPGP-Id: 2048R/5819D7E8 Ingenieur Recherche - Dept INF Institut Mines-Telecom, Telecom SudParis, Evry (France)