all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Mouse interaction in -nw
       [not found] <20200930152007.rq4tkjzj3u7f4vwx.ref@Ergus>
@ 2020-09-30 15:20 ` Ergus
  2020-09-30 15:32   ` Stefan Monnier
  2020-09-30 20:17   ` Drew Adams
  0 siblings, 2 replies; 11+ messages in thread
From: Ergus @ 2020-09-30 15:20 UTC (permalink / raw)
  To: help-gnu-emacs

Hi:

I have been noticing some recent issue in xterm-mouse-mode not sure if
they are issues or features.

1) emacs -Q -nw
2) M-x xterm-mouse-mode
3) Select a region (like the word "buffer" in the scratch) with the mouse
4) M-w

5) Try to paste the word anywhere

In my system it seems that the mouse highlights the region properly,
but never moves the mark. So after M-w it copies the region between
point and original mark position not the selected word.

Is this intended? Because in gui this works "as expected"

Best,
Ergus




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Mouse interaction in -nw
  2020-09-30 15:20 ` Mouse interaction in -nw Ergus
@ 2020-09-30 15:32   ` Stefan Monnier
  2020-09-30 16:34     ` Ergus
  2020-09-30 16:40     ` Ergus
  2020-09-30 20:17   ` Drew Adams
  1 sibling, 2 replies; 11+ messages in thread
From: Stefan Monnier @ 2020-09-30 15:32 UTC (permalink / raw)
  To: help-gnu-emacs

> 1) emacs -Q -nw
> 2) M-x xterm-mouse-mode
> 3) Select a region (like the word "buffer" in the scratch) with the mouse
> 4) M-w
> 5) Try to paste the word anywhere

You mean like with `M-> C-y` ?
Works for me,


        Stefan




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Mouse interaction in -nw
  2020-09-30 15:32   ` Stefan Monnier
@ 2020-09-30 16:34     ` Ergus
  2020-09-30 16:59       ` Stefan Monnier
  2020-09-30 16:40     ` Ergus
  1 sibling, 1 reply; 11+ messages in thread
From: Ergus @ 2020-09-30 16:34 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: help-gnu-emacs

On Wed, Sep 30, 2020 at 11:32:19AM -0400, Stefan Monnier wrote:
>> 1) emacs -Q -nw
>> 2) M-x xterm-mouse-mode
>> 3) Select a region (like the word "buffer" in the scratch) with the mouse
>> 4) M-w
>> 5) Try to paste the word anywhere
>
>You mean like with `M-> C-y` ?
>Works for me,
>
>
>        Stefan
>
Hi Stefan:

Look at the attached gif. Where I select with the mouse several time,
and then M-w; but the region (mark) is not "properly updated" to the
selected region, just the point is updated, not the mark.

Actually the mouse selection does not act as the region at all. Maybe
this is intended... I just don't get why.

I can only set the mark with C-SPC?



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Mouse interaction in -nw
  2020-09-30 15:32   ` Stefan Monnier
  2020-09-30 16:34     ` Ergus
@ 2020-09-30 16:40     ` Ergus
  1 sibling, 0 replies; 11+ messages in thread
From: Ergus @ 2020-09-30 16:40 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 329 bytes --]

On Wed, Sep 30, 2020 at 11:32:19AM -0400, Stefan Monnier wrote:
>> 1) emacs -Q -nw
>> 2) M-x xterm-mouse-mode
>> 3) Select a region (like the word "buffer" in the scratch) with the mouse
>> 4) M-w
>> 5) Try to paste the word anywhere
>
>You mean like with `M-> C-y` ?
>Works for me,
>
>
>        Stefan
>
>
Forgot attachement ;p

[-- Attachment #2: Peek 2020-09-30 18-27.gif --]
[-- Type: image/gif, Size: 89430 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Mouse interaction in -nw
  2020-09-30 16:34     ` Ergus
