New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some regexes cause an error #393

Closed
vermiculus opened this Issue Feb 22, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@vermiculus

vermiculus commented Feb 22, 2016

Compare

(swiper (rx (or "swiper" "interactive") " " (or "list" "symbol")))
; i.e., (swiper "\\(?:interactive\\|swiper\\) \\(?:list\\|symbol\\)")

with

(swiper "\\(swiper\\|interactive\\) \\(list\\|symbol\\)")

The only difference I see is the ?: form.


The first form yields

Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil)
  add-face-text-property(nil nil ivy-minibuffer-match-face-2 nil #("   (interactive (list (if (eq major-mode 'dired-mode)" 0 1 (display "240  ") 1 4 (fontified nil) 4 21 (fontified nil face ivy-minibuffer-match-face-1) 21 53 (fontified nil)))
  ivy-add-face-text-property(nil nil ivy-minibuffer-match-face-2 #("   (interactive (list (if (eq major-mode 'dired-mode)" 0 1 (display "240  ") 1 4 (fontified nil) 4 21 (fontified nil face ivy-minibuffer-match-face-1) 21 53 (fontified nil)))
  ivy--format-minibuffer-line(#("   (interactive (list (if (eq major-mode 'dired-mode)" 0 1 (display "240  ") 1 53 (fontified nil)))
  #[257 "\300�!\301B\207" [ivy--format-minibuffer-line nil] 3 "\n\n(fn CAND)"](#("   (interactive (list (if (eq major-mode 'dired-mode)" 0 1 (display "240  ") 1 53 (fontified nil)))
  mapcar(#[257 "\300�!\301B\207" [ivy--format-minibuffer-line nil] 3 "\n\n(fn CAND)"] (#("   (interactive (list (if (eq major-mode 'dired-mode)" 0 1 (display "240  ") 1 53 (fontified nil)) #("   (interactive (list (if (eq major-mode 'dired-mode)" 0 1 (display "977  ") 1 53 (fontified nil)) #("     (interactive (list 'symbol))" 0 1 (display "1106 ") 1 33 (fontified nil)) #("     (swiper \"\\\\(swiper\\\\|interactive\\\\) \\\\(list\\\\|symbol\\\\)\"))" 0 1 (display "1112 ") 1 5 (fontified nil) 5 6 (fontified nil) 6 12 (fontified nil) 12 13 (fontified nil) 13 14 (face font-lock-string-face fontified nil) 14 15 (face (font-lock-regexp-grouping-backslash font-lock-string-face) fontified nil) 15 16 (face (font-lock-regexp-grouping-backslash font-lock-string-face) fontified nil) 16 17 (face (font-lock-regexp-grouping-construct font-lock-string-face) fontified nil) 17 23 (face font-lock-string-face fontified nil) 23 24 (face (font-lock-regexp-grouping-backslash font-lock-string-face) fontified nil) 24 25 (face (font-lock-regexp-grouping-backslash font-lock-string-face) fontified nil) 25 26 (face (font-lock-regexp-grouping-construct font-lock-string-face) fontified nil) 26 37 (face font-lock-string-face fontified nil) 37 38 (face (font-lock-regexp-grouping-backslash font-lock-string-face) fontified nil) 38 39 (face (font-lock-regexp-grouping-backslash font-lock-string-face) fontified nil) 39 40 (face (font-lock-regexp-grouping-construct font-lock-string-face) fontified nil) 40 41 (face font-lock-string-face fontified nil) 41 42 (face (font-lock-regexp-grouping-backslash font-lock-string-face) fontified nil) 42 43 (face (font-lock-regexp-grouping-backslash font-lock-string-face) fontified nil) 43 44 (face (font-lock-regexp-grouping-construct font-lock-string-face) fontified nil) 44 48 (face font-lock-string-face fontified nil) 48 49 (face (font-lock-regexp-grouping-backslash font-lock-string-face) fontified nil) 49 50 (face (font-lock-regexp-grouping-backslash font-lock-string-face) fontified nil) 50 51 (face (font-lock-regexp-grouping-construct font-lock-string-face) fontified nil) 51 57 (face font-lock-string-face fontified nil) 57 58 (face (font-lock-regexp-grouping-backslash font-lock-string-face) fontified nil) 58 59 (face (font-lock-regexp-grouping-backslash font-lock-string-face) fontified nil) 59 60 (face (font-lock-regexp-grouping-construct font-lock-string-face) fontified nil) 60 61 (face font-lock-string-face fontified nil) 61 62 (rear-nonsticky t fontified nil) 62 63 (fontified nil)) #("   (interactive (list *-startup-files))" 0 1 (display "1240 ") 1 39 (fontified nil))))
  ivy--format((#("   (interactive (list (if (eq major-mode 'dired-mode)" 0 1 (display "240  ") 1 53 (fontified nil)) #("   (interactive (list (if (eq major-mode 'dired-mode)" 0 1 (display "977  ") 1 53 (fontified nil)) #("     (interactive (list 'symbol))" 0 1 (display "1106 ") 1 33 (fontified nil)) #("     (swiper \"\\\\(swiper\\\\|interactive\\\\) \\\\(list\\\\|symbol\\\\)\"))" 0 1 (display "1112 ") 1 5 (fontified nil) 5 6 (fontified nil) 6 12 (fontified nil) 12 13 (fontified nil) 13 14 (face font-lock-string-face fontified nil) 14 15 (face (font-lock-regexp-grouping-backslash font-lock-string-face) fontified nil) 15 16 (face (font-lock-regexp-grouping-backslash font-lock-string-face) fontified nil) 16 17 (face (font-lock-regexp-grouping-construct font-lock-string-face) fontified nil) 17 23 (face font-lock-string-face fontified nil) 23 24 (face (font-lock-regexp-grouping-backslash font-lock-string-face) fontified nil) 24 25 (face (font-lock-regexp-grouping-backslash font-lock-string-face) fontified nil) 25 26 (face (font-lock-regexp-grouping-construct font-lock-string-face) fontified nil) 26 37 (face font-lock-string-face fontified nil) 37 38 (face (font-lock-regexp-grouping-backslash font-lock-string-face) fontified nil) 38 39 (face (font-lock-regexp-grouping-backslash font-lock-string-face) fontified nil) 39 40 (face (font-lock-regexp-grouping-construct font-lock-string-face) fontified nil) 40 41 (face font-lock-string-face fontified nil) 41 42 (face (font-lock-regexp-grouping-backslash font-lock-string-face) fontified nil) 42 43 (face (font-lock-regexp-grouping-backslash font-lock-string-face) fontified nil) 43 44 (face (font-lock-regexp-grouping-construct font-lock-string-face) fontified nil) 44 48 (face font-lock-string-face fontified nil) 48 49 (face (font-lock-regexp-grouping-backslash font-lock-string-face) fontified nil) 49 50 (face (font-lock-regexp-grouping-backslash font-lock-string-face) fontified nil) 50 51 (face (font-lock-regexp-grouping-construct font-lock-string-face) fontified nil) 51 57 (face font-lock-string-face fontified nil) 57 58 (face (font-lock-regexp-grouping-backslash font-lock-string-face) fontified nil) 58 59 (face (font-lock-regexp-grouping-backslash font-lock-string-face) fontified nil) 59 60 (face (font-lock-regexp-grouping-construct font-lock-string-face) fontified nil) 60 61 (face font-lock-string-face fontified nil) 61 62 (rear-nonsticky t fontified nil) 62 63 (fontified nil)) #("   (interactive (list *-startup-files))" 0 1 (display "1240 ") 1 39 (fontified nil))))
  ivy--exhibit()
  ivy--minibuffer-setup()
  #[0 "\301\302\300\242\"\210\303 \207" [(#0) remove-hook minibuffer-setup-hook ivy--minibuffer-setup] 3 "\n\n(fn)"]()
  read-from-minibuffer("Swiper: " "\\(?:interactive\\|swiper\\) \\(?:list\\|symbol\\)" (keymap (keymap (3 keymap (6 . swiper-toggle-face-matching)) (67108919 . swiper-mc) (67108903 . swiper-avy) (12 . swiper-recenter-top-bottom) (27 keymap (113 . swiper-query-replace))) keymap (8 keymap (109 . ivy-help)) (3 keymap (1 . ivy-toggle-ignore) (15 . ivy-occur)) (67108903 . ivy-avy) (33554464 . ivy-restrict-to-matches) (11 . ivy-kill-line) (15 . hydra-ivy/body) (22 . ivy-scroll-up-command) (7 . minibuffer-keyboard-quit) (6 . ivy-forward-char) (4 . ivy-delete-char) (127 . ivy-backward-delete-char) (32 . self-insert-command) (18 . ivy-reverse-i-search) (19 . ivy-next-line-or-history) (up . ivy-previous-line) (down . ivy-next-line) (16 . ivy-previous-line) (14 . ivy-next-line) (9 . ivy-partial-or-done) (10 . ivy-alt-done) (27 keymap (1 . ivy-read-action) (119 . ivy-kill-ring-save) (15 . ivy-dispatching-call) (111 . ivy-dispatching-done) (105 . ivy-insert-current) (106 . ivy-yank-word) (113 . ivy-toggle-regexp-quote) (16 . ivy-previous-line-and-call) (14 . ivy-next-line-and-call) (118 . ivy-scroll-down-command) (112 . ivy-previous-history-element) (110 . ivy-next-history-element) (62 . ivy-end-of-buffer) (60 . ivy-beginning-of-buffer) (100 . ivy-kill-word) (127 . ivy-backward-kill-word) (10 . ivy-immediate-done) (13 . ivy-call)) (13 . ivy-done)) nil swiper-history)
  ivy-read("Swiper: " (#(" (setq debug-on-error t)" 0 1 (display "1    ") 1 24 (fontified nil)) #(" (defun find-obsolete (list-of-functions &optional so-far)" 0 1 (display "2    ") 1 2 (fontified nil) 2 7 (face font-lock-keyword-face fontified nil) 7 8 (fontified nil) 8 21 (face font-lock-function-name-face fontified nil) 21 41 (fontified nil) 41 50 (face font-lock-type-face fontified nil) 50 58 (fontified nil)) #("   (if list-of-functions" 0 1 (display "3    ") 1 4 (fontified nil) 4 6 (face font-lock-keyword-face fontified nil) 6 24 (fontified nil)) #("       (let* ((f (first list-of-functions))" 0 1 (display "4    ") 1 8 (fontified nil) 8 12 (face font-lock-keyword-face fontified nil) 12 43 (fontified nil)) #("              (obsolete (plist-get (symbol-plist f) 'byte-obsolete-info)))" 0 1 (display "5    ") 1 74 (fontified nil)) #("         (find-obsolete" 0 1 (display "6    ") 1 23 (fontified nil)) #("          (rest list-of-functions)" 0 1 (display "7    ") 1 34 (fontified nil)) #("          (if obsolete" 0 1 (display "8    ") 1 11 (fontified nil) 11 13 (face font-lock-keyword-face fontified nil) 13 22 (fontified nil)) #("              (cons (cons f (car obsolete)) so-far)" 0 1 (display "9    ") 1 51 (fontified nil)) #("            so-far)))" 0 1 (display "10   ") 1 21 (fontified nil)) #("     so-far))" 0 1 (display "11   ") 1 13 (fontified nil)) #(" " 0 1 (display "12   ")) #(" (setq gc-cons-threshold 100000000)" 0 1 (display "13   ") 1 35 (fontified nil)) #(" (add-to-list 'load-path \".\")" 0 1 (display "14   ") 1 25 (fontified nil) 25 28 (face font-lock-string-face fontified nil) 28 29 (fontified nil)) #(" " 0 1 (display "15   ")) #(" (defun *-insert-hfill (char)" 0 1 (display "16   ") 1 2 (fontified nil) 2 7 (face font-lock-keyword-face fontified nil) 7 8 (fontified nil) 8 22 (face font-lock-function-name-face fontified nil) 22 29 (fontified nil)) #("   (interactive" 0 1 (display "17   ") 1 15 (fontified nil)) #("    (list (if current-prefix-arg" 0 1 (display "18   ") 1 11 (fontified nil) 11 13 (face font-lock-keyword-face fontified nil) 13 32 (fontified nil)) #("              (let ((input (read-char \"Fill char: \")))" 0 1 (display "19   ") 1 15 (fontified nil) 15 18 (face font-lock-keyword-face fontified nil) 18 38 (fontified nil) 38 51 (face font-lock-string-face fontified nil) 51 54 (fontified nil)) #("                (cond" 0 1 (display "20   ") 1 17 (fontified nil) 17 21 (face font-lock-keyword-face fontified nil)) #("                 ((eq input ?r) nil)" 0 1 (display "21   ") 1 36 (fontified nil)) #("                 (t input))))))" 0 1 (display "22   ") 1 31 (fontified nil)) #("   (let* ((eol (save-excursion" 0 1 (display "23   ") 1 4 (fontified nil) 4 8 (face font-lock-keyword-face fontified nil) 8 16 (fontified nil) 16 30 (face font-lock-keyword-face fontified nil)) #("                 (move-end-of-line nil)" 0 1 (display "24   ") 1 39 (fontified nil)) #("                 (current-column))))" 0 1 (display "25   ") 1 36 (fontified nil)) #("     (insert-char (or char ? ) (- (current-fill-column) eol))))" 0 1 (display "26   ") 1 63 (fontified nil)) #(" " 0 1 (display "27   ")) #(" " 0 1 (display "28   ")) #(" \f" 0 1 (display "29   ") 1 2 (fontified nil)) #(" ;; Multi-Platform Support" 0 1 (display "30   ") 1 4 (face font-lock-comment-delimiter-face fontified nil) 4 26 (face font-lock-comment-face fontified nil)) #(" " 0 1 (display "31   ")) #(" (defconst *-windows-p" 0 1 (display "32   ") 1 2 (fontified nil) 2 10 (face font-lock-keyword-face fontified nil) 10 11 (fontified nil) 11 22 (face font-lock-variable-name-face fontified nil)) #("   (eq system-type 'windows-nt)" 0 1 (display "33   ") 1 31 (fontified nil)) #("   \"Predicate indicating if this is a Windows environment.\")" 0 1 (display "34   ") 1 3 (fontified nil) 3 59 (face font-lock-doc-face fontified nil) 59 60 (fontified nil)) #(" (defconst *-osx-p" 0 1 (display "35   ") 1 2 (fontified nil) 2 10 (face font-lock-keyword-face fontified nil) 10 11 (fontified nil) 11 18 (face font-lock-variable-name-face fontified nil)) #("   (eq system-type 'darwin)" 0 1 (display "36   ") 1 27 (fontified nil)) #("   \"Predicate indicating if this is a OS X environment.\")" 0 1 (display "37   ") 1 3 (fontified nil) 3 56 (face font-lock-doc-face fontified nil) 56 57 (fontified nil)) #(" (defconst *-redhat-p" 0 1 (display "38   ") 1 2 (fontified nil) 2 10 (face font-lock-keyword-face fontified nil) 10 11 (fontified nil) 11 21 (face font-lock-variable-name-face fontified nil)) #("   (eq system-type 'gnu/linux)" 0 1 (display "39   ") 1 30 (fontified nil)) #("   \"Predicate indicating if this is a Redhat environment.\")" 0 1 (display "40   ") 1 3 (fontified nil) 3 58 (face font-lock-doc-face fontified nil) 58 59 (fontified nil)) #(" " 0 1 (display "41   ")) #(" (when *-windows-p" 0 1 (display "42   ") 1 2 (fontified nil) 2 6 (face font-lock-keyword-face fontified nil) 6 18 (fontified nil)) #("   ;; Fix default directory for non-*nix platforms" 0 1 (display "43   ") 1 3 (fontified nil) 3 6 (face font-lock-comment-delimiter-face fontified nil) 6 50 (face font-lock-comment-face fontified nil)) #("   (setq-default" 0 1 (display "44   ") 1 16 (fontified nil)) #("    default-directory" 0 1 (display "45   ") 1 21 (fontified nil)) #("    (expand-file-name" 0 1 (display "46   ") 1 21 (fontified nil)) #("     \"../..\"" 0 1 (display "47   ") 1 5 (fontified nil) 5 12 (face font-lock-string-face fontified nil)) #("     (getenv \"HOME\"))))" 0 1 (display "48   ") 1 13 (fontified nil) 13 19 (face font-lock-string-face fontified nil) 19 23 (fontified nil)) #(" " 0 1 (display "49   ")) #(" ;; Dropbox" 0 1 (display "50   ") 1 4 (face font-lock-comment-delimiter-face fontified nil) 4 11 (face font-lock-comment-face fontified nil)) ...) :initial-input "\\(?:interactive\\|swiper\\) \\(?:list\\|symbol\\)" :keymap (keymap (3 keymap (6 . swiper-toggle-face-matching)) (67108919 . swiper-mc) (67108903 . swiper-avy) (12 . swiper-recenter-top-bottom) (27 keymap (113 . swiper-query-replace))) :preselect 1110 :require-match t :update-fn swiper--update-input-ivy :unwind swiper--cleanup :action swiper--action :re-builder swiper--re-builder :history swiper-history :caller swiper)
  swiper--ivy("\\(?:interactive\\|swiper\\) \\(?:list\\|symbol\\)")
  swiper("\\(?:interactive\\|swiper\\) \\(?:list\\|symbol\\)")
  eval((swiper (rx (or "swiper" "interactive") " " (or "list" "symbol"))) nil)
  pp-eval-expression((swiper (rx (or "swiper" "interactive") " " (or "list" "symbol"))))
  pp-eval-last-sexp(nil)
  call-interactively(pp-eval-last-sexp nil nil)
  command-execute(pp-eval-last-sexp)

@abo-abo abo-abo closed this in 9ffa9c7 Feb 22, 2016

@abo-abo

This comment has been minimized.

Show comment
Hide comment
@abo-abo

abo-abo Feb 22, 2016

Owner

Thanks.

Owner

abo-abo commented Feb 22, 2016

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment