the-kenny / weechat.el

Chat via weechat's relay protocol in Emacs
177 stars 41 forks source link

rx-check-any-string: Rx character range ‘_-#’ is reversed #77

Open emacsomancer opened 5 years ago

emacsomancer commented 5 years ago

In Emacs-git (Emacs 27.0.50), trying to launch weechat-connect fails with error: rx-check-any-string: Rx character range ‘_-#’ is reversed.

the-kenny commented 5 years ago

Huh, this is strange. Can you please try to reproduce it after running M-x toggle-debug-on-error and post the stacktrace here?

emacsomancer commented 5 years ago
Debugger entered--Lisp error: (error "Rx character range ‘_-#’ is reversed")
  signal(error ("Rx character range ‘_-#’ is reversed"))
  error("Rx character range `%c-%c' is reversed" 95 35)
  rx-check-any-string("FDB_-#il")
  rx-check-any("FDB_-#il")
  rx-check((in "FDB_-#il"))
  rx-any((in "FDB_-#il"))
  rx-form((in "FDB_-#il") :)
  #f(compiled-function (x) #<bytecode 0x157535bbec1d>)((in "FDB_-#il"))
  mapconcat(#f(compiled-function (x) #<bytecode 0x157535bbec1d>) ("b" (in "FDB_-#il")) nil)
  rx-and((seq "b" (in "FDB_-#il")))
  rx-form((seq "b" (in "FDB_-#il")) |)
  #f(compiled-function (x) #<bytecode 0x157535bbec4d>)((seq "b" (in "FDB_-#il")))
  mapconcat(#f(compiled-function (x) #<bytecode 0x157535bbec4d>) ((= 2 digit) (seq "@" (= 5 digit)) (seq "F" (or (= 2 digit) (seq (in "*!/_|\1\2\3\4") (= 2 digit)) (seq "@" (= 5 digit)) (seq "@" (in "*!/_|\1\2\3\4") (= 5 digit)))) (seq "B" (or (= 2 digit) (seq "@" (= 5 digit)))) (seq "*" (or (= 2 digit) (seq (in "*!/_|\1\2\3\4") (= 2 digit)) (seq "@" (= 5 digit)) (seq "@" (in "*!/_|\1\2\3\4") (= 5 digit)) (seq (or (= 2 digit) (seq (in "*!/_|\1\2\3\4") (= 2 digit)) (seq "@" (= 5 digit)) (seq "@" (in "*!/_|\1\2\3\4") (= 5 digit))) "," (or (= 2 digit) (seq (in "*!/_|\1\2\3\4") (= 2 digit)) (seq "@" (= 5 digit)) (seq "@" (in "*!/_|\1\2\3\4") (= 5 digit)))))) (seq "b" (in "FDB_-#il")) "\34") "\\|")
  rx-or((or (= 2 digit) (seq "@" (= 5 digit)) (seq "F" (or (= 2 digit) (seq (in "*!/_|\1\2\3\4") (= 2 digit)) (seq "@" (= 5 digit)) (seq "@" (in "*!/_|\1\2\3\4") (= 5 digit)))) (seq "B" (or (= 2 digit) (seq "@" (= 5 digit)))) (seq "*" (or (= 2 digit) (seq (in "*!/_|\1\2\3\4") (= 2 digit)) (seq "@" (= 5 digit)) (seq "@" (in "*!/_|\1\2\3\4") (= 5 digit)) (seq (or (= 2 digit) (seq (in "*!/_|\1\2\3\4") (= 2 digit)) (seq "@" (= 5 digit)) (seq "@" (in "*!/_|\1\2\3\4") (= 5 digit))) "," (or (= 2 digit) (seq (in "*!/_|\1\2\3\4") (= 2 digit)) (seq "@" (= 5 digit)) (seq "@" (in "*!/_|\1\2\3\4") (= 5 digit)))))) (seq "b" (in "FDB_-#il")) "\34"))
  rx-form((or (= 2 digit) (seq "@" (= 5 digit)) (seq "F" (or (= 2 digit) (seq (in "*!/_|\1\2\3\4") (= 2 digit)) (seq "@" (= 5 digit)) (seq "@" (in "*!/_|\1\2\3\4") (= 5 digit)))) (seq "B" (or (= 2 digit) (seq "@" (= 5 digit)))) (seq "*" (or (= 2 digit) (seq (in "*!/_|\1\2\3\4") (= 2 digit)) (seq "@" (= 5 digit)) (seq "@" (in "*!/_|\1\2\3\4") (= 5 digit)) (seq (or (= 2 digit) (seq (in "*!/_|\1\2\3\4") (= 2 digit)) (seq "@" (= 5 digit)) (seq "@" (in "*!/_|\1\2\3\4") (= 5 digit))) "," (or (= 2 digit) (seq (in "*!/_|\1\2\3\4") (= 2 digit)) (seq "@" (= 5 digit)) (seq "@" (in "*!/_|\1\2\3\4") (= 5 digit)))))) (seq "b" (in "FDB_-#il")) "\34") :)
  #f(compiled-function (x) #<bytecode 0x157535bbec1d>)((or (= 2 digit) (seq "@" (= 5 digit)) (seq "F" (or (= 2 digit) (seq (in "*!/_|\1\2\3\4") (= 2 digit)) (seq "@" (= 5 digit)) (seq "@" (in "*!/_|\1\2\3\4") (= 5 digit)))) (seq "B" (or (= 2 digit) (seq "@" (= 5 digit)))) (seq "*" (or (= 2 digit) (seq (in "*!/_|\1\2\3\4") (= 2 digit)) (seq "@" (= 5 digit)) (seq "@" (in "*!/_|\1\2\3\4") (= 5 digit)) (seq (or (= 2 digit) (seq (in "*!/_|\1\2\3\4") (= 2 digit)) (seq "@" (= 5 digit)) (seq "@" (in "*!/_|\1\2\3\4") (= 5 digit))) "," (or (= 2 digit) (seq (in "*!/_|\1\2\3\4") (= 2 digit)) (seq "@" (= 5 digit)) (seq "@" (in "*!/_|\1\2\3\4") (= 5 digit)))))) (seq "b" (in "FDB_-#il")) "\34"))
  mapconcat(#f(compiled-function (x) #<bytecode 0x157535bbec1d>) ("\31" (or (= 2 digit) (seq "@" (= 5 digit)) (seq "F" (or (= 2 digit) (seq (in "*!/_|\1\2\3\4") (= 2 digit)) (seq "@" (= 5 digit)) (seq "@" (in "*!/_|\1\2\3\4") (= 5 digit)))) (seq "B" (or (= 2 digit) (seq "@" (= 5 digit)))) (seq "*" (or (= 2 digit) (seq (in "*!/_|\1\2\3\4") (= 2 digit)) (seq "@" (= 5 digit)) (seq "@" (in "*!/_|\1\2\3\4") (= 5 digit)) (seq (or (= 2 digit) (seq ... ...) (seq "@" ...) (seq "@" ... ...)) "," (or (= 2 digit) (seq ... ...) (seq "@" ...) (seq "@" ... ...))))) (seq "b" (in "FDB_-#il")) "\34")) nil)
  rx-and((seq "\31" (or (= 2 digit) (seq "@" (= 5 digit)) (seq "F" (or (= 2 digit) (seq (in "*!/_|\1\2\3\4") (= 2 digit)) (seq "@" (= 5 digit)) (seq "@" (in "*!/_|\1\2\3\4") (= 5 digit)))) (seq "B" (or (= 2 digit) (seq "@" (= 5 digit)))) (seq "*" (or (= 2 digit) (seq (in "*!/_|\1\2\3\4") (= 2 digit)) (seq "@" (= 5 digit)) (seq "@" (in "*!/_|\1\2\3\4") (= 5 digit)) (seq (or (= 2 digit) (seq ... ...) (seq "@" ...) (seq "@" ... ...)) "," (or (= 2 digit) (seq ... ...) (seq "@" ...) (seq "@" ... ...))))) (seq "b" (in "FDB_-#il")) "\34")))
  rx-form((seq "\31" (or (= 2 digit) (seq "@" (= 5 digit)) (seq "F" (or (= 2 digit) (seq (in "*!/_|\1\2\3\4") (= 2 digit)) (seq "@" (= 5 digit)) (seq "@" (in "*!/_|\1\2\3\4") (= 5 digit)))) (seq "B" (or (= 2 digit) (seq "@" (= 5 digit)))) (seq "*" (or (= 2 digit) (seq (in "*!/_|\1\2\3\4") (= 2 digit)) (seq "@" (= 5 digit)) (seq "@" (in "*!/_|\1\2\3\4") (= 5 digit)) (seq (or (= 2 digit) (seq ... ...) (seq "@" ...) (seq "@" ... ...)) "," (or (= 2 digit) (seq ... ...) (seq "@" ...) (seq "@" ... ...))))) (seq "b" (in "FDB_-#il")) "\34")) |)
  #f(compiled-function (x) #<bytecode 0x157535bbec4d>)((seq "\31" (or (= 2 digit) (seq "@" (= 5 digit)) (seq "F" (or (= 2 digit) (seq (in "*!/_|\1\2\3\4") (= 2 digit)) (seq "@" (= 5 digit)) (seq "@" (in "*!/_|\1\2\3\4") (= 5 digit)))) (seq "B" (or (= 2 digit) (seq "@" (= 5 digit)))) (seq "*" (or (= 2 digit) (seq (in "*!/_|\1\2\3\4") (= 2 digit)) (seq "@" (= 5 digit)) (seq "@" (in "*!/_|\1\2\3\4") (= 5 digit)) (seq (or (= 2 digit) (seq ... ...) (seq "@" ...) (seq "@" ... ...)) "," (or (= 2 digit) (seq ... ...) (seq "@" ...) (seq "@" ... ...))))) (seq "b" (in "FDB_-#il")) "\34")))
  mapconcat(#f(compiled-function (x) #<bytecode 0x157535bbec4d>) ((seq "\31" (or (= 2 digit) (seq "@" (= 5 digit)) (seq "F" (or (= 2 digit) (seq (in "*!/_|\1\2\3\4") (= 2 digit)) (seq "@" (= 5 digit)) (seq "@" (in "*!/_|\1\2\3\4") (= 5 digit)))) (seq "B" (or (= 2 digit) (seq "@" (= 5 digit)))) (seq "*" (or (= 2 digit) (seq (in "*!/_|\1\2\3\4") (= 2 digit)) (seq "@" (= 5 digit)) (seq "@" (in "*!/_|\1\2\3\4") (= 5 digit)) (seq (or ... ... ... ...) "," (or ... ... ... ...)))) (seq "b" (in "FDB_-#il")) "\34")) (seq "\32" (in "*!/_|\1\2\3\4")) (seq "\33" (in "*!/_|\1\2\3\4")) "\34") "\\|")
  rx-or((or (seq "\31" (or (= 2 digit) (seq "@" (= 5 digit)) (seq "F" (or (= 2 digit) (seq (in "*!/_|\1\2\3\4") (= 2 digit)) (seq "@" (= 5 digit)) (seq "@" (in "*!/_|\1\2\3\4") (= 5 digit)))) (seq "B" (or (= 2 digit) (seq "@" (= 5 digit)))) (seq "*" (or (= 2 digit) (seq (in "*!/_|\1\2\3\4") (= 2 digit)) (seq "@" (= 5 digit)) (seq "@" (in "*!/_|\1\2\3\4") (= 5 digit)) (seq (or ... ... ... ...) "," (or ... ... ... ...)))) (seq "b" (in "FDB_-#il")) "\34")) (seq "\32" (in "*!/_|\1\2\3\4")) (seq "\33" (in "*!/_|\1\2\3\4")) "\34"))
  rx-form((or (seq "\31" (or (= 2 digit) (seq "@" (= 5 digit)) (seq "F" (or (= 2 digit) (seq (in "*!/_|\1\2\3\4") (= 2 digit)) (seq "@" (= 5 digit)) (seq "@" (in "*!/_|\1\2\3\4") (= 5 digit)))) (seq "B" (or (= 2 digit) (seq "@" (= 5 digit)))) (seq "*" (or (= 2 digit) (seq (in "*!/_|\1\2\3\4") (= 2 digit)) (seq "@" (= 5 digit)) (seq "@" (in "*!/_|\1\2\3\4") (= 5 digit)) (seq (or ... ... ... ...) "," (or ... ... ... ...)))) (seq "b" (in "FDB_-#il")) "\34")) (seq "\32" (in "*!/_|\1\2\3\4")) (seq "\33" (in "*!/_|\1\2\3\4")) "\34"))
  byte-code("\300\301\302\2\303BB\304\302\305\5\306BBB\307\310\302\311\310\6\10\6\7\302\312\310\6\15\6\15\6\15\6\15\257\5E\302\313\310\6\16\6\15EE\302\314\310..." [(in "*!/_|\1\2\3\4") (= 2 digit) seq ((= 2 digit)) (seq "@" (= 5 digit)) "@" ((= 5 digit)) rx-form or "\31" "F" "B" "*" "," ((seq "b" (in "FDB_-#il")) "\34") "\32" "\33" ("\34")] 29)
  (defvar weechat-formatting-regex (byte-code "\300\301\302\2\303BB\304\302\305\5\306BBB\307\310\302\311\310\6\10\6\7\302\312\310\6\15\6\15\6\15\6\15\257\5E\302\313\310\6\16\6\15EE\302\314\310..." [(in "*!/_|\1\2\3\4") (= 2 digit) seq ((= 2 digit)) (seq "@" (= 5 digit)) "@" ((= 5 digit)) rx-form or "\31" "F" "B" "*" "," ((seq "b" (in "FDB_-#il")) "\34") "\32" "\33" ("\34")] 29))
  require(weechat-color)
  byte-code("\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\300\306!\210\307\310\311\312\313DD\314\315\316\317\320&\7\210\307\321\311\312\322DD\323\315\316\317..." [require weechat-core weechat-relay weechat-color cl-lib format-spec s custom-declare-variable weechat-host-default funcall function #f(compiled-function () #<bytecode 0x157535fbd9a5>) "Default host for `weechat-connect'." :type string :group weechat weechat-port-default #f(compiled-function () #<bytecode 0x157535fbd9b1>) "Default port for `weechat-connect'." weechat-mode-default #f(compiled-function () #<bytecode 0x157535fbd9bd>) "Wether to connect via SSL by default.\n\nNull or 'pl..." (choice (const :tag "Plain" 'plain) (const :tag "SSL/TLS" 'ssl) (string :tag "Command to run")) weechat-modules #f(compiled-function () #<bytecode 0x157535fbd9c9>) "Modules loaded when weechat.el is loaded.\n\nEach mo..." (repeat symbol) weechat-read-only #f(compiled-function () #<bytecode 0x157535fbd9d5>) "Whether to make text in weechat buffers read-only." boolean weechat-initial-lines #f(compiled-function () #<bytecode 0x157535fbd9e1>) "Number of lines to show when initializing a channe..." integer weechat-more-lines-amount #f(compiled-function () #<bytecode 0x157535fbd9ed>) "Number of extra lines `weechat-get-more-lines' wil..." weechat-prompt #f(compiled-function () #<bytecode 0x157535fbd9f9>) "The Weechat prompt." weechat-buffer-line-limit #f(compiled-function () #<bytecode 0x157535fbda05>) "Number of max.  lines per buffer." (choice integer (const :tag "Unlimited" nil)) weechat-return-always-replace-input #f(compiled-function () #<bytecode 0x157535fbda11>) "Always replace current input with line on return.\n..." weechat-auto-move-cursor-to-prompt ...] 10)
  require(weechat nil t)
  (not (require 'weechat nil t))
  (if (not (require 'weechat nil t)) (display-warning 'use-package (format "Cannot load %s" 'weechat) :error) (condition-case err (progn (load-library "weechat-tracking") (load-library "weechat-latex") (load-library "weechat-image") (load-library "weechat-sauron") t) ((debug error) (funcall use-package--warning56 :config err))))
  (condition-case err (if (not (require 'weechat nil t)) (display-warning 'use-package (format "Cannot load %s" 'weechat) :error) (condition-case err (progn (load-library "weechat-tracking") (load-library "weechat-latex") (load-library "weechat-image") (load-library "weechat-sauron") t) ((debug error) (funcall use-package--warning56 :config err)))) ((debug error) (funcall use-package--warning56 :catch err)))
  eval-buffer(#<buffer  *load*> nil "/home/emacsomancer/.emacs.d/init.el" nil t)  ; Reading at buffer position 109086
  load-with-code-conversion("/home/emacsomancer/.emacs.d/init.el" "/home/emacsomancer/.emacs.d/init.el" t t)
  load("/home/emacsomancer/.emacs.d/init" noerror nomessage)
  startup--load-user-init-file(#f(compiled-function () #<bytecode 0x1ff8cbe057f1>) #f(compiled-function () #<bytecode 0x1ff8cbe057c1>) t)
  command-line()
  normal-top-level()
okeatime commented 5 years ago

Culprit is this line. https://github.com/the-kenny/weechat.el/blob/d9a13306ea8be27367f92e9202d116a88fa1f441/weechat-color.el#L95

Probably it should be "-FDB#il" instead of "FDB-#il" ?

adisbladis commented 5 years ago

@okeatime I can confirm that works for me.

emacsomancer commented 5 years ago

@okeatime changing this indeed resolves the issue in emacs-git.