From: manakagawa@manakagawa-debian2.asiapacific.hpqcorp.net (中川 誠)
To: bug-gnu-emacs@gnu.org
Subject: regexp problem in ldap.el
Date: Fri, 7 Dec 2007 15:44:42 +0900 [thread overview]
Message-ID: <4518-Fri07Dec2007154442+0900-manakagawa@manakagawa-debian2.asiapacific.hpqcorp.net> (raw)
[-- 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 --]
reply other threads:[~2007-12-07 6:44 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4518-Fri07Dec2007154442+0900-manakagawa@manakagawa-debian2.asiapacific.hpqcorp.net \
--to=manakagawa@manakagawa-debian2.asiapacific.hpqcorp.net \
--cc=Makoto.Nakagawa@hp.com \
--cc=bug-gnu-emacs@gnu.org \
/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 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.