@ 2020-09-30 16:59       ` Stefan Monnier
  2020-09-30 17:13         ` Ergus
  2020-09-30 17:38         ` Ergus
  0 siblings, 2 replies; 11+ messages in thread
From: Stefan Monnier @ 2020-09-30 16:59 UTC (permalink / raw)
  To: Ergus; +Cc: help-gnu-emacs

> Look at the attached gif. Where I select with the mouse several time,
> and then M-w; but the region (mark) is not "properly updated" to the
> selected region, just the point is updated, not the mark.
>
> Actually the mouse selection does not act as the region at all. Maybe
> this is intended... I just don't get why.

The mouse selection seems to be done "by the terminal" rather than "by
Emacs".  IOW, it looks like the mouse clicks aren't passed to Emacs.
Time to check `C-h l`?
What text-terminal is that?


        Stefan




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Mouse interaction in -nw
  2020-09-30 16:59       ` Stefan Monnier
@ 2020-09-30 17:13         ` Ergus
  2020-09-30 17:38         ` Ergus
  1 sibling, 0 replies; 11+ messages in thread
From: Ergus @ 2020-09-30 17:13 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: help-gnu-emacs

On Wed, Sep 30, 2020 at 12:59:22PM -0400, Stefan Monnier wrote:
>> Look at the attached gif. Where I select with the mouse several time,
>> and then M-w; but the region (mark) is not "properly updated" to the
>> selected region, just the point is updated, not the mark.
>>
>> Actually the mouse selection does not act as the region at all. Maybe
>> this is intended... I just don't get why.
>
>The mouse selection seems to be done "by the terminal" rather than "by
>Emacs".  IOW, it looks like the mouse clicks aren't passed to Emacs.
>Time to check `C-h l`?
>What text-terminal is that?
>
>
>        Stefan
>
xterm+tmux



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Mouse interaction in -nw
  2020-09-30 16:59       ` Stefan Monnier
  2020-09-30 17:13         ` Ergus
