unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Jesse Rosenthal <jrosenthal@jhu.edu>
To: Carl Worth <cworth@cworth.org>, notmuch@notmuchmail.org
Subject: Re: [PATCH v2] notmuch.el: add functionality in notmuch search mode to add or remove tags by region
Date: Fri, 09 Apr 2010 10:11:00 -0400	[thread overview]
Message-ID: <877hogaf7v.fsf@jhu.edu> (raw)
In-Reply-To: <87aatfq88h.fsf@yoom.home.cworth.org>

On Wed, 07 Apr 2010 14:10:38 -0700, Carl Worth <cworth@cworth.org> wrote:
> On Tue, 16 Feb 2010 19:07:40 -0500, Jesse Rosenthal <jrosenthal@jhu.edu> wrote:
> I think this feature is very useful, and that the region is definitely
> an appropriate way to implement it, (doing region-based operations is
> very natural for emacs users). Mutt-style marking could be implemented
> as well, but that would be separate I think.

Great -- never sure if my intuitive use corresponds with that of others.

> I also don't like the duplication of code in
> notmuch-search-add-tag-thread and notmuch-search-add-tag-region, (and
> the same in the remove case). Fortunately, I think this easy to avoid by
> simply making notmuch-search-add-tag-thread call:
> 
>        (notmuch-search-add-tag-region tag (point) (point))
> 
> and the same in the remove case.

Good idea.

> 
> But I haven't pushed this patch yet for a flaw in the case of selecting
> beyond the last thread, (such as selecting to the line that includes the
> "End of search results). If I try an operation on that line, it will act
> like it works, (it displays the new tags by all threads), but then a
> refresh makes them all disappear again. Presumably the "notmuch tag"
> command is failing, this isn't being noticed, and the code marches on to
> update the representation of the tags.

Good point, and shouldn't be too hard to fix. It seems like it could be
done either (a) at the lisp level (filtering out the blank entries), or
(b) at the literal buffer level (having a step that sets point-max for
the region appropriately). The choice (a) seems clearer in an abstract
way, but has the downside of needing to be repeated twice (both for
database tagging, and for rewriting the tags on the screen). I'll play
with both and see which is clearer.

Best,
Jesse

  reply	other threads:[~2010-04-09 13:11 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-20 20:58 [PATCH] notmuch.el: add functionality to add or remove tags by region Jesse Rosenthal
2010-01-21 11:27 ` Jesse Rosenthal
2010-01-21 15:23 ` Jameson Rollins
2010-01-21 15:35   ` Jesse Rosenthal
2010-01-21 15:56     ` Jameson Rollins
2010-01-21 16:07       ` Jesse Rosenthal
2010-01-21 16:10         ` Jesse Rosenthal
2010-02-17  0:07 ` [PATCH v2] notmuch.el: add functionality in notmuch search mode " Jesse Rosenthal
2010-02-17 12:12   ` [PATCH] notmuch.el: bind 'd' to new function notmuch-search-delete-thread-or-region Sebastian Spaeth
2011-07-15  4:11     ` anarcat
2011-07-19 19:48       ` Matthieu Lemerre
2011-07-16 18:39     ` [PATCH 1/2] add notmuch keybinding 'd' Antoine Beaupré
2012-01-03 14:56       ` David Edmondson
2012-01-03 19:57         ` Jani Nikula
2012-01-03 21:35           ` Jameson Graef Rollins
2012-01-04  8:27             ` Jani Nikula
2012-01-06 20:10           ` Antoine Beaupré
2012-01-06 20:20             ` Jameson Graef Rollins
2012-01-06 20:51             ` David Bremner
2012-01-17  5:02               ` Antoine Beaupré
2012-01-06 21:33             ` Jani Nikula
2012-01-06 21:40             ` Tomi Ollila
2012-01-04  8:52         ` David Edmondson
2012-01-17  5:03           ` Antoine Beaupré
2010-04-07 21:10   ` [PATCH v2] notmuch.el: add functionality in notmuch search mode to add or remove tags by region Carl Worth
2010-04-09 14:11     ` Jesse Rosenthal [this message]
2010-04-13 17:55       ` Carl Worth
2010-04-13 18:00         ` Jesse Rosenthal
2010-04-13 18:47         ` [PATCH] Fix bug, and clean up code duplication, in adding or removing tag " Jesse Rosenthal
2010-04-14 17:14           ` Carl Worth
2010-04-14 17:50             ` Jesse Rosenthal
2010-04-14 19:23               ` Mark Anderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877hogaf7v.fsf@jhu.edu \
    --to=jrosenthal@jhu.edu \
    --cc=cworth@cworth.org \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).