unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [manakagawa@manakagawa-debian2.asiapacific.hpqcorp.net: regexp problem in ldap.el]
@ 2007-12-08 19:15 Richard Stallman
  0 siblings, 0 replies; only message in thread
From: Richard Stallman @ 2007-12-08 19:15 UTC (permalink / raw)
  To: emacs-devel

Can someone please DTRT then ack?

------- Start of forwarded message -------
X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY 
	autolearn=failed version=3.1.0
Date: Fri,  7 Dec 2007 15:44:42 +0900
Message-ID: <4518-Fri07Dec2007154442+0900-manakagawa@manakagawa-debian2.asiapacific.hpqcorp.net>
To: bug-gnu-emacs@gnu.org
From: manakagawa@manakagawa-debian2.asiapacific.hpqcorp.net
	(=?ISO-2022-JP?B?GyRCQ2ZAbhsoQiAbJEJAPxsoQg==?=)
MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka")
Content-Type: multipart/signed;
	boundary="pgp-sign-Multipart_Fri_Dec__7_15:44:42_2007-1";
	micalg=pgp-sha1; protocol="application/pgp-signature"
Subject: regexp problem in ldap.el
Reply-To: =?ISO-2022-JP?B?GyRCQ2ZAbhsoQiA=?= =?ISO-2022-JP?B?GyRCQD8bKEI=?=
	<Makoto.Nakagawa@hp.com>

- --pgp-sign-Multipart_Fri_Dec__7_15:44:42_2007-1
Content-Type: multipart/mixed;
 boundary="Multipart_Fri_Dec__7_15:44:42_2007-1"

- --Multipart_Fri_Dec__7_15:44:42_2007-1
Content-Type: text/plain; charset=ISO-2022-JP

Hi,

I am trying emacs 21.1 and fond that ldap.e does not works for me.  It
seems that the change made in revision 1.22 was not correct.

I found the corresponding bug report on bug-gnu-emacs mailing list,
dated 2006-06-01 with a subject "regexp problem in ldap.el?"

If the reported situation is really the problem, how about the attached
patch?

I do think that "?" should not be removed, otherwise any lines withtout
"file://" will not be matched.

Regards,
- --
/***   Hewlett-Packard Japan, Ltd.                                ***/
/***   Consulting & Integration                                   ***/
/***   PC-CW-SOL#1 Professional Center                            ***/
/***   Nakagawa, Makoto?????? ???? 050 3158 4747 (Dial-In)        ***/
/***   PGP: 0B33 EAC3 F2F6 3D10 D9E9  AE7F 8EDA 44F9 1D29 D44A    ***/

- --Multipart_Fri_Dec__7_15:44:42_2007-1
Content-Type: application/octet-stream; type=patch
Content-Disposition: attachment; filename="ldap-fix.patch"
Content-Transfer-Encoding: 7bit

Index: emacs22-22.1+1/lisp/net/ldap.el
===================================================================
- --- emacs22-22.1+1.orig/lisp/net/ldap.el	2007-12-07 14:45:04.000000000 +0900
+++ emacs22-22.1+1/lisp/net/ldap.el	2007-12-07 15:09:41.000000000 +0900
@@ -586,7 +586,7 @@
 					       (end-of-line)
 					       (point))))
 	  (forward-line 1)
- -	  (while (looking-at "^\\(\\w*\\)\\(;\\w*\\)?[=:\t ]+\\(<[\t ]*file://\\)\\(.*\\)$")
+	  (while (looking-at "^\\(\\w*\\)\\(;\\w*\\)?[=:\t ]+\\(<[\t ]*file://\\)?\\(.*\\)$")
 	    (setq name (match-string 1)
 		  value (match-string 4))
             ;; Need to handle file:///D:/... as generated by OpenLDAP
@@ -595,7 +595,7 @@
                      (eq (string-match "/\\(.:.*\\)$" value) 0))
                 (setq value (match-string 1 value)))
 	    ;; Do not try to open non-existent files
- -	    (if (equal value "")
+	    (if (or (equal value "") (not (file-exists-p value)))
 		(setq value " ")
 	      (save-excursion
 		(set-buffer bufval)

- --Multipart_Fri_Dec__7_15:44:42_2007-1--

- --pgp-sign-Multipart_Fri_Dec__7_15:44:42_2007-1
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

- -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iQCVAwUAR1jr3Qdij9ktsB7pAQLmgwP/Yax8EwGCmNA29/HDR310WMCvl57Gnokm
djATjGiUyaE+0jn41TrlNCBVdUSN2etnBzKZ9TFT1lt3M/XwMqyEFn2fntLz1hee
o7XCEFnbKaWGlFGRXrzd//enXTats60/xV/5C8i6X50cAOFr2pJ4O0EyKqEj+PFN
X2ih2qxLJqc=
=XjL9
- -----END PGP SIGNATURE-----

- --pgp-sign-Multipart_Fri_Dec__7_15:44:42_2007-1--
------- End of forwarded message -------

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-12-08 19:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-08 19:15 [manakagawa@manakagawa-debian2.asiapacific.hpqcorp.net: regexp problem in ldap.el] Richard Stallman

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).