>From b3797956bfbebd968498ec0e4664673ccc2100ed Mon Sep 17 00:00:00 2001 From: Thomas Fitzsimmons Date: Thu, 13 Nov 2014 00:59:12 -0500 Subject: [PATCH 02/16] Support new-style LDAP URIs in ldap-search-internal * net/ldap.el (ldap-search-internal): Support new-style LDAP URIs. --- lisp/ChangeLog | 4 ++++ lisp/net/ldap.el | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cfe24b4..e45ead7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2014-11-13 Thomas Fitzsimmons + * net/ldap.el (ldap-search-internal): Support new-style LDAP URIs. + +2014-11-13 Thomas Fitzsimmons + * net/eudc-vars.el (eudc-server): Adjust docstring to mention eudc-server-hotlist. (eudc-server-hotlist): Move from eudc.el and make defcustom. diff --git a/lisp/net/ldap.el b/lisp/net/ldap.el index 10ce7a7..2b5b2fb 100644 --- a/lisp/net/ldap.el +++ b/lisp/net/ldap.el @@ -559,7 +559,13 @@ an alist of attribute/value pairs." (erase-buffer) (if (and host (not (equal "" host))) - (setq arglist (nconc arglist (list (format "-h%s" host))))) + (setq arglist (nconc arglist + (list (format + ;; Use -H if host is a new-style LDAP URI. + (if (string-match "^[a-zA-Z]+://" host) + "-H%s" + "-h%s") + host))))) (if (and attrsonly (not (equal "" attrsonly))) (setq arglist (nconc arglist (list "-A")))) -- 1.8.1.4