unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
To: notmuch@notmuchmail.org
Subject: Re: Display duplicate messages in emacs front-end
Date: Wed, 09 Nov 2022 11:55:36 -0500	[thread overview]
Message-ID: <875yfo83uf.fsf@fifthhorseman.net> (raw)
In-Reply-To: <878rkk89i1.fsf@fifthhorseman.net>


[-- Attachment #1.1: Type: text/plain, Size: 1664 bytes --]

On Wed 2022-11-09 09:53:26 -0500, Daniel Kahn Gillmor wrote:
> The functionality here, switching between duplicates in the emacs
> frontend, is great.  I needed to use it today, because i had two copies
> of an e-mail message, one with a valid signature and one with a damaged
> signature.  It Just Worked™ to let me switch between the different
> variants.

Now that i'm playing with this feature specifically, it occurs to me
that the primary use case is likely to be where there are two or maybe 3
duplicates of a given message.

In this use case, the emacs bindings could be a bit more ergonomic.

The current binding is '%', which then prompts the user for "duplicate:"
and the user is obliged to type in the number of the duplicate that they
want.

When i'm looking at duplicate 1/2, the obvious answer is i want 2/2.
when i'm looking at 2/2, i want 1/2.  The current interface, while nice
and fully flexible makes me do extra work :)

Here's a proposed update:

 - '%' on its own moves to duplicate n+1 (wrapping around from the max
   back to 1)

 - prefixed '%' (that is, 'C-u %') yields the current behavior where the
   user can enter which specific duplicate they want.

My elisp remains rudimentary at best, so i don't know that i know how to
make this fix (in particular, i'm not sure how i retrieve the current
values N/M, in order to calculate mod_M(N)+1), but i'd be happy to test
any patch that does this.

I don't know how people feel about changing the default keybindings on a
relatively recent feature -- would it be upsetting to users if the
behavior of % changed in this subtle way?

         --dkg

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2022-11-09 16:55 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-01 21:45 Display duplicate messages in emacs front-end David Bremner
2022-07-01 21:45 ` [PATCH 1/9] test: use notmuch_json_show_sanitize more places David Bremner
2022-07-01 21:45 ` [PATCH 2/9] test: define and use notmuch_sexp_*_sanitize functions David Bremner
2022-07-01 21:45 ` [PATCH 3/9] test: add new corpus of duplicate messages David Bremner
2022-07-05 10:07   ` David Bremner
2022-07-01 21:45 ` [PATCH 4/9] CLI/show: initial support for --duplicate for (raw output only) David Bremner
2022-07-01 21:45 ` [PATCH 5/9] CLI/show: support --duplicate for structured output David Bremner
2022-07-01 21:45 ` [PATCH 6/9] emacs/show: provide notmuch-show-choose-duplicate David Bremner
2022-07-01 21:45 ` [PATCH 7/9] emacs/show: display count of duplicates in headerline David Bremner
2022-07-01 21:45 ` [PATCH 8/9] CLI/reply: support --duplicate argument David Bremner
2022-07-01 21:45 ` [PATCH 9/9] emacs/reply: reply to correct duplicate David Bremner
2022-07-30 11:50   ` David Bremner
2022-07-02  1:47 ` Display duplicate messages in emacs front-end David Bremner
2022-11-09 14:53 ` Daniel Kahn Gillmor
2022-11-09 16:55   ` Daniel Kahn Gillmor [this message]
2022-11-09 20:58     ` Jameson Graef Rollins
2022-11-10  4:57       ` Daniel Kahn Gillmor

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=875yfo83uf.fsf@fifthhorseman.net \
    --to=dkg@fifthhorseman.net \
    --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).