vFolder in mutt containing all flagged messages from ~/Maildir

Personally I often mark messages which need to be worked on later (effort > 2 minutes in GTD speak) with a flag. As flags are preserved when syncronizing Maildirs over IMAP with offlineimap I can mark them both over IMAP client or locally with mutt.

I have multiple email accounts with a lot of subfolders under my ~/Maildir in Maildir++ format. As mutt currently does not has a concept of virtual folders I cannot have a quick overview of all flagged messages across my Maildir++ folder structure out of the box.

I found a partial solution to this problem in a LinuxJournal article. It proposed to just create a dummy maildir and symlink flagged messages there, pointing to the real location. As long as you don’t alter something in the dummy / virtual folder mutt works quite happy with it. But when you start replying or unflagging in your virtual folder mutt changes the name of the symlink instead of the real message in the source folder and the information gots lost on the next run of the script.

Continue reading “vFolder in mutt containing all flagged messages from ~/Maildir”

Fehler bei Fließkomma-Berechnungen auf x86-Architektur

Der Eintrag "Fließender Ärger" des Hostbloggers machte mich schon etwas stutzig. Zur Erinnerung, das war:

#include "stdio.h"

void main()
{
    float f = 35.91;
    printf("%.2f => %i / %i\n", f, (int)(f*100), (int)(f*1000));
    // erwartet: 35.91 => 3591 / 35910
    // tatsächlich: 35.91 => 3590 / 35909
};

Die in den Kommentaren geäußerte Vermutung, das in diesem speziellen Fall ein Float-Rundungfehler vorliegt, ist hier zwar richtig, es kann aber auch eine ganz andere Ursache haben.

Continue reading “Fehler bei Fließkomma-Berechnungen auf x86-Architektur”

Copy birthday custom field on palm to akonadi/kpilot/kontact

As described in one of my previous blog posts the automatic syncronisation of palms custom fields with kpilot is a bit broken.

Fourtunately all the adressbook information from palm handheld is stored in the VCARD information on KDE/akonadi in special X-Field like X-KPILOT-CUSTOM0.

So I have written a script which parses the pilot custom field in the akonadi VCARD and adds an additional BDAY header there (BDAY is the offical data field for VCARDs for birthday information which is also used by kontact). You can fetch the script out of my git repository.