@ 2020-09-30 17:38         ` Ergus
  2020-09-30 18:08           ` Stefan Monnier
  2020-09-30 19:00           ` Yuri Khan
  1 sibling, 2 replies; 11+ messages in thread
From: Ergus @ 2020-09-30 17:38 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: help-gnu-emacs

Hi Stefan:

I repeated the same with only xterm (to remove tmux and simplify)

And loosage shows:

  ESC x			 ;; execute-extended-command
  x			 ;; self-insert-command
  t			 ;; self-insert-command
  e			 ;; self-insert-command
  TAB			 ;; minibuffer-complete
  m			 ;; self-insert-command
  o			 ;; self-insert-command
  TAB			 ;; minibuffer-complete
  RET			 ;; minibuffer-complete-and-exit
  ESC [ < 0 ; 2 3 ; 2 M	 ;; mouse-drag-region
  ESC [ < 3 2 ; 2 4 ; 2 M ;; anonymous-command
  ESC [ < 3 2 ; 2 5 ; 2 M ;; anonymous-command
  ESC [ < 3 2 ; 2 6 ; 2 M ;; anonymous-command
  ESC [ < 3 2 ; 2 7 ; 2 M ;; anonymous-command
  ESC [ < 3 2 ; 2 8 ; 2 M ;; anonymous-command
  ESC [ < 3 2 ; 2 9 ; 2 M ;; anonymous-command
  ESC [ < 3 2 ; 3 0 ; 2 M ;; anonymous-command
  ESC [ < 3 2 ; 3 1 ; 2 M ;; anonymous-command
  ESC [ < 3 2 ; 3 2 ; 2 M ;; anonymous-command
  ESC [ < 3 2 ; 3 3 ; 2 M ;; anonymous-command
  ESC [ < 3 2 ; 3 4 ; 2 M ;; anonymous-command
  ESC [ < 3 2 ; 3 5 ; 2 M ;; anonymous-command
  ESC [ < 3 2 ; 3 6 ; 2 M ;; anonymous-command
  ESC [ < 3 2 ; 3 7 ; 2 M ;; anonymous-command
  ESC [ < 3 2 ; 3 8 ; 2 M ;; anonymous-command
  ESC [ < 3 2 ; 3 9 ; 2 M ;; anonymous-command
  ESC [ < 3 2 ; 4 0 ; 2 M ;; anonymous-command
  ESC [ < 3 2 ; 4 1 ; 2 M ;; anonymous-command
  ESC [ < 3 2 ; 4 2 ; 2 M ;; anonymous-command
  ESC [ < 3 2 ; 4 3 ; 2 M ;; anonymous-command
  ESC [ < 3 2 ; 4 4 ; 2 M ;; anonymous-command
  ESC [ < 3 2 ; 4 5 ; 2 M ;; anonymous-command
  ESC w			 ;; kill-ring-save
  C-h l			 ;; view-lossage


Sorry but I don't know what's going on at this point :( I can't disable
more mouse events in xterm. 

This is my xterm config (just in case):

#=====================================

! *vt100.reverseVideo: true
*foreground:		#ffffff
*foreground_bold: 	#a8a19f
*cursorColor:   	#ffffff
*background: 		#000000

*faceName: Hack
*faceSize: 11

*eightBitInput:   false
*eightBitOutput:  true

*loginShell: true

*termName: xterm-256color
*metaSendsEscape:  true

*ttyModes:  erase ^?

*omitTranslation: fullscreen,popup-menu,select,wheel-mouse

*VT100.Translations: #override \
	Ctrl Shift <Key>C: copy-selection(CLIPBOARD) \n\
	Ctrl Shift <Key>V: insert-selection(CLIPBOARD) \n\
	<Btn1Motion>: select-extend()

*vt100.modifyOtherKeys: 1

*fastScroll: true
*trimSelection   : true

*backarrowKeyIsErase: true

*buffered:         true
*saveLines:        8192
*scrollBar:	   false

!! Autohide mouse pointer always
*pointerMode: 2

!!*cursorBlink: true
*ScrollKey: false

#================================

On Wed, Sep 30, 2020 at 12:59:22PM -0400, Stefan Monnier wrote:
>> Look at the attached gif. Where I select with the mouse several time,
>> and then M-w; but the region (mark) is not "properly updated" to the
>> selected region, just the point is updated, not the mark.
>>
>> Actually the mouse selection does not act as the region at all. Maybe
>> this is intended... I just don't get why.
>
>The mouse selection seems to be done "by the terminal" rather than "by
>Emacs".  IOW, it looks like the mouse clicks aren't passed to Emacs.
>Time to check `C-h l`?
>What text-terminal is that?
>
>
>        Stefan
>
>



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Mouse interaction in -nw
  2020-09-30 17:38         ` Ergus
