Improving spam-tagging keybinding function to act on region in emacs
Olivier Berger
olivier.berger at telecom-sudparis.eu
Thu May 22 01:59:07 PDT 2014
Mark Walters <markwalters1009 at gmail.com> writes:
> On Wed, 07 May 2014, Olivier Berger <olivier.berger at telecom-sudparis.eu> 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)
More information about the notmuch
mailing list