emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: handle cygwin path from ldapsearch


From: Tak Ota
Subject: Re: handle cygwin path from ldapsearch
Date: Thu, 23 Sep 2004 13:44:46 -0700 (PDT)

Could someone please take a look at this?  I know it is not a very
high priority issue but the patch is not terribly complicated either.
If it looks reasonable please check it in.  Thank you.

-Tak

Tue, 21 Sep 2004 17:47:45 -0700 (PDT): Tak Ota <address@hidden> wrote:

The following patch provides correct handling of file path generated
by cygwin version of ldapsearch.

-Tak

2004-09-21  Takaaki Ota  <address@hidden>

        * net/ldap.el (ldap-search): Handle cygwin file path appropriately.


*** ../../../../pub/emacs/emacs-21.3.50/lisp/net/ldap.el        Wed May 19 
12:06:54 2004
--- ldap.el     Tue Sep 21 17:33:16 2004
***************
*** 582,592 ****
          (while (looking-at "^\\(\\w*\\)[=:\t ]+\\(<[\t 
]*file://\\)?\\(.*\\)$")
            (setq name (match-string 1)
                  value (match-string 3))
!             ;; Need to handle file:///D:/... as generated by OpenLDAP
!             ;; on DOS/Windows as local files.
!             (if (and (memq system-type '(windows-nt ms-dos))
!                      (eq (string-match "/\\(.:.*\\)$" value) 0))
!                 (setq value (match-string 1 value)))
            ;; Do not try to open non-existent files
            (if (equal value "")
                (setq value " ")
--- 582,596 ----
          (while (looking-at "^\\(\\w*\\)[=:\t ]+\\(<[\t 
]*file://\\)?\\(.*\\)$")
            (setq name (match-string 1)
                  value (match-string 3))
!             ;; Need to handle pagan path
!             (if (memq system-type '(windows-nt ms-dos))
!               (cond
!                ;; file:///D:/... as generated by OpenLDAP on DOS/Windows as 
local files.
!                ((string-match "/\\(.:.*\\)$" value)
!                 (setq value (match-string 1 value)))
!                ;; /cygdrive/c/... as generated by OpenLDAP on Cygwin
!                ((string-match "/cygdrive/\\(.\\)\\(/.*\\)$" value)
!                 (setq value (concat (match-string 1 value) ":" (match-string 
2 value))))))
            ;; Do not try to open non-existent files
            (if (equal value "")
                (setq value " ")


_______________________________________________
Emacs-devel mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-devel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]