[Users] How does Status field in message summary work?

Milan Obuch claws-mail-users at dino.sk
Wed Mar 17 11:32:41 CET 2021


On Mon, 15 Mar 2021 12:59:04 +0100 I wrote:

> On Mon, 15 Mar 2021 11:47:02 -0000, Paul <claws at thewildbeast.co.uk>
> wrote:
> 
> > On Mon, 15 Mar 2021 12:43:59 +0100
> > Milan Obuch <claws-mail-users at dino.sk> wrote: 
> > 
> > > And what about such use case when 'keep sent mail in this folder'
> > > is checked per folder? For me it looks broken.  
> > 
> > No, it's not broken. If you 'keep sent mail in this folder' then why
> > do you need to search? If you do need to search, use the quicksearch
> > in that folder.
> > 
> 
> Sorry, I disagree here.
> 
> Yes, I need not to search for this message, reply is usually just
> below the original message.
> 
> But tooltip on this small icon says 'Replied - click to see reply' and
> clicking it brings you actually away, with no way to get back. This is
> misleading, at least.
> 
> Thus my question - could this, which looks like hard coded, link to
> Sent folder be somehow changed? Or, first, smaller step, how is this
> link being assembled, where are bits for that link located?
>

[ Follow-up to my mail ]

Just an additional note...

While I'd like to get an answer to my question, my problem looking for
reply message is solved now... guess what... yes! With two small Lua
scripts! Now I can quickly find reply message and move it into the
folder with an original message, as I wish.

For the curious:

lua/main/search does following steps:

- gets msgid from message selected (maybe it is possible to work on
  multiple selected messages, maybe the for cycle could be rewritten in
  more compact manner, current implementation works well for one
  message selected, if more than one message is selected, last one is
  used)
- saves current location (folder selected in folder view) into global
  variable SavedFolder
- selects folder, where reply could be reasonably expected (you should
  know a bit from history :) anyway)
- sets up quick search

-- 8< ------------------------------------------------------------------
local msgid
for _, msg in pairs(clawsmail.summaryview_selected_messages)
 do
  if (type(msg) == 'userdata')
  then
   if (msg.__type == 'clawsmail.msg_info')
   then msgid = msg.msgid end
  end
 end
SavedFolder = clawsmail.folderview_selected
local folder = clawsmail.folder('#imap/account/INBOX/folder')
clawsmail.folderview_select(folder)
clawsmail.quicksearch('h ' .. msgid,'Extended')
-- 8< ------------------------------------------------------------------

So all I need to do now is look into folders marked with looking glass
in folder view and select message(s) I am interested on to move.

lua/main/move just moves selected message(s) into folder where an
original message is located, selects this folder and clears quicksearch.

-- 8< ------------------------------------------------------------------
clawsmail.move_messages(clawsmail.summaryview_selected_messages,SavedFolder)
clawsmail.folderview_select(SavedFolder)
clawsmail.quicksearch()
-- 8< ------------------------------------------------------------------

I have both scripts bound to toolbar buttons, so I can locate, select
and move message(s) as desired in as little as three clicks. Real time
saver.

Regards,
Milan

N. B. I am glad I chose Claws Mail as my mail client years ago, when
kmail bloat started to be show stopper for me. Some time was necessary
for me to get used to it, but now, with my Lua plugin, I can't imagine
any other mail client performing better for me.


More information about the Users mailing list