unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Tak Ota <Takaaki.Ota@am.sony.com>
Subject: Re: handle cygwin path from ldapsearch
Date: Thu, 23 Sep 2004 13:44:46 -0700 (PDT)	[thread overview]
Message-ID: <20040923.134446.119720032.Takaaki.Ota@am.sony.com> (raw)
In-Reply-To: <20040921.174745.207589496.Takaaki.Ota@am.sony.com>

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 <Takaaki.Ota@am.sony.com> wrote:

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

-Tak

2004-09-21  Takaaki Ota  <Takaaki.Ota@am.sony.com>

	* 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
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

  reply	other threads:[~2004-09-23 20:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-22  0:47 handle cygwin path from ldapsearch Tak Ota
2004-09-23 20:44 ` Tak Ota [this message]
2004-09-23 20:57   ` Stefan Monnier
2004-09-23 21:46     ` Tak Ota
2004-09-23 21:58       ` Stefan Monnier
2004-09-23 22:03         ` Tak Ota
2004-09-24 11:42           ` Stefan
2004-09-23 22:56         ` Jason Rumney
2004-09-23 23:14           ` Tak Ota
2004-09-23 22:01       ` Tak Ota

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040923.134446.119720032.Takaaki.Ota@am.sony.com \
    --to=takaaki.ota@am.sony.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).