From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Tak Ota Newsgroups: gmane.emacs.devel Subject: Re: handle cygwin path from ldapsearch Date: Thu, 23 Sep 2004 13:44:46 -0700 (PDT) Organization: Sony Electronics Inc. Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: <20040923.134446.119720032.Takaaki.Ota@am.sony.com> References: <20040921.174745.207589496.Takaaki.Ota@am.sony.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1095972348 32109 80.91.229.6 (23 Sep 2004 20:45:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 23 Sep 2004 20:45:48 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 23 22:45:32 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CAaT6-0001kV-00 for ; Thu, 23 Sep 2004 22:45:32 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CAaZ8-0001l8-TP for ged-emacs-devel@m.gmane.org; Thu, 23 Sep 2004 16:51:46 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CAaYy-0001jy-VI for emacs-devel@gnu.org; Thu, 23 Sep 2004 16:51:37 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CAaYw-0001hW-SR for emacs-devel@gnu.org; Thu, 23 Sep 2004 16:51:36 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CAaYw-0001hH-OH for emacs-devel@gnu.org; Thu, 23 Sep 2004 16:51:34 -0400 Original-Received: from [160.33.98.75] (helo=mail8.fw-bc.sony.com) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CAaSR-0000TS-7P for emacs-devel@gnu.org; Thu, 23 Sep 2004 16:44:51 -0400 Original-Received: from mail3.sjc.in.sel.sony.com (mail3.sjc.in.sel.sony.com [43.134.1.211]) by mail8.fw-bc.sony.com (8.12.11/8.12.11) with ESMTP id i8NKilgQ007143 for ; Thu, 23 Sep 2004 20:44:47 GMT Original-Received: from localhost ([43.191.18.96]) by mail3.sjc.in.sel.sony.com (8.12.11/8.12.11) with ESMTP id i8NKilfb023448 for ; Thu, 23 Sep 2004 20:44:47 GMT Original-To: emacs-devel@gnu.org In-Reply-To: <20040921.174745.207589496.Takaaki.Ota@am.sony.com> X-Telephone: +1-858-942-3239 X-Fax------: +1-858-942-9142 X-SnailMail: 16450 West Bernardo Drive MZ7205, San Diego, CA 92127-1804 X-Mailer: Mew-4.0.69 on Emacs-21.3.50.1 (i386-mingw-nt5.1.2600) of 2004-09-22 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:27511 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:27511 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 wrote: The following patch provides correct handling of file path generated by cygwin version of ldapsearch. -Tak 2004-09-21 Takaaki Ota * 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