all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bportmann@yahoo.com: Re: mouse-yank-at-point in Comint modes]
@ 2007-01-27 19:34 Richard Stallman
  2007-01-29  2:32 ` Chong Yidong
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Stallman @ 2007-01-27 19:34 UTC (permalink / raw)
  To: emacs-devel

Has anyone worked on this?

------- Start of forwarded message -------
Date: Wed, 24 Jan 2007 10:32:31 -0800 (PST)
From: Bob Portmann <bportmann@yahoo.com>
To: emacs-devel@gnu.org
In-Reply-To: <pan.2006.12.07.01.16.09.742120@as.arizona.edu>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Subject: Re: mouse-yank-at-point in Comint modes
X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=failed 
	version=3.0.4

This bug is still present in the emacs-22.0.93 pretest.

- --- JD Smith <jdsmith@as.arizona.edu> wrote:

> 
> 
> COMINT modes like shell inhibit the behavior of mouse-yank-at-point. 
> 
> 
> M-x shell
> M-x set-variable [Ret] mouse-yank-at-point [Ret] t
> % echo foo [C-a]
> [Select text in another buffer and middle click into shell buffer,
> after
> 'foo']
> 
> Text is not yanked at point.  This is a new behavior of Emacs 22.
> 
> JD
> 
> 
> 
> 
> _______________________________________________
> Emacs-devel mailing list
> Emacs-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-devel
> 




 
____________________________________________________________________________________
Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.
http://answers.yahoo.com/dir/?link=list&sid=396546091


_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
------- End of forwarded message -------

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

* Re: [bportmann@yahoo.com: Re: mouse-yank-at-point in Comint modes]
  2007-01-27 19:34 [bportmann@yahoo.com: Re: mouse-yank-at-point in Comint modes] Richard Stallman
@ 2007-01-29  2:32 ` Chong Yidong
  2007-01-29 14:48   ` Johan Bockgård
  0 siblings, 1 reply; 4+ messages in thread
From: Chong Yidong @ 2007-01-29  2:32 UTC (permalink / raw)
  To: rms; +Cc: emacs-devel

Richard Stallman <rms@gnu.org> writes:

> Has anyone worked on this?

I've checked in a fix into CVS.

>> COMINT modes like shell inhibit the behavior of mouse-yank-at-point. 
>> 
>> 
>> M-x shell
>> M-x set-variable [Ret] mouse-yank-at-point [Ret] t
>> % echo foo [C-a]
>> [Select text in another buffer and middle click into shell buffer,
>> after
>> 'foo']
>> 
>> Text is not yanked at point.  This is a new behavior of Emacs 22.

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

* Re: [bportmann@yahoo.com: Re: mouse-yank-at-point in Comint modes]
  2007-01-29  2:32 ` Chong Yidong
@ 2007-01-29 14:48   ` Johan Bockgård
  2007-01-29 15:44     ` Chong Yidong
  0 siblings, 1 reply; 4+ messages in thread
From: Johan Bockgård @ 2007-01-29 14:48 UTC (permalink / raw)
  To: emacs-devel

Chong Yidong <cyd@stupidchicken.com> writes:

> I've checked in a fix into CVS.

Good, but is this the correct thing to do when
mouse-yank-at-point is nil?:

   +  ;; Fall back to the global definition if (i) the selected
   +  ;; buffer is not a comint buffer (which can happen if a
   +  ;; non-comint window was selected and we clicked in a comint
   +  ;; window) [...]

Shouldn't the binding be looked up where you click in this case?



Btw, the manual's description of what effect mouse-yank-at-point
is supposed to have is confused:


(info "(emacs)Secondary Selection")

   If `mouse-yank-at-point' is non-`nil', `M-Mouse-2' yanks at point.
   Then it does not matter precisely where you click; ALL THAT MATTERS
   IS WHICH WINDOW YOU CLICK ON.


(info "(emacs)Mouse Commands")

   if `mouse-yank-at-point' is non-`nil', `Mouse-2' yanks at point.
   Then it does not matter where you click, OR EVEN WHICH OF THE
   FRAME'S WINDOWS YOU CLICK ON. The default value is `nil'. This
   variable also affects yanking the secondary selection.

-- 
Johan Bockgård

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

* Re: [bportmann@yahoo.com: Re: mouse-yank-at-point in Comint modes]
  2007-01-29 14:48   ` Johan Bockgård
@ 2007-01-29 15:44     ` Chong Yidong
  0 siblings, 0 replies; 4+ messages in thread
From: Chong Yidong @ 2007-01-29 15:44 UTC (permalink / raw)
  To: emacs-devel

bojohan+news@dd.chalmers.se (Johan Bockgård) writes:

> is this the correct thing to do when
> mouse-yank-at-point is nil?:
> 
>    +  ;; Fall back to the global definition if (i) the selected
>    +  ;; buffer is not a comint buffer (which can happen if a
>    +  ;; non-comint window was selected and we clicked in a comint
>    +  ;; window) [...]
> 
> Shouldn't the binding be looked up where you click in this case?

That is tricky to implement, because looking up the key binding of a
mouse event automagically uses the keymaps of the clicked window,
which may not be the selected window (see the definition of
Fkey_binding), so we are back where we started.

Also, there are situations where the alternative you suggest is
undesirable; if the selected buffer is in some other mode where
mouse-2 is not bound to mouse-yank-at-click and you click on a comint
buffer in another window, the value of mouse-yank-at-point is
irrelevant, so we should use the global binding!

The current solution seems to be good enough for all realistic
situations.

> Btw, the manual's description of what effect mouse-yank-at-point
> is supposed to have is confused:
> 
> (info "(emacs)Secondary Selection")
> 
>    If `mouse-yank-at-point' is non-`nil', `M-Mouse-2' yanks at point.
>    Then it does not matter precisely where you click; ALL THAT MATTERS
>    IS WHICH WINDOW YOU CLICK ON.

This is indeed incorrect; I'll fix it.

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

end of thread, other threads:[~2007-01-29 15:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-27 19:34 [bportmann@yahoo.com: Re: mouse-yank-at-point in Comint modes] Richard Stallman
2007-01-29  2:32 ` Chong Yidong
2007-01-29 14:48   ` Johan Bockgård
2007-01-29 15:44     ` Chong Yidong

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.