GNU bug report logs - #9508
23.2; Phantom result from eudc-expand-inline

Previous Next

Package: emacs;

Reported by: "Goldberg,David S." <dsg <at> mitre.org>

Date: Wed, 14 Sep 2011 17:25:02 UTC

Severity: normal

Found in version 23.2

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 9508 <at> debbugs.gnu.org (full text, mbox):

From: "Goldberg,David S." <dsg <at> mitre.org>
To: <9508 <at> debbugs.gnu.org>
Subject: Phantom result from eudc-expand-inline
Date: Fri, 16 Sep 2011 16:05:25 -0400
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 <at> mitre.org \ 781-271-3887 (W) \ 781-439-7875 (M)




This bug report was last modified 13 years and 299 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.