GNU bug report logs - #36396
27.0.50; rx-to-string fails: wrong-type-argument characterp "\\(?"

Previous Next

Package: emacs;

Reported by: Göktuğ Kayaalp <self <at> gkayaalp.com>

Date: Wed, 26 Jun 2019 20:37:02 UTC

Severity: normal

Tags: fixed

Found in version 27.0.50

Done: Noam Postavsky <npostavs <at> gmail.com>

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 36396 in the body.
You can then email your comments to 36396 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#36396; Package emacs. (Wed, 26 Jun 2019 20:37:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Göktuğ Kayaalp <self <at> gkayaalp.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 26 Jun 2019 20:37:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Göktuğ Kayaalp <self <at> gkayaalp.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.0.50; rx-to-string fails: wrong-type-argument characterp "\\(?"
Date: Wed, 26 Jun 2019 23:35:34 +0300
I started encountering this after building
"260b6c2c931d74ef64dacb20b7fcae6f888e6d42" today.

Eval the following with debugging enabled (taken from magit-todos.el,
just the outer let form added).  Results in the error mentioned in the
subject.

(let ((keywords (list "a" "b"))
      (magit-todos-keyword-suffix "\\(?:([^)]+)\\)?:"))
 (rx-to-string
  `(seq bol
        ;; Filename
        (group-n 8 (1+ (not (any ":")))) ":"
        ;; Line
        (group-n 2 (1+ digit)) ":"
        (or
         ;; Org item
         (seq (group-n 1 (1+ "*"))
              (1+ blank)
              (group-n 4 (or ,@keywords))
              (1+ blank)
              (group-n 5 (1+ not-newline)))
         ;; Non-Org
         (seq (optional (1+ not-newline))
              (group-n 4 (or ,@keywords))
              (optional (group-n 6 (regexp ,magit-todos-keyword-suffix)))
              (optional (1+ blank))
              (optional (group-n 5 (1+ not-newline))))))))

Excerpt from the backtrace:

Debugger entered--Lisp error: (wrong-type-argument characterp "\\(?")
  mapconcat(identity ("\\(?:.+\\)?" "\\(?4:[ab]\\)" ("\\(?" "6" ":" "\\)" "?") "\\(?:[[:blank:]]+\\)?" "\\(?5:.+\\)?") nil)
  rx--subforms(((optional (1+ not-newline)) (group-n 4 (or "a" "b")) (optional (group-n 6 (regexp "\\(?:([^)]+)\\)?:"))) (optional (1+ blank)) (optional (group-n 5 (1+ not-newline)))) :)
  rx-and((seq (optional (1+ not-newline)) (group-n 4 (or "a" "b")) (optional (group-n 6 (regexp "\\(?:([^)]+)\\)?:"))) (optional (1+ blank)) (optional (group-n 5 (1+ not-newline)))))
  rx-form((seq (optional (1+ not-newline)) (group-n 4 (or "a" "b")) (optional (group-n 6 (regexp "\\(?:([^)]+)\\)?:"))) (optional (1+ blank)) (optional (group-n 5 (1+ not-newline)))) |)
  #f(compiled-function (x) #<bytecode 0x15683f299d61>)((seq (optional (1+ not-newline)) (group-n 4 (or "a" "b")) (optional (group-n 6 (regexp "\\(?:([^)]+)\\)?:"))) (optional (1+ blank)) (optional (group-n 5 (1+ not-newline)))))
  mapcar(#f(compiled-function (x) #<bytecode 0x15683f299d61>) ((seq (group-n 1 (1+ "*")) (1+ blank) (group-n 4 (or "a" "b")) (1+ blank) (group-n 5 (1+ not-newline))) (seq (optional (1+ not-newline)) (group-n 4 (or "a" "b")) (optional (group-n 6 (regexp "\\(?:([^)]+)\\)?:"))) (optional (1+ blank)) (optional (group-n 5 (1+ not-newline))))))
  rx--subforms(((seq (group-n 1 (1+ "*")) (1+ blank) (group-n 4 (or "a" "b")) (1+ blank) (group-n 5 (1+ not-newline))) (seq (optional (1+ not-newline)) (group-n 4 (or "a" "b")) (optional (group-n 6 (regexp "\\(?:([^)]+)\\)?:"))) (optional (1+ blank)) (optional (group-n 5 (1+ not-newline))))) | "\\|")
  rx-or((or (seq (group-n 1 (1+ "*")) (1+ blank) (group-n 4 (or "a" "b")) (1+ blank) (group-n 5 (1+ not-newline))) (seq (optional (1+ not-newline)) (group-n 4 (or "a" "b")) (optional (group-n 6 (regexp "\\(?:([^)]+)\\)?:"))) (optional (1+ blank)) (optional (group-n 5 (1+ not-newline))))))
  rx-form((or (seq (group-n 1 (1+ "*")) (1+ blank) (group-n 4 (or "a" "b")) (1+ blank) (group-n 5 (1+ not-newline))) (seq (optional (1+ not-newline)) (group-n 4 (or "a" "b")) (optional (group-n 6 (regexp "\\(?:([^)]+)\\)?:"))) (optional (1+ blank)) (optional (group-n 5 (1+ not-newline))))) :)
  #f(compiled-function (x) #<bytecode 0x15683f299d29>)((or (seq (group-n 1 (1+ "*")) (1+ blank) (group-n 4 (or "a" "b")) (1+ blank) (group-n 5 (1+ not-newline))) (seq (optional (1+ not-newline)) (group-n 4 (or "a" "b")) (optional (group-n 6 (regexp "\\(?:([^)]+)\\)?:"))) (optional (1+ blank)) (optional (group-n 5 (1+ not-newline))))))
  mapcar(#f(compiled-function (x) #<bytecode 0x15683f299d29>) (bol (group-n 8 (1+ (not (any ":")))) ":" (group-n 2 (1+ digit)) ":" (or (seq (group-n 1 (1+ "*")) (1+ blank) (group-n 4 (or "a" "b")) (1+ blank) (group-n 5 (1+ not-newline))) (seq (optional (1+ not-newline)) (group-n 4 (or "a" "b")) (optional (group-n 6 (regexp "\\(?:([^)]+)\\)?:"))) (optional (1+ blank)) (optional (group-n 5 (1+ not-newline)))))))
  rx--subforms((bol (group-n 8 (1+ (not (any ":")))) ":" (group-n 2 (1+ digit)) ":" (or (seq (group-n 1 (1+ "*")) (1+ blank) (group-n 4 (or "a" "b")) (1+ blank) (group-n 5 (1+ not-newline))) (seq (optional (1+ not-newline)) (group-n 4 (or "a" "b")) (optional (group-n 6 (regexp "\\(?:([^)]+)\\)?:"))) (optional (1+ blank)) (optional (group-n 5 (1+ not-newline)))))) :)
  rx-and((seq bol (group-n 8 (1+ (not (any ":")))) ":" (group-n 2 (1+ digit)) ":" (or (seq (group-n 1 (1+ "*")) (1+ blank) (group-n 4 (or "a" "b")) (1+ blank) (group-n 5 (1+ not-newline))) (seq (optional (1+ not-newline)) (group-n 4 (or "a" "b")) (optional (group-n 6 (regexp "\\(?:([^)]+)\\)?:"))) (optional (1+ blank)) (optional (group-n 5 (1+ not-newline)))))))
  rx-form((seq bol (group-n 8 (1+ (not (any ":")))) ":" (group-n 2 (1+ digit)) ":" (or (seq (group-n 1 (1+ "*")) (1+ blank) (group-n 4 (or "a" "b")) (1+ blank) (group-n 5 (1+ not-newline))) (seq (optional (1+ not-newline)) (group-n 4 (or "a" "b")) (optional (group-n 6 (regexp "\\(?:([^)]+)\\)?:"))) (optional (1+ blank)) (optional (group-n 5 (1+ not-newline)))))))
  rx-to-string((seq bol (group-n 8 (1+ (not (any ":")))) ":" (group-n 2 (1+ digit)) ":" (or (seq (group-n 1 (1+ "*")) (1+ blank) (group-n 4 (or "a" "b")) (1+ blank) (group-n 5 (1+ not-newline))) (seq (optional (1+ not-newline)) (group-n 4 (or "a" "b")) (optional (group-n 6 (regexp "\\(?:([^)]+)\\)?:"))) (optional (1+ blank)) (optional (group-n 5 (1+ not-newline)))))))
  (let ((keywords (list "a" "b")) (magit-todos-keyword-suffix "\\(?:([^)]+)\\)?:")) (rx-to-string (list 'seq 'bol '(group-n 8 (1+ (not (any ":")))) ":" '(group-n 2 (1+ digit)) ":" (list 'or (cons 'seq (cons '(group-n 1 ...) (cons '... (cons ... ...)))) (cons 'seq (cons '(optional ...) (cons (list ... 4 ...) (cons ... ...))))))))
  eval-region(146 853 t #f(compiled-function (ignore) #<bytecode 0x15683f299ced>))  ; Reading at buffer position 853
  elisp--eval-defun()
  eval-defun(nil)
  funcall-interactively(eval-defun nil)
  call-interactively(eval-defun nil nil)
  command-execute(eval-defun)




In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.5, cairo version 1.16.0)
 of 2019-06-26 built on alpha
Repository revision: 260b6c2c931d74ef64dacb20b7fcae6f888e6d42
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12004000
System Description: Debian GNU/Linux 10 (buster)

Recent messages:
~/cf/emacs.d/lisp/site 
~/cf/emacs.d/lisp 
~/cf/emacs.d 
~/cf 
rx--subforms: Wrong type argument: characterp, "\\(?" [2 times]
Debug on Error enabled globally
Debug on Quit enabled globally
Entering debugger...
Quit
user-error: Previous command was not a yank

Configured using:
 'configure --prefix=/home/g/local/emacs --with-x-toolkit=gtk3
 --with-modules --with-file-notification=yes --with-gameuser=no
 --with-cairo --with-mailutils'

Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY
INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF
ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD
JSON PDUMPER LCMS2 GMP

Important settings:
  value of $LC_MONETARY: tr_TR.UTF-8
  value of $LC_TIME: tr_TR.UTF-8
  value of $LANG: en_GB.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Debugger

Minor modes in effect:
  auto-image-file-mode: t
  show-paren-mode: t
  gk-ucins-entry-mode: t
  global-gk-minor-mode: t
  gk-minor-mode: t
  yas-global-mode: t
  yas-minor-mode: t
  winner-mode: t
  global-whitespace-mode: t
  which-key-mode: t
  save-place-mode: t
  persistent-scratch-autosave-mode: t
  global-paren-face-mode: t
  magit-todos-mode: t
  global-magit-file-mode: t
  url-handler-mode: t
  global-git-commit-mode: t
  shell-dirtrack-mode: t
  eval-sexp-fu-flash-mode: t
  auto-insert-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-quote-mode: t
  mouse-wheel-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
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mailalias mail-extr emacsbug cl-print pcmpl-unix
bug-reference dired-aux dabbrev two-column iso-transl rmailout qp
executable rmailmm misearch multi-isearch eieio-opt speedbar sb-image
ezimage dframe help-fns radix-tree vc-filewise diary-lib diary-loaddefs
cal-iso image-file paren paper-theme init gk-feeds man org-rmail org-mhe
org-irc org-info org-gnus nnir gnus-sum gnus-group gnus-undo gnus-start
gnus-cloud nnimap utf7 gnus-spec gnus-win org-docview org-bibtex bibtex
org-bbdb org-w3m loadhist ob-python ob-shell yasnippet elec-pair
zencoding-mode winner windmove whole-line-or-region whitespace which-key
wdired vc-rcs vc-cvs vc vc-dispatcher turkish tramp-cache time thinks
smtpmail sendmail scheme saveplace rmailsum python tramp-sh tramp
tramp-loaddefs trampver tramp-integration files-x tramp-compat
parse-time pixel-scroll persistent-scratch perl-mode pass-listing
password-store paren-face paredit ox-org ox-hugo ox-blackfriday ox-md
ox-beamer ox-odt rng-loc rng-uri rng-parse rng-match rng-dt rng-util
rng-pttrn nxml-parse nxml-ns nxml-enc xmltok nxml-util ox-latex
ox-icalendar ox-html table ox-ascii ox-publish ox org-variable-pitch
org-protocol org-mobile org-agenda org-inlinetask org-eww org-checklist
org-capture nnfolder nnoo nnmail gnus-int gnus-range netrc
multiple-cursors mc-hide-unmatched-lines-mode mc-separate-operations
rectangular-region-mode mc-mark-pop mc-mark-more mc-cycle-cursors
mc-edit-lines multiple-cursors-core mairix cus-edit cus-start cus-load
mail-source magit-todos pcre2el rxt re-builder hl-todo async grep
magit-bookmark magit-imenu git-rebase magit-extras magit-ediff ediff
ediff-merg ediff-mult ediff-wind ediff-diff ediff-help ediff-init
ediff-util magit-subtree magit-submodule magit-obsolete magit-blame
magit-stash magit-bisect magit-remote magit-commit magit-sequence
magit-notes magit-worktree magit-tag magit-merge magit-branch
magit-reset magit-collab ghub url-http url-gw nsm url-auth let-alist
magit-files magit-refs magit-status magit package url-handlers
magit-repos magit-apply magit-wip magit-log magit-diff smerge-mode
magit-core magit-autorevert autorevert filenotify magit-process
magit-margin magit-mode ls-lisp lorem-ipsum js inf-ruby ruby-mode smie
inf-lisp imenu image-dired ibuffer-vc ibuf-macs ibuf-ext ibuffer
ibuffer-loaddefs hl-line highlight-parentheses goto-last-change
goto-addr gk-unilat gk-greek quail git-commit recentf tree-widget
with-editor warnings term disp-table ehelp eshell esh-cmd esh-ext
esh-opt esh-proc esh-io esh-arg esh-module esh-groups esh-util shell
server magit-git magit-section magit-utils vc-git diff-mode ido
magit-popup pcase log-edit pcvs-util add-log forecast org-element org
org-macro org-footnote org-pcomplete pcomplete org-list org-faces
org-entities noutline outline org-version ob-emacs-lisp ob ob-tangle
org-src ob-ref ob-lob ob-table ob-keys ob-exp ob-comint ob-core ob-eval
org-compat org-macs org-loaddefs solar cal-dst flyspell ispell ffap
face-remap f eww mm-url gnus nnheader thingatpt eval-sexp-fu rx cl-extra
highlight etags fileloop xref project epa-mail elfeed-show elfeed-search
wid-edit message rmc format-spec rfc822 mml mml-sec epa epg epg-config
gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse
rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mail-utils
gmm-utils mailheader shr text-property-search puny svg dom elfeed-csv
elfeed elfeed-curl url url-proxy url-privacy url-expand url-methods
url-history url-cookie url-domsuf mailcap elfeed-log elfeed-db
elfeed-lib url-util time-date avl-tree generator url-queue url-parse
url-vars xml-query xml dollar doc-view jka-compr image-mode dired-x
dired-subtree dired-narrow easy-mmode delsel dired-hacks-utils dired
dired-loaddefs diminish diff desktop frameset debug backtrace find-func
dart-mode edmacro kmacro s ucs-normalize help-mode dash cc-langs
copyright compile comint ring cc-mode cc-fonts cc-guess cc-menus cc-cmds
cc-styles cc-align cc-engine cc-vars cc-defs cal-menu calendar
cal-loaddefs browse-url boxquote rect bookmark pp bbdb-vcard bbdb-com
crm mailabbrev vcard bbdb derived easymenu bbdb-site timezone autoinsert
auth-source eieio eieio-core eieio-loaddefs password-cache json subr-x
map seq byte-opt bytecomp byte-compile cconv apropos ansi-color
ace-jump-mode advice cl-macs cl gv cl-seq cl-loaddefs cl-lib mule-util
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode
lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded 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 threads dbusbind inotify lcms2 dynamic-setting
system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit
x multi-tty make-network-process emacs)

Memory information:
((conses 16 990275 71274)
 (symbols 48 50169 30)
 (strings 32 169409 11941)
 (string-bytes 1 5711072)
 (vectors 16 91201)
 (vector-slots 8 1897909 201284)
 (floats 8 779 284)
 (intervals 56 13672 1432)
 (buffers 992 61))

-- 
İ. Göktuğ Kayaalp	<https://www.gkayaalp.com/>
			 024C 30DD 597D 142B 49AC
			 40EB 465C D949 B101 2427




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36396; Package emacs. (Wed, 26 Jun 2019 22:24:01 GMT) Full text and rfc822 format available.

Message #8 received at 36396 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Göktuğ Kayaalp <self <at> gkayaalp.com>
Cc: 36396 <at> debbugs.gnu.org
Subject: Re: bug#36396: 27.0.50;
 rx-to-string fails: wrong-type-argument characterp "\\(?"
Date: Wed, 26 Jun 2019 18:23:26 -0400
Göktuğ Kayaalp <self <at> gkayaalp.com> writes:

> I started encountering this after building
> "260b6c2c931d74ef64dacb20b7fcae6f888e6d42" today.

I think this might be fixed in the next commit [1: 9233865b70], at least
I can't reproduce in current master.

[1: 9233865b70]: 2019-06-26 08:50:27 -0400
  Fix (rx-to-string (and (literal STR) (regexp STR)) regression
  https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=9233865b7005831e63755eb84ae7da060f878a55




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36396; Package emacs. (Thu, 27 Jun 2019 20:38:02 GMT) Full text and rfc822 format available.

Message #11 received at 36396 <at> debbugs.gnu.org (full text, mbox):

From: Göktuğ Kayaalp <self <at> gkayaalp.com>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: 36396 <at> debbugs.gnu.org
Subject: Re: bug#36396: 27.0.50;
 rx-to-string fails: wrong-type-argument characterp "\\(?"
Date: Thu, 27 Jun 2019 23:36:30 +0300
On 2019-06-26 18:23 -04, Noam Postavsky <npostavs <at> gmail.com> wrote:
> Göktuğ Kayaalp <self <at> gkayaalp.com> writes:
>
>> I started encountering this after building
>> "260b6c2c931d74ef64dacb20b7fcae6f888e6d42" today.
>
> I think this might be fixed in the next commit [1: 9233865b70], at least
> I can't reproduce in current master.

It is fixed indeed, sorry for not checking new commits first.

> [1: 9233865b70]: 2019-06-26 08:50:27 -0400
>   Fix (rx-to-string (and (literal STR) (regexp STR)) regression
>   https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=9233865b7005831e63755eb84ae7da060f878a55
>

-- 
İ. Göktuğ Kayaalp	<https://www.gkayaalp.com/>
			 024C 30DD 597D 142B 49AC
			 40EB 465C D949 B101 2427




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36396; Package emacs. (Thu, 27 Jun 2019 20:48:02 GMT) Full text and rfc822 format available.

Message #14 received at 36396 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Göktuğ Kayaalp <self <at> gkayaalp.com>
Cc: 36396 <at> debbugs.gnu.org, Noam Postavsky <npostavs <at> gmail.com>
Subject: Re: bug#36396: 27.0.50;
 rx-to-string fails: wrong-type-argument characterp "\\(?"
Date: Thu, 27 Jun 2019 16:47:05 -0400
tags 36396 fixed
close 36396 
quit

>> I think this might be fixed in the next commit [1: 9233865b70], at least
>> I can't reproduce in current master.
>
> It is fixed indeed, sorry for not checking new commits first.

It happens.  Sorry about breaking it in the first place :)




Added tag(s) fixed. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Thu, 27 Jun 2019 20:48:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 36396 <at> debbugs.gnu.org and Göktuğ Kayaalp <self <at> gkayaalp.com> Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Thu, 27 Jun 2019 20:48: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. (Fri, 26 Jul 2019 11:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 289 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.