@ 2020-09-30 18:08           ` Stefan Monnier
  2020-10-01  0:40             ` Ergus
  2020-09-30 19:00           ` Yuri Khan
  1 sibling, 1 reply; 11+ messages in thread
From: Stefan Monnier @ 2020-09-30 18:08 UTC (permalink / raw)
  To: Ergus; +Cc: help-gnu-emacs

> I repeated the same with only xterm (to remove tmux and simplify)

Good idea.

> And loosage shows:
>
>  ESC x			 ;; execute-extended-command
>  x			 ;; self-insert-command
>  t			 ;; self-insert-command
>  e			 ;; self-insert-command
>  TAB			 ;; minibuffer-complete
>  m			 ;; self-insert-command
>  o			 ;; self-insert-command
>  TAB			 ;; minibuffer-complete
>  RET			 ;; minibuffer-complete-and-exit
>  ESC [ < 0 ; 2 3 ; 2 M	 ;; mouse-drag-region
>  ESC [ < 3 2 ; 2 4 ; 2 M ;; anonymous-command
>  ESC [ < 3 2 ; 2 5 ; 2 M ;; anonymous-command
>  ESC [ < 3 2 ; 2 6 ; 2 M ;; anonymous-command
>  ESC [ < 3 2 ; 2 7 ; 2 M ;; anonymous-command
>  ESC [ < 3 2 ; 2 8 ; 2 M ;; anonymous-command
>  ESC [ < 3 2 ; 2 9 ; 2 M ;; anonymous-command
>  ESC [ < 3 2 ; 3 0 ; 2 M ;; anonymous-command
>  ESC [ < 3 2 ; 3 1 ; 2 M ;; anonymous-command
>  ESC [ < 3 2 ; 3 2 ; 2 M ;; anonymous-command
>  ESC [ < 3 2 ; 3 3 ; 2 M ;; anonymous-command
>  ESC [ < 3 2 ; 3 4 ; 2 M ;; anonymous-command
>  ESC [ < 3 2 ; 3 5 ; 2 M ;; anonymous-command
>  ESC [ < 3 2 ; 3 6 ; 2 M ;; anonymous-command
>  ESC [ < 3 2 ; 3 7 ; 2 M ;; anonymous-command
>  ESC [ < 3 2 ; 3 8 ; 2 M ;; anonymous-command
>  ESC [ < 3 2 ; 3 9 ; 2 M ;; anonymous-command
>  ESC [ < 3 2 ; 4 0 ; 2 M ;; anonymous-command
>  ESC [ < 3 2 ; 4 1 ; 2 M ;; anonymous-command
>  ESC [ < 3 2 ; 4 2 ; 2 M ;; anonymous-command
>  ESC [ < 3 2 ; 4 3 ; 2 M ;; anonymous-command
>  ESC [ < 3 2 ; 4 4 ; 2 M ;; anonymous-command
>  ESC [ < 3 2 ; 4 5 ; 2 M ;; anonymous-command
>  ESC w			 ;; kill-ring-save
>  C-h l			 ;; view-lossage

This looks right except for a missing

     ESC [ < 0 ; 4 5 ; 2 m   ;; anonymous-command
     <drag-mouse-1>          ;; mouse-set-region

just before the `ESC w`.  IOW it looks like you get the mouse-down and
mouse-motion events but for some reason Emacs didn't get the mouse-up
event (encoded as `ESC ... m`), which is the one that actually sets
the region.

I don't know why that would happen.  I'd assume it's something to do
with the `xterm` executable or its configuration, but as for
what... I recommend you try it with some other terminal emulator and
also that you try it with a different xterm config, just to try and
narrow down the scope of the problem.


        Stefan




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Mouse interaction in -nw
  2020-09-30 17:38         ` Ergus
  2020-09-30 18:08           ` Stefan Monnier
@ 2020-09-30 19:00           ` Yuri Khan
  1 sibling, 0 replies; 11+ messages in thread
From: Yuri Khan @ 2020-09-30 19:00 UTC (permalink / raw)
  To: Ergus; +Cc: help-gnu-emacs, Stefan Monnier

On Thu, 1 Oct 2020 at 00:38, Ergus <spacibba@aol.com> wrote:
> I repeated the same with only xterm (to remove tmux and simplify)

> This is my xterm config (just in case):
>
> #=====================================
> *VT100.Translations: #override \
[…]
>         <Btn1Motion>: select-extend()
> #================================

This looks vaguely suspicious.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: Mouse interaction in -nw
  2020-09-30 15:20 ` Mouse interaction in -nw Ergus
  2020-09-30 15:32   ` Stefan Monnier
@ 2020-09-30 20:17   ` Drew Adams
  1 sibling, 0 replies; 11+ messages in thread
From: Drew Adams @ 2020-09-30 20:17 UTC (permalink / raw)
  To: Ergus, help-gnu-emacs

Is option `mouse-drag-copy-region' relevant for
emacs -nw?  If so, is your value of it non-nil?

(Just a thought - may not be relevant/helpful.)



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Mouse interaction in -nw
  2020-09-30 18:08           ` Stefan Monnier
@ 2020-10-01  0:40             ` Ergus
  0 siblings, 0 replies; 11+ messages in thread
From: Ergus @ 2020-10-01  0:40 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: help-gnu-emacs

