Announcement

Collapse
No announcement yet.

Kde 4.9.00 Address autocompletion in Kontact/Kmail

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED] Kde 4.9.00 Address autocompletion in Kontact/Kmail

    Kubuntu 12.04 64-bit, fully dist-upgraded.

    Added the ppa:kubuntu-ppa/backports repository this morning and upgraded to KDE 4.9.00. Rebooted when finished and am now using KDE 4.9.00 in all it's newness. The enhancements to Dolphin are nice. Kontact/Kmail (with akonadi) are running just fine. What is still missing there, is the ability to select recipients from your Contacts 'on the fly' when typing -- it still doesn't search your Contacts. I really don't know why this 'basic' function still hasn't been fixed.
    Windows no longer obstructs my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    #2
    Have you configured Nepomuk to index your email?

    Comment


      #3
      https://git.reviewboard.kde.org/r/105508/
      Disable autocompletion-via-nepomuk until it is fast and does not block further nepomuk queries (such as the ones run when clicking Send in kmail composer).
      sigpic

      Comment


        #4
        Meaning it is still 'in the works'?
        Windows no longer obstructs my view.
        Using Kubuntu Linux since March 23, 2007.
        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

        Comment


          #5
          I guess so
          sigpic

          Comment


            #6
            There seems to be a patch for fixing autocompletation without nepomuk:
            Code:
            diff -Nru kdepim-4.8.97/messagecomposer/composerlineedit.cpp kdepim-4.8.97.new/messagecomposer/composerlineedit.cpp
            --- kdepim-4.8.97/messagecomposer/composerlineedit.cpp    2012-06-25 22:30:06.000000000 +0200
            +++ kdepim-4.8.97.new/messagecomposer/composerlineedit.cpp    2012-07-30 16:31:18.832547093 +0200
            @@ -33,6 +34,12 @@
             #include <kabc/contactgroup.h>
             #include <kabc/vcardconverter.h>
             
            +#include <Akonadi/Collection>
            +#include <Akonadi/RecursiveItemFetchJob>
            +#include <Akonadi/ItemFetchScope>
            +
            +#include <Nepomuk/ResourceManager>
            +
             #include <kio/netaccess.h>
             #include <kmenu.h>
             #include <kurl.h>
            @@ -256,6 +263,26 @@
                   addContact( addr, weight, idx );
                 }
               }
            +
            +  // Nepomuk missing, fallback
            +  if ( !Nepomuk::ResourceManager::instance()->initialized() ){
            +    Akonadi::RecursiveItemFetchJob *job =
            +    new Akonadi::RecursiveItemFetchJob( Akonadi::Collection::root(),
            +                                        QStringList() << KABC::Addressee::mimeType() );
            +    job->fetchScope().fetchFullPayload();
            +
            +    KABC::Addressee::List contacts;
            +    if ( !job->exec() ) {
            +      return;
            +    }
            +
            +    const int idx = addCompletionSource( i18n( "Contacts" ), 10);
            +    foreach ( const Akonadi::Item &item, job->items() ) {
            +      if ( item.isValid() && item.hasPayload<KABC::Addressee>() ) {
            +        addContact( item.payload<KABC::Addressee>(), 10, idx );
            +      }
            +    }
            +  }
             }
             
             void ComposerLineEdit::setRecentAddressConfig ( KConfig* config )
            I'll try it , and report back
            sigpic

            Comment


              #7
              Thank you!
              Windows no longer obstructs my view.
              Using Kubuntu Linux since March 23, 2007.
              "It is a capital mistake to theorize before one has data." - Sherlock Holmes

              Comment


                #8
                Hey, I'm glad to see that coming.

                Comment


                  #9
                  No good, with/out nepomuk :mad:
                  https://bugs.kde.org/show_bug.cgi?id=259949
                  sigpic

                  Comment


                    #10
                    Well, thank you for trying.

                    I don't understand why such a basic feature of a mail client seems to be so difficult to get incorporated into Kontact/Kmail. But, I'm not a developer/programmer, so I'll just continue to wait.
                    Windows no longer obstructs my view.
                    Using Kubuntu Linux since March 23, 2007.
                    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                    Comment


                      #11
                      I'll try reverting that commit, and see if that helps. Rather misterious issue, according to comments in that bug report
                      EDIT:
                      Just to add - i've test the patch against master kdepim, it might work with 4.9.0
                      There have been changes since 4.9 branching so that might be it
                      Last edited by sumski; Aug 04, 2012, 02:42 PM.
                      sigpic

                      Comment


                        #12
                        Guess what? Now it's working
                        I've disabled completion with recent adresses, and completation via addressbook suddenly started to work (this is with the mentioned patch)
                        sigpic

                        Comment


                          #13
                          That's interesting, and leads me to a 'thought': What if instead of storing 'recent address' in nepomuk or where ever they are kept, Kontact was modified to save 'recent addresses' that DO NOT ALREADY EXIST in ones contacts, to a special Contact folder: Recent Addresses. In this way, the conflicting code of searching recent addresses vs ones contacts can be avoided. Kontact/Kmail would just search for auto-completion within ones Contacts.

                          Added:
                          I've added my suggestion to https://bugs.kde.org/show_bug.cgi?id=259949
                          Last edited by Snowhog; Aug 04, 2012, 03:18 PM.
                          Windows no longer obstructs my view.
                          Using Kubuntu Linux since March 23, 2007.
                          "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                          Comment


                            #14
                            I don't know, i don't even can remeber what lead to this 'success'. Works - WITH patch AND nepomuk enabled AND with/out recent addresses completion.
                            In the meanwhile,i've disabled nepomuk for akonadi, killed my akonadi contact resources, recreated them, changed value in
                            $KDEHOME/share/config/akonadi_nepomuk_feederrc
                            from
                            InitialIndexingComplete=true
                            to
                            InitialIndexingComplete=false
                            re-enable nepomuk for akonadi, and for now, it works.
                            Will test again without the patch
                            sigpic

                            Comment


                              #15
                              Snowhog, no patching required -
                              edit, or create
                              $KDEHOME/share/config/kpimcompletionorder
                              and add:
                              Code:
                              [General]
                              UseNepomuk=true
                              sigpic

                              Comment

                              Working...
                              X