unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH v2 0/2] Jump tagging
@ 2016-09-18 17:04 Mark Walters
  2016-09-18 17:04 ` [PATCH v2 1/2] emacs: add tag jump menu Mark Walters
  2016-09-18 17:04 ` [PATCH v2 2/2] emacs: tag: allow non-automatically-reversible tag operations Mark Walters
  0 siblings, 2 replies; 5+ messages in thread
From: Mark Walters @ 2016-09-18 17:04 UTC (permalink / raw)
  To: notmuch

This is version 2 of the patch
id:1474146583-28476-1-git-send-email-markwalters1009@gmail.com

I have tried to respond to most of the feedback. Most of the changes
are folded in to the first patch, which does the basic jump
tagging. The second patch is an attempt at allowing non-automatically
reversed tagging operations. Note neither patch is properly documented
yet.

Changes are

1) I added some more default operations in the tagging jump map, for spam and flagged.

2) You can now specify the tag changes either as a list, or as a
variable name which is the list of tag changes. For example "a" in the
tagging jumpmap is now bound to the notmuch-archive-tags so
automatically picks up the users choice of archive tags.

3) As ctrl-u is often cumbersome, and as you may decide you want to
reverse a tag operation once you are already in the tag jump map, "r"
jumps to the reverse tag map (r again returns you to the forward map)

4) The jump tag list now appears in the order they are listed in the
variable (rather than the reverse order).

5) Omit the tick box option for the name, and just have it always used,
but if the user leaves it empty the tag changes (or the variable name)
will be used as the name.

The main change I did not make was to make any of these a toggle: I
think r as reverse is sufficient and a toggle will do weird things in
too many cases. This way it is clear that "k d" *always* add the
deleted tag, whereas "k r d" always removes it.

Finally, bremner asked about non-reversible changes. I have
implemented it as follows. When you specify the tag changes you can
use any of +tag -tag #tag and =tag. The latter two mean +tag and -tag
when done forward but are omitted when reversed.

Thus, for example, "d" for deleted is set (by default) as +deleted
=inbox which means "k d" does "+deleted -inbox" but the reverse
operation "k r d" just does "-deleted" (i.e., it does not do +inbox).

The final code is a little ugly, because it has several cases to
consider, I think for a user it is all quite straightforward. Indeed,
if a user doesn't know about #,= prefixes then they lose nothing.

(There is one potential breakage: if people have any of the automatic
tags (unread,archive etc) setup so that they include tags starting =
or # and they don't specify the + or - for them (we default to +) then
the unarchive function will break. Given the benefits, and the pretty
unusual nature of this setup, this is probably acceptable)

Best wishes

Mark


Mark Walters (2):
  emacs: add tag jump menu
  emacs: tag: allow non-automatically-reversible tag operations

 emacs/notmuch-lib.el  |  4 +++
 emacs/notmuch-show.el |  1 +
 emacs/notmuch-tag.el  | 99 ++++++++++++++++++++++++++++++++++++++++++++++-----
 emacs/notmuch-tree.el |  1 +
 emacs/notmuch.el      |  1 +
 5 files changed, 97 insertions(+), 9 deletions(-)

-- 
2.1.4

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-03-11 14:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-18 17:04 [PATCH v2 0/2] Jump tagging Mark Walters
2016-09-18 17:04 ` [PATCH v2 1/2] emacs: add tag jump menu Mark Walters
2016-09-20  1:18   ` David Bremner
2016-09-18 17:04 ` [PATCH v2 2/2] emacs: tag: allow non-automatically-reversible tag operations Mark Walters
2017-03-11 14:45   ` David Bremner

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).