On Wed, Sep 30, 2020 at 02:08:00PM -0400, Stefan Monnier wrote:
>> I repeated the same with only xterm (to remove tmux and simplify)
>
>Good idea.
>
>> And loosage shows:
>>
>>  ESC x			 ;; execute-extended-command
>>  x			 ;; self-insert-command
>>  t			 ;; self-insert-command
>>  e			 ;; self-insert-command
>>  TAB			 ;; minibuffer-complete
>>  m			 ;; self-insert-command
>>  o			 ;; self-insert-command
>>  TAB			 ;; minibuffer-complete
>>  RET			 ;; minibuffer-complete-and-exit
>>  ESC [ < 0 ; 2 3 ; 2 M	 ;; mouse-drag-region
>>  ESC [ < 3 2 ; 2 4 ; 2 M ;; anonymous-command
>>  ESC [ < 3 2 ; 2 5 ; 2 M ;; anonymous-command
>>  ESC [ < 3 2 ; 2 6 ; 2 M ;; anonymous-command
>>  ESC [ < 3 2 ; 2 7 ; 2 M ;; anonymous-command
>>  ESC [ < 3 2 ; 2 8 ; 2 M ;; anonymous-command
>>  ESC [ < 3 2 ; 2 9 ; 2 M ;; anonymous-command
>>  ESC [ < 3 2 ; 3 0 ; 2 M ;; anonymous-command
>>  ESC [ < 3 2 ; 3 1 ; 2 M ;; anonymous-command
>>  ESC [ < 3 2 ; 3 2 ; 2 M ;; anonymous-command
>>  ESC [ < 3 2 ; 3 3 ; 2 M ;; anonymous-command
>>  ESC [ < 3 2 ; 3 4 ; 2 M ;; anonymous-command
>>  ESC [ < 3 2 ; 3 5 ; 2 M ;; anonymous-command
>>  ESC [ < 3 2 ; 3 6 ; 2 M ;; anonymous-command
>>  ESC [ < 3 2 ; 3 7 ; 2 M ;; anonymous-command
>>  ESC [ < 3 2 ; 3 8 ; 2 M ;; anonymous-command
>>  ESC [ < 3 2 ; 3 9 ; 2 M ;; anonymous-command
>>  ESC [ < 3 2 ; 4 0 ; 2 M ;; anonymous-command
>>  ESC [ < 3 2 ; 4 1 ; 2 M ;; anonymous-command
>>  ESC [ < 3 2 ; 4 2 ; 2 M ;; anonymous-command
>>  ESC [ < 3 2 ; 4 3 ; 2 M ;; anonymous-command
>>  ESC [ < 3 2 ; 4 4 ; 2 M ;; anonymous-command
>>  ESC [ < 3 2 ; 4 5 ; 2 M ;; anonymous-command
>>  ESC w			 ;; kill-ring-save
>>  C-h l			 ;; view-lossage
>
>This looks right except for a missing
>
>     ESC [ < 0 ; 4 5 ; 2 m   ;; anonymous-command
>     <drag-mouse-1>          ;; mouse-set-region
>
>just before the `ESC w`.  IOW it looks like you get the mouse-down and
>mouse-motion events but for some reason Emacs didn't get the mouse-up
>event (encoded as `ESC ... m`), which is the one that actually sets
>the region.
>
>I don't know why that would happen.  I'd assume it's something to do
>with the `xterm` executable or its configuration, but as for
>what... I recommend you try it with some other terminal emulator and
>also that you try it with a different xterm config, just to try and
>narrow down the scope of the problem.
>
>
>        Stefan
>
Hi Stefan:

Thanks for your help. With your hint and checking my config Y found that
the problem was this line:

*omitTranslation: fullscreen,popup-menu,select,wheel-mouse

specifically omitTranslation for "select"

I am not totally sure yet if this is intended or an issue and I could
comment to xterm developer if this is fine.

Best,
Ergus



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-10-01  0:40 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20200930152007.rq4tkjzj3u7f4vwx.ref@Ergus>
2020-09-30 15:20 ` Mouse interaction in -nw Ergus
2020-09-30 15:32   ` Stefan Monnier
2020-09-30 16:34     ` Ergus
2020-09-30 16:59       ` Stefan Monnier
2020-09-30 17:13         ` Ergus
2020-09-30 17:38         ` Ergus
2020-09-30 18:08           ` Stefan Monnier
2020-10-01  0:40             ` Ergus
2020-09-30 19:00           ` Yuri Khan
2020-09-30 16:40     ` Ergus
2020-09-30 20:17   ` Drew Adams

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.