1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

(ldap-search-internal): Skip error message from ldapsearch. Allow listing

attribute names only.  Do not open non-existent files.
This commit is contained in:
Pavel Janík 2002-01-06 17:59:09 +00:00
parent 527813ef22
commit b4ac0cdbf5
2 changed files with 20 additions and 7 deletions

View file

@ -1,5 +1,12 @@
2002-01-06 Pavel Jan,Bm(Bk <Pavel@Janik.cz>
* net/ldap.el (ldap-search-internal): Skip error message from
ldapsearch. Allow listing attribute names only. Do not open
non-existent files.
* net/eudcb-ldap.el (eudc-ldap-get-field-list): Do not try to
call non-existent function.
* net/eudc.el (top-level): Revert previous change.
* net/net-utils.el (nslookup-font-lock-keywords): Defvar font-lock

View file

@ -570,6 +570,9 @@ an alist of attribute/value pairs."
(if (looking-at "usage")
(error "Incorrect ldapsearch invocation")
(message "Parsing results... ")
;; Skip error message when retrieving attribute list
(if (looking-at "Size limit exceeded")
(forward-line 1))
(while (progn
(skip-chars-forward " \t\n")
(not (eobp)))
@ -580,13 +583,16 @@ an alist of attribute/value pairs."
(while (looking-at "^\\(\\w*\\)[=:\t ]+\\(<[\t ]*file://\\)?\\(.*\\)$")
(setq name (match-string 1)
value (match-string 3))
(save-excursion
(set-buffer bufval)
(erase-buffer)
(set-buffer-multibyte nil)
(insert-file-contents-literally value)
(delete-file value)
(setq value (buffer-string)))
;; Do not try to open non-existent files
(if (equal value "")
(setq value " ")
(save-excursion
(set-buffer bufval)
(erase-buffer)
(set-buffer-multibyte nil)
(insert-file-contents-literally value)
(delete-file value)
(setq value (buffer-string))))
(setq record (cons (list name value)
record))
(forward-line 1))