unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: 中川誠 <gha03025@nifty.ne.jp>
To: bug-gnu-emacs@gnu.org
Subject: bug#698: regexp problem in ldap.el
Date: Tue, 12 Aug 2008 13:04:40 +0900 (JST)	[thread overview]
Message-ID: <31147069.79401218513880311.gha03025@nifty.ne.jp> (raw)

According to the rfc4512, \w is not good to match against attribute type
and options.  With the attached patch, options containing hyphens are
successfully parsed.

P.S.

I submitted a bug report about regexp in ldap-search-internal last
December, but now I understand that it was a mistake.

---- patch from here ----
--- ldap.orig.el        2008-08-09 08:04:07.000000000 +0900
+++ ldap.el     2008-08-09 22:37:05.000000000 +0900
@@ -582,9 +582,9 @@
                                               (end-of-line)
                                               (point))))
          (forward-line 1)
-         (while (looking-at "^\\(\\w*\\)\\(;\\w*\\)?[=:\t ]+\\(&lt;[\t ]*file
:\
//\\)\\(.*\\)$")
+         (while (looking-at "^\\([A-Za-z][-A-Za-z0-9]*\\|[0-9]+\\(\\.[0-9]+\\
)\
*\\)\\(;[-A-Za-z0-9]+\\)*[=:\t ]+\\(<[\t ]*file://\\)\\(.*\\)$")
            (setq name (match-string 1)
-                 value (match-string 4))
+                 value (match-string 5))
             ;; Need to handle <a href="file:///D:/...">file:///D:/...</a> as 
g\
enerated by OpenLDAP
             ;; on DOS/Windows as local files.
             (if (and (memq system-type '(windows-nt ms-dos))
---- patch ends here ----








             reply	other threads:[~2008-08-12  4:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <8763q6vzwj.fsf@stupidchicken.com>
2008-08-12  4:04 ` 中川誠 [this message]
2008-08-12 18:50   ` bug#698: marked as done (regexp problem in ldap.el) Emacs bug Tracking System
2008-08-24  4:30   ` Emacs bug Tracking System
     [not found] ` <8409-Mon11Aug2008191737+0900-manakagawa@manakagawa-debian2.asiapacific.hpqcorp.net>
2008-08-12 18:50   ` bug#693: " Emacs bug Tracking System
2008-08-24  4:30   ` Emacs bug Tracking System
     [not found] ` <1820-Sat09Aug2008170612+0900-manakagawa@manakagawa-debian2.asiapacific.hpqcorp.net>
2008-08-12 18:50   ` bug#678: " Emacs bug Tracking System
2008-08-24  4:30   ` Emacs bug Tracking System
     [not found] ` <2817-Tue12Aug2008043902+0900-manakagawa@manakagawa-debian2.asiapacific.hpqcorp.net>
2008-08-12 18:50   ` bug#696: " Emacs bug Tracking System
2008-08-24  4:30   ` Emacs bug Tracking System

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=31147069.79401218513880311.gha03025@nifty.ne.jp \
    --to=gha03025@nifty.ne.jp \
    --cc=698@emacsbugs.donarmstrong.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 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).