benma / visual-regexp-steroids.el

Extends visual-regexp to support other regexp engines
255 stars 14 forks source link

Failling in *Packages* buffer #21

Closed xiaoxinyi closed 7 years ago

xiaoxinyi commented 7 years ago

M-x package-list-packages In *Packages* buffer, cannot use vr/isearch-forward or vr/isearch-backward.

benma commented 7 years ago

Thanks. It works for me. Please specify.

xiaoxinyi commented 7 years ago

@benma It works fine in other buffer. But in *Packages* buffer, I run M-x vr/isearch-forward type just a character r, it mark all rs in this buffer, but message Failing regrex I-search. I also cannot forward to next.

benma commented 7 years ago

This also works for me. What is your Emacs version? Did you try with emacs -q, i.e. not loading any other packages?

xiaoxinyi commented 7 years ago

@benma I work on GNU Emacs 25.1.1 .

It's my configuration :

(use-package visual-regexp
  :ensure t
  :init (use-package visual-regexp-steroids
          :ensure t)
  :bind* (
          ("C-c r" . vr/replace)
          ("C-c q" . vr/query-replace)
          ("C-c m" . vr/mc-mark)
          ("C-M-s" . vr/isearch-forward)
          ("C-M-r" . vr/isearch-backward))

  )
xiaoxinyi commented 7 years ago

@benma I use emacs -q to initialize only two packages. It works fine.

benma commented 7 years ago

This means that some other configuration of yours is interfering. Please bisect and report back :)

xiaoxinyi commented 7 years ago
script failed:Traceback (most recent call last):
  File "~/.emacs.d/elpa/visual-regexp-steroids-20160516.1238/regexp.py", line 61, in <module>
    region = sys.stdin.read()
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/codecs.py", line 492, in read
    newchars, decodedbytes = self.decode(data, self.errors)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xf6 in position 156398: invalid start byte
 [2 times]
script failed:Traceback (most recent call last):
  File "~/.emacs.d/elpa/visual-regexp-steroids-20160516.1238/regexp.py", line 61, in <module>
    region = sys.stdin.read()
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/codecs.py", line 492, in read
    newchars, decodedbytes = self.decode(data, self.errors)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xf6 in position 156398: invalid start byte
 [2 times]

This is the error message.

benma commented 7 years ago

Thanks. Did I understand correctly that with emacs -q, there is no error?

If you can extract and paste the contents of your packages buffer, maybe we can see what utf8 problem there is.

xiaoxinyi commented 7 years ago

@benma No problem with emacs -q.

benma commented 7 years ago

Ok, then please find the configuration that breaks it.

Does vr/replace work, or is it just isearch?

Does it work in other buffers?

xiaoxinyi commented 7 years ago

@benma Thanks. vr/replace works well in other buffers.

xiaoxinyi commented 7 years ago

@benma How can I configure python3 to run regexp.py?

benma commented 7 years ago

M-x customize-variable [ret] vr/command-python

benma commented 7 years ago

@benma No problem with emacs -q.

I assume we can close this issue then, right?