bug#29143: 25.3; xterm-mouse-mode issue in evil-mode

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

bug#29143: 25.3; xterm-mouse-mode issue in evil-mode

Rafal Lukawiecki
Using emacs in text terminal via iTerm I have enabled mouse
events with xterm-mouse-mode. It works well when I do not use evil-mode,
however when used with evil mode on, clicking anywhere causes the line clicked on
to be highlighted (visual mode) from the beginning to the clicked point,
however the cursor moves to the start of the line. At the same time
Messages buffer reports errors:

[ < is undefined
user-error: No previous search

I would be happy to provide more information to help debug this issue.

Thank you and regards from Ireland,
Rafal Lukawiecki



In GNU Emacs 25.3.1 (amd64-portbld-freebsd11.0)
 of 2017-10-20 built on 110amd64-quarterly-job-14
Configured using:
 'configure --localstatedir=/var --with-gameuser=games:games
 --disable-acl --without-canna --without-dbus --with-gnutls
 --with-modules --with-xml2 --without-cairo --without-gconf
 --without-gif --without-gsettings --without-jpeg --without-m17n-flt
 --without-imagemagick --without-libotf --without-png
 --without-toolkit-scroll-bars --without-rsvg --without-tiff --without-x
 --with-x-toolkit=no --without-xft --without-xim --without-xpm
 --without-xwidgets --prefix=/usr/local --mandir=/usr/local/man
 --disable-silent-rules --infodir=/usr/local/share/emacs/info/
 --build=amd64-portbld-freebsd11.0 'CFLAGS=-O2 -pipe -fstack-protector
 -fno-strict-aliasing' CPPFLAGS= 'LDFLAGS= -fstack-protector''

Configured features:
SOUND NOTIFY GNUTLS LIBXML2 ZLIB MODULES

Important settings:
  locale-coding-system: nil

Major mode: Emacs-Lisp

Minor modes in effect:
  xterm-mouse-mode: t
  async-bytecomp-package-mode: t
  dired-async-mode: t
  global-evil-matchit-mode: t
  evil-matchit-mode: t
  global-evil-quickscope-always-mode: t
  evil-quickscope-always-mode: t
  evil-leader-mode: t
  global-evil-surround-mode: t
  evil-surround-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  shell-dirtrack-mode: t
  evil-mode: t
  evil-local-mode: t
  smooth-scrolling-mode: 1
  sublimity-mode: t
  savehist-mode: t
  desktop-save-mode: t
  show-paren-mode: t
  global-linum-mode: t
  linum-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  size-indication-mode: t
  line-number-mode: t
  transient-mark-mode: t
  hs-minor-mode: t

Recent messages:
[ < is undefined
user-error: No previous search
[ < is undefined
user-error: No previous search
Type "q" in help window to restore its previous buffer, C-M-v to scroll help.
g q
Quit
Making completion list...
user-error: End of history; no default available
Making completion list...

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message format-spec rfc822 mml mml-sec
password-cache epg gnus-util 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 two-column iso-transl
face-remap debug xt-mouse evil-matchit-simple evil-matchit-sdk misearch
multi-isearch term/xterm xterm server hideshow helm-config helm-easymenu
async-bytecomp dired-async easy-mmode dired-aux dired async evil-matchit
evil-numbers evil-easymotion cl-seq cl-macs avy evil-quickscope
evil-leader evil-surround evil evil-integration undo-tree diff evil-maps
evil-commands flyspell ispell evil-jumps evil-command-window evil-types
evil-search evil-ex shell pcomplete comint regexp-opt ansi-color
evil-macros evil-repeat evil-states evil-core evil-common windmove
thingatpt rect evil-digraphs evil-vars ring edmacro kmacro
smooth-scrolling sublimity-scroll sublimity savehist desktop frameset
smart-tabs-mode advice whitespace solarized-theme solarized-definitions
time-date paren linum cus-start cus-load finder-inf info tool-bar
package epg-config seq byte-opt gv bytecomp byte-compile cl-extra
help-mode easymenu cconv cl-loaddefs pcase cl-lib disp-table mule-util
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
tabulated-list newcomment elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select mouse jit-lock font-lock syntax
facemenu font-core 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 charscript case-table epa-hook jka-cmpr-hook help simple abbrev
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 kqueue multi-tty
make-network-process emacs)

Memory information:
((conses 16 303553 20877)
 (symbols 48 31813 0)
 (miscs 40 688 455)
 (strings 32 60752 8378)
 (string-bytes 1 1722730)
 (vectors 16 25570)
 (vector-slots 8 567878 1701)
 (floats 8 231 276)
 (intervals 56 3982 302)
 (buffers 976 23))



Reply | Threaded
Open this post in threaded view
|

bug#29143: 25.3; xterm-mouse-mode issue in evil-mode

Eli Zaretskii
> From: Rafal Lukawiecki <[hidden email]>
> Date: Sat, 04 Nov 2017 16:22:59 +0000
>
> Using emacs in text terminal via iTerm I have enabled mouse
> events with xterm-mouse-mode. It works well when I do not use evil-mode,
> however when used with evil mode on, clicking anywhere causes the line clicked on
> to be highlighted (visual mode) from the beginning to the clicked point,
> however the cursor moves to the start of the line. At the same time
> Messages buffer reports errors:
>
> [ < is undefined
> user-error: No previous search

Thank you for your report.

Did you try reporting this to the Evil Mode developers first?



Reply | Threaded
Open this post in threaded view
|

bug#29143: 25.3; xterm-mouse-mode issue in evil-mode

Rafal Lukawiecki

> Thank you for your report.
>
> Did you try reporting this to the Evil Mode developers first?

Thank you for replying, Eli. No, I have not reported it to the Evil Mode developers yet. I am not familiar with the structure of the Emacs developer community, I am afraid. I used the built-in bug report function in Emacs.

However, based on the implied suggestion in your reply I found emacs-evil on GitHub and I have just posted a bug report, including a screenshot, there: https://github.com/emacs-evil/evil/issues/960

Many thanks for your comment.

Rafal
--
Rafal Lukawiecki
Data Scientist and Director
Project Botticelli Ltd


Reply | Threaded
Open this post in threaded view
|

bug#29143: 25.3; xterm-mouse-mode issue in evil-mode

Eli Zaretskii
> From: Rafal Lukawiecki <[hidden email]>
> CC: "[hidden email]" <[hidden email]>
> Date: Sat, 4 Nov 2017 18:36:09 +0000
>
> Thank you for replying, Eli. No, I have not reported it to the Evil Mode developers yet. I am not familiar with the structure of the Emacs developer community, I am afraid. I used the built-in bug report function in Emacs.
>
> However, based on the implied suggestion in your reply I found emacs-evil on GitHub and I have just posted a bug report, including a screenshot, there: https://github.com/emacs-evil/evil/issues/960

Thanks.  If the conclusion of that issue will be that this is a core
Emacs bug, please come back here and point out the details.



Reply | Threaded
Open this post in threaded view
|

bug#29143: 25.3; xterm-mouse-mode issue in evil-mode

Rafal Lukawiecki

Thanks.  If the conclusion of that issue will be that this is a core
Emacs bug, please come back here and point out the details.

Eli, it seems that it is inconclusive. Vasilij Schneidermann from the Evil developer team has marked my bug submission there as “wontfix” on the basis of the complexity of the underlying issue. May I respectfully ask you to have even a cursory look at the comment he made on this thread: https://github.com/emacs-evil/evil/issues/960#issuecomment-341926449 which explains how the xterm handling of the mouse may or may not be an Emacs core issue? Maybe you can surmise more than I could as to whether this is a core or an evil-mode issue.

I also feel, from that thread, that the evil-mode team does not wish to focus on the text (terminal) mode of Emacs as he has suggested to me "not use Emacs in the terminal, it will save you much frustration.” I suppose I will have to stick with vim more often than I would have wanted to. I really like how evil-mode brought the best of Emacs and Vim together, which is what I use on a daily basis in the GUI—but I still need to work in textual terminals a good bit, too.

Either way, many thanks for your kind comments and help.

Rafal
Reply | Threaded
Open this post in threaded view
|

bug#29143: 25.3; xterm-mouse-mode issue in evil-mode

Rafal Lukawiecki
For the benefit of anyone who finds about this issue here, Vasilij Schneidermann from the evil-mode developer team suggested the following partial workaround on GitHub. It helped me:

(with-eval-after-load 'evil-maps (define-key evil-motion-state-map [down-mouse-1] nil))

For completenes, another user seems to have discovered this problem, too. See this StackOverflow post: https://stackoverflow.com/questions/46513910/emacs-evil-mode-binding-mouse-event/47122921

Rafal
--
Rafal Lukawiecki
Data Scientist and Director
Project Botticelli Ltd




Reply | Threaded
Open this post in threaded view
|

bug#29143: 25.3; xterm-mouse-mode issue in evil-mode

Eli Zaretskii
> From: Rafal Lukawiecki <[hidden email]>
> CC: "[hidden email]" <[hidden email]>
> Date: Sun, 5 Nov 2017 15:00:39 +0000
>
> For the benefit of anyone who finds about this issue here, Vasilij Schneidermann from the evil-mode developer team suggested the following partial workaround on GitHub. It helped me:
>
> (with-eval-after-load 'evil-maps (define-key evil-motion-state-map [down-mouse-1] nil))
>
> For completenes, another user seems to have discovered this problem, too. See this StackOverflow post: https://stackoverflow.com/questions/46513910/emacs-evil-mode-binding-mouse-event/47122921

Thanks for letting us know.



Reply | Threaded
Open this post in threaded view
|

bug#29143: 25.3; xterm-mouse-mode issue in evil-mode

Alex-2
Eli Zaretskii <[hidden email]> writes:

>> From: Rafal Lukawiecki <[hidden email]>
>> CC: "[hidden email]" <[hidden email]>
>> Date: Sun, 5 Nov 2017 15:00:39 +0000
>>
>> For the benefit of anyone who finds about this issue here, Vasilij Schneidermann from the evil-mode developer team suggested the following partial workaround on GitHub. It helped me:
>>
>> (with-eval-after-load 'evil-maps (define-key evil-motion-state-map [down-mouse-1] nil))
>>
>> For completenes, another user seems to have discovered this problem, too. See this StackOverflow post: https://stackoverflow.com/questions/46513910/emacs-evil-mode-binding-mouse-event/47122921
>
> Thanks for letting us know.

The issue should be fixed in Evil (the fix uses the same `read-event' ->
`read-key' change as discussed in Bug#29150).

So I think this bug should be closed, and the workaround added to
etc/PROBLEMS should be removed.

P.S. I also noticed this section in etc/PROBLEMS:

*** Gnome: Emacs's xterm-mouse-mode doesn't work on the Gnome terminal.

It was added in 2001, and, while I can't find the relevant bug report,
it seems to be fixed now.  What's the policy on removing outdated items
in PROBLEMS?



Reply | Threaded
Open this post in threaded view
|

bug#29143: 25.3; xterm-mouse-mode issue in evil-mode

Eli Zaretskii
> From: Alex <[hidden email]>
> Cc: Rafal Lukawiecki <[hidden email]>,  [hidden email]
> Date: Sun, 12 Nov 2017 22:50:12 -0600
>
> >> (with-eval-after-load 'evil-maps (define-key evil-motion-state-map [down-mouse-1] nil))
> >>
> >> For completenes, another user seems to have discovered this problem, too. See this StackOverflow post: https://stackoverflow.com/questions/46513910/emacs-evil-mode-binding-mouse-event/47122921
> >
> > Thanks for letting us know.
>
> The issue should be fixed in Evil (the fix uses the same `read-event' ->
> `read-key' change as discussed in Bug#29150).
>
> So I think this bug should be closed, and the workaround added to
> etc/PROBLEMS should be removed.

Yes, please.

> P.S. I also noticed this section in etc/PROBLEMS:
>
> *** Gnome: Emacs's xterm-mouse-mode doesn't work on the Gnome terminal.
>
> It was added in 2001, and, while I can't find the relevant bug report,
> it seems to be fixed now.  What's the policy on removing outdated items
> in PROBLEMS?

PROBLEMS should only describe issues with the version of Emacs with
which it comes.  So this entry should be removed, provided that we can
verify the fix in reasonably old versions of Gnome.  IOW, let's try to
make sure it is fixed not just in the bleeding-edge Gnome that you
just happen to have.

Thanks.



Reply | Threaded
Open this post in threaded view
|

bug#29143: 25.3; xterm-mouse-mode issue in evil-mode

Alex-2
Eli Zaretskii <[hidden email]> writes:

>> P.S. I also noticed this section in etc/PROBLEMS:
>>
>> *** Gnome: Emacs's xterm-mouse-mode doesn't work on the Gnome terminal.
>>
>> It was added in 2001, and, while I can't find the relevant bug report,
>> it seems to be fixed now.  What's the policy on removing outdated items
>> in PROBLEMS?
>
> PROBLEMS should only describe issues with the version of Emacs with
> which it comes.  So this entry should be removed, provided that we can
> verify the fix in reasonably old versions of Gnome.  IOW, let's try to
> make sure it is fixed not just in the bleeding-edge Gnome that you
> just happen to have.
>
> Thanks.

Okay, I closed this bug.

What would you consider reasonably old? I couldn't reproduce the bug in
gnome-terminal 3.6.2 (March 2013), which is included in Ubuntu 14.04
(oldest supported Ubuntu).



Reply | Threaded
Open this post in threaded view
|

bug#29143: 25.3; xterm-mouse-mode issue in evil-mode

Eli Zaretskii
> From: Alex <[hidden email]>
> Cc: [hidden email],  [hidden email]
> Date: Mon, 13 Nov 2017 18:12:31 -0600
>
> > PROBLEMS should only describe issues with the version of Emacs with
> > which it comes.  So this entry should be removed, provided that we can
> > verify the fix in reasonably old versions of Gnome.  IOW, let's try to
> > make sure it is fixed not just in the bleeding-edge Gnome that you
> > just happen to have.
> >
> > Thanks.
>
> Okay, I closed this bug.
>
> What would you consider reasonably old? I couldn't reproduce the bug in
> gnome-terminal 3.6.2 (March 2013), which is included in Ubuntu 14.04
> (oldest supported Ubuntu).

March 2013 sounds "old enough" for me, thank you.



Reply | Threaded
Open this post in threaded view
|

bug#29143: 25.3; xterm-mouse-mode issue in evil-mode

Alex-2
Eli Zaretskii <[hidden email]> writes:

>> From: Alex <[hidden email]>
>> Cc: [hidden email],  [hidden email]
>> Date: Mon, 13 Nov 2017 18:12:31 -0600
>>
>> > PROBLEMS should only describe issues with the version of Emacs with
>> > which it comes.  So this entry should be removed, provided that we can
>> > verify the fix in reasonably old versions of Gnome.  IOW, let's try to
>> > make sure it is fixed not just in the bleeding-edge Gnome that you
>> > just happen to have.
>> >
>> > Thanks.
>>
>> Okay, I closed this bug.
>>
>> What would you consider reasonably old? I couldn't reproduce the bug in
>> gnome-terminal 3.6.2 (March 2013), which is included in Ubuntu 14.04
>> (oldest supported Ubuntu).
>
> March 2013 sounds "old enough" for me, thank you.

Okay, pushed 0491de8dad7 to emacs-26.