Re: Display duplicate messages in emacs front-end

2022-11-09 Thread Daniel Kahn Gillmor
On Wed 2022-11-09 12:58:18 -0800, Jameson Graef Rollins wrote:
> Personally I think it would make sense to have % cycle through
> duplicates, with some indicator of which duplicate we're currently on.
> I wouldn't even bother with the suggested prefixed behavior if we just
> had the cycle behavior.

In my notmuch-show buffer, there already is an indicator in the
right-hand side of any message that has duplicates, so that part doesn't
require any extra work.

In the event that i get a malicious load of dozens of duplicates and i
identify that one of them is of particular interest, i might want the
current behavior available so that i can get back to "duplicate 17"
without hitting '%' 16 times in a row.  But i haven't had that situation
happen yet -- the other situation with a pair of dups is much more
common.

it even happened with this message i'm replying to here, b/c one copy of
the message came straight from Jamie's MUA and the other was routed
through the mailing list.  It'd be kind of nice in a nerdy way to make
the mailman footer disappear and reappear just by hitting '%' ☺

--dkg


signature.asc
Description: PGP signature
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: Display duplicate messages in emacs front-end

2022-11-09 Thread Jameson Graef Rollins
On Wed, Nov 09 2022, Daniel Kahn Gillmor  wrote:
> 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?

Personally I think it would make sense to have % cycle through
duplicates, with some indicator of which duplicate we're currently on.
I wouldn't even bother with the suggested prefixed behavior if we just
had the cycle behavior.

Also thanks to folks for working on this.

jamie.
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: Display duplicate messages in emacs front-end

2022-11-09 Thread Daniel Kahn Gillmor
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


signature.asc
Description: PGP signature
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: Display duplicate messages in emacs front-end

2022-11-09 Thread Daniel Kahn Gillmor
On Fri 2022-07-01 18:45:39 -0300, David Bremner wrote:
> This obsoletes the WIP series [1]. Compared to that series, this one
> includes somewhat improved documentation, better error handling, and
> implements the --duplicate argument for notmuch-reply, and uses it in
> the emacs front end.
>
> [1]: id:20220619232152.846823-1-da...@tethera.net

I wanted to send a (belated) thanks for this series!

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.

Many thanks for having taken the time and effort to get this thing
right.

   --dkg


signature.asc
Description: PGP signature
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: Display duplicate messages in emacs front-end

2022-07-01 Thread David Bremner
David Bremner  writes:

> This obsoletes the WIP series [1]. Compared to that series, this one
> includes somewhat improved documentation, better error handling, and
> implements the --duplicate argument for notmuch-reply, and uses it in
> the emacs front end.
>
> [1]: id:20220619232152.846823-1-da...@tethera.net

I should mention that this branch applies on top of branch "next". There
are several emacs related changes in progress at the moment, and it's a
bit tricky to avoid conflicts, so I've pushed version of the lazy-show
changes (plus some other housekeeping) to the "next" branch (in the
usual repo).

d
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org