Package: lbdb Version: 0.37 Severity: normal Tags: patch I have VCards with no "real name" for mailing lists, and I'd prefer to keep them that way. I found that the attached patch successfully lets mutt send mail to such entries without inserting a bogus "(null)" realname part.
First, the patch uses sed instead of a shell "while read" loop, because the read builtin mangles whitespace. Then the trick is to use a single space character (" ") as the realname part: mutt's strtok-based parser for the query output will interpret "foo\t\t(VCF)" as having realname "(VCF)", so the realname part can't be empty, but if it's a space then mutt will correctly treat the address as not having a realname part. (That's probably better implemented by fixing vcquery.c to output a space if fullname is null, but m_vcf still needs to quit using the "read" builtin.) This patch also adds the -e flag to the grep invocation so that a query like "-dev" is correctly interpreted as a regex, not as additional grep arguments. That's unrelated, and I suspect other lbdb backends need similar fixes too. I hope you'll apply this patch. Thanks! Jamey -- System Information: Debian Release: wheezy/sid APT prefers testing APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.38+ (SMP w/2 CPU cores) Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages lbdb depends on: ii libc6 2.11.2-11 Embedded GNU C Library: Shared lib ii libvformat1 1.13-6 dummy transitional package for lib ii perl 5.10.1-20 Larry Wall's Practical Extraction lbdb recommends no packages. Versions of packages lbdb suggests: pn abook <none> (no description available) pn finger <none> (no description available) pn libnet-ldap-perl <none> (no description available) pn libpalm-perl <none> (no description available) ii mutt 1.5.21-4 text-based mailreader supporting M pn procmail <none> (no description available) -- no debconf information
--- /usr/lib/lbdb/m_vcf 2010-05-18 11:12:15.000000000 -0700 +++ m_vcf 2011-04-29 14:21:35.007548516 -0700 @@ -38,11 +38,6 @@ fi fi - $cmd | grep -i "$QUERY" | ( - while read match - do - echo "$match (VCF)" - done - ) + $cmd | grep -ie "$QUERY" | sed 's/(null)$/ /; s/$/\t(VCF)/' done }
signature.asc
Description: Digital signature