Created attachment 1204 [details] Allow NULL name for address completion For a caller of addrbook_add_contact() (like the address-keeper plugin), it is impossible to enter a new address with an empty name, so that it shows up in the address completion, without doing a complete addressbook reload (claws-mail restart). addrbook_add_contact() via addritem_person_set_common_name() and mgu_replace_string() strips the name to NULL. However, a NULL name invariably triggers a condition in addr_compl.c:add_address(), causing the address to be dropped from the address completion cache: - if (!name || !address) { - if (address || nick || alias || !grp_emails) - return -1; I don't really understand the condition, especially when comparing it to what it was in 3.8.0. A patch will follow which collapses the condition to something that seems to make sense, and which sets a NULL name to the empty string, as is expected in that code path. This patch, along with a change that adds an address book refresh to the address keeper plugin, allows the plugin to immediately update address completion with new addresses.
Created attachment 1205 [details] FYI, the mentioned patch for the address_keeper plugin (FYI, attached patch that applies to the address_keeper plugin. This is just related to the proposed change, but neither depends on the other.)
I think my ML post has a much clearer description of what this is: http://lists.claws-mail.org/pipermail/users/2012-December/004801.html " I was annoyed by the fact that the address keeper plugin fails to push new addresses into the address completion immediately. [...] Basically, to get immediate updates working, the address-keeper plugin should refresh the address book [second attached patch]. But if the 'name' of the recipient is empty, claws-mail still drops it from address completion because of some obscure condition in addr_compl.c, and that's what my patch for claws-mail tries to fix [first attached patch]. With both patches applied, it works the way I'd expect it to, crossing fingers against any adverse effects. "
Changes related to this bug have been committed. Please check latest CVS and update the bug accordingly. You can also get the patch from: http://www.claws-mail.org/tracker/ 2012-12-10 [mones] 3.9.0cvs45 * src/addr_compl.c Fix bug #2835 (core part) to allow NULL names which have an address