all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Vincent Lefevre <vincent@vinc17.net>
To: Riku Saikkonen <rjs@netti.fi>
Cc: 774090@bugs.debian.org, 18939@debbugs.gnu.org
Subject: bug#18939: 24.4; middle-click sometimes pastes data other than the PRIMARY selection
Date: Sun, 4 Jan 2015 03:23:37 +0100	[thread overview]
Message-ID: <20150104022337.GA15906@xvii.vinc17.org> (raw)
In-Reply-To: <87zja54ds7.fsf@anar.lloke.localnet>

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

[Cc to the Debian bug]

On 2014-12-30 12:45:12 +0200, Riku Saikkonen wrote:
> I tried to trace where the bug occurs, and got as far as this:
> 
> mouse-drag-track contains the lines
> 
> 	  ;; Otherwise, run binding of terminating up-event.
>           (deactivate-mark)
> 	  (if do-multi-click
> 	      (goto-char start-point)
> 	    (unless moved-off-start
> 	      (pop-mark)))
> 
> (lines 858-863 of mouse.el in Emacs 24.4.1)
[...]

How about locally setting select-active-regions to nil for
(deactivate-mark)? See attached patch, which seems to work
for me, though I don't know all the consequences.

It is inspired from the patch suggested at

  http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6872#8

and the one that was really applied as
1c409d0b963ebdb1f48b90ddce85c56d989bee5f.

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

[-- Attachment #2: emacs24-primarysel2.patch --]
[-- Type: text/plain, Size: 481 bytes --]

diff --git a/lisp/mouse.el b/lisp/mouse.el
index e267418..2afe313 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -856,7 +856,8 @@ DO-MOUSE-DRAG-REGION-POST-PROCESS should only be used by
 		     (copy-region-as-kill (mark) (point)))))
 
 	  ;; Otherwise, run binding of terminating up-event.
-          (deactivate-mark)
+          (let (select-active-regions)
+            (deactivate-mark))
 	  (if do-multi-click
 	      (goto-char start-point)
 	    (unless moved-off-start

  reply	other threads:[~2015-01-04  2:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-03 20:56 bug#18939: 24.4; middle-click sometimes pastes data other than the PRIMARY selection Vincent Lefevre
2014-11-16 12:27 ` Vincent Lefevre
2014-12-28 15:03   ` Vincent Lefevre
2014-12-28 15:10     ` Vincent Lefevre
2015-03-21 13:42     ` Stefan Monnier
2015-03-21 19:35       ` Vincent Lefevre
2015-03-21 22:25         ` Stefan Monnier
2015-03-22  1:42           ` Vincent Lefevre
2015-03-22 18:33             ` Jan Djärv
2015-03-22 18:39           ` Glenn Morris
2014-12-30 10:45 ` Riku Saikkonen
2015-01-04  2:23   ` Vincent Lefevre [this message]
2015-01-18  1:17   ` Glenn Morris

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=20150104022337.GA15906@xvii.vinc17.org \
    --to=vincent@vinc17.net \
    --cc=18939@debbugs.gnu.org \
    --cc=774090@bugs.debian.org \
    --cc=rjs@netti.fi \
    /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.