]> git.eshelyaron.com Git - emacs.git/commitdiff
ldap-search-internal cleanup
authorFilipp Gunbin <fgunbin@fastmail.fm>
Thu, 14 Apr 2022 13:47:32 +0000 (16:47 +0300)
committerFilipp Gunbin <fgunbin@fastmail.fm>
Thu, 14 Apr 2022 13:52:01 +0000 (16:52 +0300)
* lisp/net/ldap.el (ldap-ldapsearch-args): Change -LL to -LLL to
suppress ldif version output.
(ldap-search-internal): Remove skipping of version output.  Remove
redundand ws skipping.

lisp/net/ldap.el

index 946328213534eb2447f2c0753576160b639530f3..da45457891b4dfd85137a7d94d99a4d985aa9696 100644 (file)
@@ -148,7 +148,7 @@ Valid properties include:
   "The name of the ldapsearch command line program."
   :type '(string :tag "`ldapsearch' Program"))
 
-(defcustom ldap-ldapsearch-args '("-LL" "-tt")
+(defcustom ldap-ldapsearch-args '("-LLL" "-tt")
   "A list of additional arguments to pass to `ldapsearch'."
   :type '(repeat :tag "`ldapsearch' Arguments"
                 (string :tag "Argument")))
@@ -682,7 +682,7 @@ an alist of attribute/value pairs."
       (while (re-search-forward (concat "[\t\n\f]+ \\|"
                                        ldap-ldapsearch-password-prompt-regexp)
                                nil t)
-       (replace-match "" nil nil))
+       (replace-match ""))
       (goto-char (point-min))
 
       (if (looking-at "usage")
@@ -691,7 +691,6 @@ an alist of attribute/value pairs."
        ;; Skip error message when retrieving attribute list
        (if (looking-at "Size limit exceeded")
            (forward-line 1))
-        (if (looking-at "version:") (forward-line 1)) ;bug#12724.
        (while (progn
                 (skip-chars-forward " \t\n")
                 (not (eobp)))
@@ -724,7 +723,6 @@ an alist of attribute/value pairs."
                (record
                 (push (nreverse record) result)))
          (setq record nil)
-         (skip-chars-forward " \t\n")
          (message "Parsing results... %d" numres)
          (setq numres (1+ numres)))
        (message "Parsing results... done")