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

From: Chong Yidong <[email-masked]>
Date: Sat, 17 Sep 2011 15:59:01 -0400

"Goldberg,David S." <[email-masked]> writes:

> 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.

Does this patch give better results?

=== modified file 'lisp/net/ldap.el'
*** lisp/net/ldap.el	2011-05-10 13:57:12 +0000
--- lisp/net/ldap.el	2011-09-17 19:56:55 +0000
***************
*** 632,640 ****
  	    (setq record (cons (list name value)
  			       record))
  	    (forward-line 1))
! 	  (push (if withdn
! 		    (cons dn (nreverse record))
! 		  (nreverse record)) result)
  	  (setq record nil)
  	  (skip-chars-forward " \t\n")
  	  (message "Parsing results... %d" numres)
--- 632,641 ----
  	    (setq record (cons (list name value)
  			       record))
  	    (forward-line 1))
! 	  (cond (withdn
! 		 (push (cons dn (nreverse record)) result))
! 		(record
! 		 (push (nreverse record) result)))
  	  (setq record nil)
  	  (skip-chars-forward " \t\n")
  	  (message "Parsing results... %d" numres)