all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Chong Yidong <cyd@stupidchicken.com>
Cc: emacs-devel@gnu.org
Subject: Re: mouse-yank-at-point in Comint modes
Date: Sat, 09 Dec 2006 13:22:47 -0500	[thread overview]
Message-ID: <87r6v9szd4.fsf@stupidchicken.com> (raw)
In-Reply-To: <pan.2006.12.07.01.16.09.742120@as.arizona.edu> (JD Smith's message of "Wed\, 06 Dec 2006 18\:16\:10 -0700")

JD Smith <jdsmith@as.arizona.edu> writes:

> 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.

I'm a bit confused about what's going on in this part of the code.
This issue has come up before:

    2005-03-24  Stefan Monnier  <monnier@iro.umontreal.ca>

      * comint.el (comint-insert-input): Obey mouse-yank-at-point.

It's not clear to me how subsequent changes broke this.  Naively, I'd
propose the following change; are there subtleties here that would
make it not work?

*** emacs/lisp/comint.el.~1.352.~	2006-12-09 10:48:30.000000000 -0500
--- emacs/lisp/comint.el	2006-12-09 13:15:19.000000000 -0500
***************
*** 805,811 ****
  (defun comint-insert-input (event)
    "In a Comint buffer, set the current input to the previous input at point."
    (interactive "e")
!   (mouse-set-point event)
    (let ((pos (point)))
      (if (not (eq (field-at-pos pos) 'input))
  	;; No input at POS, fall back to the global definition.
--- 805,811 ----
  (defun comint-insert-input (event)
    "In a Comint buffer, set the current input to the previous input at point."
    (interactive "e")
!   (unless mouse-yank-at-point (mouse-set-point event))
    (let ((pos (point)))
      (if (not (eq (field-at-pos pos) 'input))
  	;; No input at POS, fall back to the global definition.

  reply	other threads:[~2006-12-09 18:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-07  1:16 mouse-yank-at-point in Comint modes JD Smith
2006-12-09 18:22 ` Chong Yidong [this message]
2007-01-24 18:32 ` Bob Portmann
  -- strict thread matches above, loose matches on Subject: below --
2008-09-11 21:37 Bob
2009-05-14 23:59 Bob Nnamtrop
2009-12-01 20:34 ` Stefan Monnier
2009-12-02  0:30   ` Bob Nnamtrop

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r6v9szd4.fsf@stupidchicken.com \
    --to=cyd@stupidchicken.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.