GNU bug report logs -
#24093
24.5; xsdre-translate fails on general punctuation
Previous Next
Reported by: Patrick McAllister <pma <at> rdorte.org>
Date: Thu, 28 Jul 2016 07:59:01 UTC
Severity: normal
Tags: fixed
Found in version 24.5
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 24093 in the body.
You can then email your comments to 24093 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24093
; Package
emacs
.
(Thu, 28 Jul 2016 07:59:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Patrick McAllister <pma <at> rdorte.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 28 Jul 2016 07:59:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
This seems to cause trouble:
emacs -Q
M-x load-library xsd-regexp
;; this is as expected:
(string-match (xsdre-translate "\\p{Pd}") "a-b");; 1
;; this fails:
(string-match (xsdre-translate "\\p{P}") "a-b");; nil
The regular expression produced for "\\p{P}" is faulty:
(pp (xsdre-translate "\\p{P}"))
produces:
"[!-#%-*,-/:;?@[-]_{}¡«·»¿;·՚-՟։֊־׀׃׳״،؛؟٪-٭۔܀-܍।॥॰෴๏๚๛༄-༒༺-༽྅၊-၏჻፡-፨᙭᙮᚛᚜᛫-᛭។-៚ៜ᠀-᠊‐-‧‰-⁃⁅⁆⁈-⁍⁽⁾₍₎〈〉、-〃〈-】〔-〟〰・﴾﴿︰-﹄﹉-﹒﹔-﹡﹣﹨﹪﹫!-#%-*,-/:;?@[-]_{}。-・]"
I guess the problem is the sequence "[-]" in the regex that closes the
opening "[". This is noticeable in that it breaks validation with many
rng schemas that use the "P" character class.
The result of (xsdre-translate "\\p{P}") should look something like
this, I suppose:
"[][!-#%-*,-/:;?@[_{}¡«·»¿;·՚-՟։֊־׀׃׳״،؛؟٪-٭۔܀-܍।॥॰෴๏๚๛༄-༒༺-༽྅၊-၏჻፡-፨᙭᙮᚛᚜᛫-᛭។-៚ៜ᠀-᠊‐-‧‰-⁃⁅⁆⁈-⁍⁽⁾₍₎〈〉、-〃〈-】〔-〟〰・﴾﴿︰-﹄﹉-﹒﹔-﹡﹣﹨﹪﹫!-#%-*,-/:;?@[-]_{}。-・-]"
In GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
of 2016-04-08 on binet, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11803000
System Description: Debian GNU/Linux testing (stretch)
Configured using:
`configure --build x86_64-linux-gnu --prefix=/usr
--sharedstatedir=/var/lib --libexecdir=/usr/lib
--localstatedir=/var/lib --infodir=/usr/share/info
--mandir=/usr/share/man --with-pop=yes
--enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.5/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.5/site-lisp:/usr/share/emacs/site-lisp
--build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib
--libexecdir=/usr/lib --localstatedir=/var/lib
--infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes
--enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.5/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.5/site-lisp:/usr/share/emacs/site-lisp
--with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars
'CFLAGS=-g -O2 -fstack-protector-strong -Wformat
-Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time
-D_FORTIFY_SOURCE=2' LDFLAGS=-Wl,-z,relro'
Important settings:
value of $LANG: en_IE.utf8
locale-coding-system: utf-8-unix
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Recent messages:
Mark saved where search started
Scanning for dabbrevs...done
user-error: No dynamic expansion for `nil' found
Quit
Mark set
forward-sexp: Scan error: "Unbalanced parentheses", 350, 506
Quit
Mark set [3 times]
nil [2 times]
Making completion list...
Load-path shadows:
None found.
Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
help-fns mail-prsvr mail-utils dabbrev misearch multi-isearch pp
mule-util debug paren help-mode easymenu xsd-regexp time-date tooltip
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment
lisp-mode prog-mode register page menu-bar rfn-eshadow timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind gfilenotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)
Memory information:
((conses 16 80811 4739)
(symbols 48 18116 0)
(miscs 40 281 321)
(strings 32 10743 4013)
(string-bytes 1 314710)
(vectors 16 11441)
(vector-slots 8 565740 61256)
(floats 8 68 645)
(intervals 56 370 19)
(buffers 960 13)
(heap 1024 36362 903))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24093
; Package
emacs
.
(Wed, 02 Dec 2020 11:24:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 24093 <at> debbugs.gnu.org (full text, mbox):
Patrick McAllister <pma <at> rdorte.org> writes:
> This seems to cause trouble:
>
> emacs -Q
> M-x load-library xsd-regexp
> ;; this is as expected:
> (string-match (xsdre-translate "\\p{Pd}") "a-b");; 1
> ;; this fails:
> (string-match (xsdre-translate "\\p{P}") "a-b");; nil
>
> The regular expression produced for "\\p{P}" is faulty:
>
> (pp (xsdre-translate "\\p{P}"))
Yup. I've now fixed this in Emacs 28.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Added tag(s) fixed.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Wed, 02 Dec 2020 11:27:02 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 28.1, send any further explanations to
24093 <at> debbugs.gnu.org and Patrick McAllister <pma <at> rdorte.org>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Wed, 02 Dec 2020 11:27:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 30 Dec 2020 12:24:08 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 174 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.