Re: Cannot apply multiple tags to a selection in search view

Subject: Re: Cannot apply multiple tags to a selection in search view

Date: Mon, 26 May 2014 00:34:40 +0100

To: mailinglists@nawaz.org, notmuch@notmuchmail.org

Cc:

From: Mark Walters


Hi

I think notmuch-search-tag (and other tagging functions) were cleaned up
for 0.17: in particular their interactive behaviour
changed. notmuch-search-tag now only looks at the region if called
interactively. I think the following would do what you want

(define-key notmuch-search-mode-map "d"
  (lambda (beg end) "Delete message."
         (interactive (notmuch-search-interactive-region))
         (notmuch-search-tag '("+delete" "-inbox" "-lowpriority" "-@review" "-@respond" "-unread") beg end)))

Best wishes

Mark

On Sun, 25 May 2014, mailinglists@nawaz.org wrote:
> Hi,
>
> After upgrading to version 0.17, the following function that used to
> work fine in the past misbehaves when I select multiple messages:
>
> (define-key notmuch-search-mode-map "d"
>       (lambda ()
>         "Delete message."  (interactive) (notmuch-search-tag
>         '("+delete" "-inbox" "-lowpriority" "-@review" "-@respond"
>         "-unread"))))
>
> If I press "d", it only applies the tags to the message my cursor is
> on - not my whole message.
>
> If I manually execute the notmuch-search-tag command, it does work on
> the whole selection, though.
>
> Any ideas?
>
> Thanks!  _______________________________________________ notmuch
> mailing list notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch

Thread: