[Brainstorm] Call for scripts for kontact suite ....

Martijn Klingens klingens at kde.org
Wed Aug 3 10:18:13 CEST 2005


On Tuesday 02 August 2005 22:37, Kun Xi wrote:
> You don't need to care for the detail, just describe the panorama of
> object map, method, property you expects. We are going to consider you
> suggestion during the development.

When using Sieve mail filters you cannot automatically mark mail as read when 
it comes in, a trigger upon each check for new mail that does that for a 
number of folders would be great. The nicest approach would be one that hooks 
in the code before the screen is updated, so you never see the unread mail 
count above zero for the given folders. Since checking mail and opening a 
folder are two distinct actions in IMAP this has to be done sequentially and 
is thus very complex to do. In pseudo code it'd be something like

Folder.aboutToChangeUnreadCount( newUnreadCount )
begin
    queue markAllAsRead action
    set newUnreadCount = 0
    update GUI (i.e. you don't see the new mail)
end

Folder.markAllAsRead
begin
    open folder
    for mail in all unread mails
    do
        mail.markAsRead
    done
    if there are still mails unread (errors!) set the unread count to the \
              remaining amount and now *DO* update the GUI.
end

Another use case would be my way of expiring mailing list mails: I create a 
folder 'Core Devel 2005 08' for August and move the mails from August there 
in October. I.e. I keep at most 2 months in my main folder, then it gets 
moved to the archive, and after 3 months of archiving I remove the oldest 
archive folder. Non mailing list mails also eventually end up in Archive, but 
less frequent, and never get removed. Since this is obviously beyond KMail's 
own capabilities and also partly a very personal workflow it would be nice to 
be able to script this.

A last example would have been very useful at my previous job: custom body 
part formatters for several types of automated mails to give them decent 
markup and possibly even some 'intelligence'.

-- 
Martijn


More information about the Kde-soc mailing list