bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#9508: Phantom result from eudc-expand-inline


From: Goldberg,David S.
Subject: bug#9508: Phantom result from eudc-expand-inline
Date: Fri, 16 Sep 2011 16:05:25 -0400
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/23.2 (gnu/linux)

I've edebugged it further.  It appears the problem is in the function 
ldap-search-internal, which is always returns a list, the car of which is the 
symbol 'nil.  That is if there's no match, it returns '(nil).  If there is a 
match (or multiple) it returns '(nil (match1) (match2)) and so on.

A fix that works for me is this trivial patch:

--- -   2011-09-16 15:59:22.330294914 -0400
+++ /home/dsg/elisp/ldap.el     2011-09-16 15:54:16.000000000 -0400
@@ -613,7 +613,7 @@
          (message "Parsing results... %d" numres)
          (1+ numres))
        (message "Parsing results... done")
-       (nreverse result)))))
+       (cdr (nreverse result))))))
 
 (provide 'ldap)
 
The downside of this patch is that if there is no match, there is no obvious 
feedback to the user.  I thought about only removing the initial nil if the 
length is greater than 1 but that breaks looping on a search over multiple 
attributes.

Thanks,

-- 
Dave Goldberg
Associate Department Head, G06A: Advanced Technical Computing Center
The MITRE Corporation \ MS K331 \ 202 Burlington Rd. \ Bedford, MA 01730
dsg@mitre.org \ 781-271-3887 (W) \ 781-439-7875 (M)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]