Created attachment 60628 [details] Solves problem and adds 'includenickname' functionality Version: 4.4 (using KDE 4.5.5) OS: FreeBSD kabcclient --list --of mutt reports alias jdoe John John <jdoe@example.com> instead of alias jdoe John Doe <jdoe@example.com> It behaves like that despite the 'altkeys' option being used or not. Reproducible: Always Steps to Reproduce: Run kabcclient --list --of mutt Actual Results: alias jdoe John John <jdoe@example.com> Expected Results: alias jdoe John Doe <jdoe@example.com> The code at kdepim-4.4.11.1/console/kabcclient/src/outputformatimpls.cpp said: stream << fromUnicode(m_codec, addressee.givenName()) << " " << fromUnicode(m_codec, addressee.familyName())<< " <" << fromUnicode(m_codec, *it) << ">"; For some reason the stream would get corrupted and either repeat the second parameter or put garbage instead of it (in some tests). The solution was splitting the call to the stream as in: stream << fromUnicode(m_codec, addressee.givenName()) << " "; stream << fromUnicode(m_codec, addressee.familyName())<< " <" << fromUnicode(m_codec, *it) << ">"; Also, I wanted to have aliases for nicknames, so if John Doe has a nick name johnny, I can have also alias johnny Joe Doe <jdoe@example.com> To that purpose the attached patch adds the option 'includenickname'. Thanks!
Created attachment 60711 [details] Improved version of the patch Some email addresses were still wrong.
CC'ing Kevin. He might be interested in this patch.
Git commit 884830bb81780562acd7d0a8d691b48f61cac085 by Kevin Krammer. Committed on 14/06/2011 at 23:23. Pushed by krake into branch 'master'. Fix ouput corruption Returning the internal data of a QByteArray from a local function caused strange results such as output being repeated. Fix by returning the QByteArray and calling its constData() when streaming into the Std C++ output stream BUG: 274937 M +32 -32 console/kabcclient/src/outputformatimpls.cpp http://commits.kde.org/kdepim/884830bb81780562acd7d0a8d691b48f61cac085
Git commit 09f807dfb1257ba500afea00a4b34bdb529fd8cf by Kevin Krammer. Committed on 14/06/2011 at 23:23. Pushed by krake into branch '4.6'. Fix ouput corruption Returning the internal data of a QByteArray from a local function caused strange results such as output being repeated. Fix by returning the QByteArray and calling its constData() when streaming into the Std C++ output stream BUG: 274937 M +32 -32 console/kabcclient/src/outputformatimpls.cpp http://commits.kde.org/kdepim/09f807dfb1257ba500afea00a4b34bdb529fd8cf
Git commit 5f861c00ebae7390a3b938f6dbca39e342dce37b by Kevin Krammer. Committed on 30/07/2011 at 13:25. Pushed by krake into branch 'master'. Add additional options to Mutt output Incorporating an extension by Fernando Schapachnik which adds options to Mutt output for using addressees' nick names instead or additional to Mutt aliases. FEATURE: 274937 CCMAIL: fernando@schapachnik.com.ar DIGEST: Users who use kabcclient to access KDE's address book from Mutt can now get a contact's nick name (if it exists) instead of or additional to the usual alias key. E.g. if there is a contact John "Jonny" Doe <j.doe@example.com> the instead of JohDoe John Doe <j.doe@example.com> one can now get either (new option 'prefernick') Jonny John Doe <j.doe@example.com> or (new option 'alsonick') JohDoe John Doe <j.doe@example.com> followed by Jonny John Doe <j.doe@example.com> M +87 -12 console/kabcclient/src/outputformatimpls.cpp M +39 -2 console/kabcclient/src/outputformatimpls.h http://commits.kde.org/kdepim/5f861c00ebae7390a3b938f6dbca39e342dce37b
Git commit b9af2b26277ae96ef4e84302665f8bd8767c383e by Torgny Nyblom, on behalf of Kevin Krammer. Committed on 30/07/2011 at 13:25. Pushed by tnyblom into branch 'htmlreplies'. Add additional options to Mutt output Incorporating an extension by Fernando Schapachnik which adds options to Mutt output for using addressees' nick names instead or additional to Mutt aliases. FEATURE: 274937 CCMAIL: fernando@schapachnik.com.ar DIGEST: Users who use kabcclient to access KDE's address book from Mutt can now get a contact's nick name (if it exists) instead of or additional to the usual alias key. E.g. if there is a contact John "Jonny" Doe <j.doe@example.com> the instead of JohDoe John Doe <j.doe@example.com> one can now get either (new option 'prefernick') Jonny John Doe <j.doe@example.com> or (new option 'alsonick') JohDoe John Doe <j.doe@example.com> followed by Jonny John Doe <j.doe@example.com> M +87 -12 console/kabcclient/src/outputformatimpls.cpp M +39 -2 console/kabcclient/src/outputformatimpls.h http://commits.kde.org/kdepim/b9af2b26277ae96ef4e84302665f8bd8767c383e