[Users] shortcut to go to a specific folder

Milan Obuch claws-mail-users at dino.sk
Thu May 27 07:40:03 CEST 2021


On Wed, 26 May 2021 13:00:49 -0400, George Avrunin
<avrunin at math.umass.edu> wrote:

> I have several IMAP accounts, most of which have a lot of subfolders,
> and usually enough of them are expanded in the Folder list that not
> all the accounts are visible at once. I'd like to be able to define
> keyboard shortcuts to go, for instance, to the inbox for the last
> account in the list, and back to the inbox for the first account.
> What's the best way to do that? (If I use the "g" shortcut to go to
> a folder, I have to either type enough of the folder name to make it
> unique, or select from the list in the popup window. I'd like to
> avoid those.)
> 
> Thanks,
> 
>   George

Hi, George,

I think you know 'G' keyboard shortcut... easy to use when desired
folder is INBOX of first account (top one in display). G then Home then
arrow down Enter... similarly folder at bottom use End instead of Home.
As you most probably already found, everything in between is not so
easy.

I looked a bit in Claws' menu and I found nothing more. Maybe you can
create an action for this one, I did not find how. I am a bit biased -
for everything special I need not found in standard Claws Mail I use Lua
scripting plugin I wrote, not yet part of official Claws distribution.

With my plugin, this action is basically a one liner script:

clawsmail.folderview_select(clawsmail.folder('#imap/account/INBOX/folder/subfolder'))

There is one problem, currently - you need to add this action as button
into main window toolbar in order to be usable. While it can be added
as menu item and you are able to assign a keyboard shortcut for it
then, this code is disabled because of crash on plugin unload. This
happens somewhere in main Claws' after plugin is unloaded, I need to
investigate the issue, which is harder than writing the plugin :)

So if you'd like to try it, you are welcome - you just need to build
from sources. Grab Claws' tarball, get plugin's sources from message to
claws' devel mailing list (Subject: Lua plugin goes public (enhanced),
Date: Tue, 11 May 2021 21:47:59 +0200), and build Claws Mail as usual.
Again, if you decide to try, any feedback is welcome.

Regards,
Milan


More information about the Users mailing list