* regexp problem in ldap.el
@ 2007-12-07 6:44 中川 誠
0 siblings, 0 replies; only message in thread
From: 中川 誠 @ 2007-12-07 6:44 UTC (permalink / raw)
To: bug-gnu-emacs
[-- Attachment #1.1: Type: text/plain, Size: 831 bytes --]
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 ***/
[-- Attachment #1.2: ldap-fix.patch --]
[-- Type: application/octet-stream, Size: 998 bytes --]
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)
[-- Attachment #2: Type: application/pgp-signature, Size: 307 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-12-07 6:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-07 6:44 regexp problem in ldap.el 中川 誠
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.