[Users] Patch proposal: deselect on delete
Luc Pardon
claws-user at skopos.be
Sun Nov 8 11:10:23 CET 2020
Hello,
I am a long-time Thunderbird user, fed up with it and looking for
an alternative. So I tried Claws Mail, compiled from the Fedora Source
RPM with 3.17.7. It looks promising, except for a few things.
Let me state up front that I don't mind a paradigm shift or two, learning new key shortcuts, config options etc., but it is essential that “my” mail client adapts to my workflow, and not the other way around. If it can't do that, it's not suitable for me.
In practice, and for me, that means that, when I delete a message, the
mail client must not select another one for me to read. I want to decide
that myself.
The deleted message should not disappear from the summary list, it must
only be marked as “deleted”. However, the message text *must* disappear
from the message window below.
Also, I want to be able to delete an unread message (using the context menu), without being forced to look at it. So here too, the text must not be loaded in the message window.
And just to be clear, by “delete” I mean not just “Message/Delete” but
also “Message/Move” (to trash or elsewhere). In all those cases, the
message is removed from the current folder.
More in general, the mail client must never automatically select - let
alone open - a message for me. That is my decision.
After fiddling with the Claws settings, I came close, except for the
selection thing. It kept jumping around and (un)helpfully selecting
what it thinks I need to read next. I found the “next_on_delete” hidden
preference and it looked promising, but no go.
So I had a look at the sources and used “next_on_delete” as my guide to
hack … err … patch the code.
Basically, I added a new “deselect_on_delete” preference. When set to
“0” (default), it does nothing. When set to “1”, it kind of disables the
current message selection logic. In pseudo-code, it goes something like
this:
if deselect_on_delete == TRUE
do essentially nothing
else if next_on delete == TRUE
select next as before
else
select previous as before
So this is not too invasive, I think, it just adds one "if/else"
branch to the existing logic.
Also, it is backwards-compatible with the current behavior. So people
who like the automatic selection can continue using it.
As for the code changes, I am almost there, except that I can't
seem to figure out why the message pane is cleared after a “delete” but
*not* after a “move to trash”.
As soon as I got that covered, I would be happy to upload
the patch somewhere (here or in Bugzilla) for review, criticism,
suggestions, ...
For now, I'd appreciate any pointers to the logic or the code that
actually loads the message pane,
I hope that this would be considered for inclusion in the “official”
code, so I don't have to keep maintaining a local patch forever and a
day.
Also, it's not just me who wants to work like that. Some background may
be in order here.
Many years ago, Thunderbird was “well-behaved” (says I :-), but then it
changed. All of a sudden, upon deletion, it selected the next message
and showed it in the message pane.
A bug report was filed but it got ignored. That was back in 2006 (!)
IIRC. I had almost decided to jump ship, but then somebody stepped in
and wrote an extension “Deselect on delete”, and that fixed it.
However, TB keeps changing their API every so often, breaking just
about all extensions, including the “Deselect on Delete” extension.
Eventually it got fixed every time – for now – but I have had enough.
If you search the web for “deselect on delete” and “Thunderbird”, you
will see that this extension is quite popular, and that the TB
developers draw a lot of flak for their outright and ongoing refusal to
make this even configurable for those who want it.
Also, it is entirely possible that there are other TB users out there
that are looking for a good successor, just because of this issue (hint
hint <g>).
Looking forward to your reactions,
Luc
More information about the Users
mailing list