Bug#514796: vim-scripts: lbdbq.vim does not check for existence of lbdbq

Stefano Zacchiroli zack at debian.org
Wed Feb 11 08:37:45 UTC 2009


tag 514796 + pending
thanks

On Tue, Feb 10, 2009 at 11:36:40PM +0100, Christian Brabandt wrote:
> I recently stumbled over this error, that lbdbq.vim is not checking
> for the existence of lbdbq and therefore will fail without any obvious
> reason. 

Thanks for the report, it is now fixed in vim-scripts VCS.

However, your patch had to be changes because it doesn't stop the
execution of the (not existent) lbdbq, hence cluttering the user with
useless errors. The attached patch is what I've committed.

Cheers.

-- 
Stefano Zacchiroli -o- PhD in Computer Science \ PostDoc @ Univ. Paris 7
zack@{upsilon.cc,pps.jussieu.fr,debian.org} -<>- http://upsilon.cc/zack/
Dietro un grande uomo c'è ..|  .  |. Et ne m'en veux pas si je te tutoie
sempre uno zaino ...........| ..: |.... Je dis tu à tous ceux que j'aime
-------------- next part --------------
#! /bin/sh /usr/share/dpatch/dpatch-run
## lbdbq-detect-lbdbq.dpatch by Stefano Zacchiroli <zack at debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: detect (the absence of) the lbdbq executable

@DPATCH@
diff -urNad vim-scripts~/plugin/lbdbq.vim vim-scripts/plugin/lbdbq.vim
--- vim-scripts~/plugin/lbdbq.vim	2009-02-11 09:34:45.794744601 +0100
+++ vim-scripts/plugin/lbdbq.vim	2009-02-11 09:35:05.622746011 +0100
@@ -14,6 +14,10 @@
 " queries lbdb with a query string and return a list of pairs:
 " [['full name', 'email'], ['full name', 'email'], ...]
 function! LbdbQuery(qstring)
+  if !executable("lbdbq")
+    echoerr "Cannot find 'lbdbq' executable, please install it (usually, it comes with the 'lbdb' package)"
+    return []
+  endif
   let output = system("lbdbq '" . a:qstring . "'")
   let results = []
   for line in split(output, "\n")[1:] " skip first line (lbdbq summary)


More information about the pkg-vim-maintainers mailing list