From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#28631: 25.3.50; Deactivate mark with Ctrl-g mess up the primary-selection Date: Fri, 13 Oct 2017 09:48:15 +0300 Message-ID: <83a80vlf0w.fsf@gnu.org> References: <87ing3w8rk.fsf@gmail.com> <87o9pdazmp.fsf@users.sourceforge.net> <87o9pdaxfo.fsf@gmail.com> <87infjc1s1.fsf@users.sourceforge.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1507877352 2456 195.159.176.226 (13 Oct 2017 06:49:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 13 Oct 2017 06:49:12 +0000 (UTC) Cc: 28631@debbugs.gnu.org, tino.calancha@gmail.com To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 13 08:49:06 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e2tmK-00084c-LM for geb-bug-gnu-emacs@m.gmane.org; Fri, 13 Oct 2017 08:49:04 +0200 Original-Received: from localhost ([::1]:48648 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e2tmR-0003LH-OM for geb-bug-gnu-emacs@m.gmane.org; Fri, 13 Oct 2017 02:49:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37529) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e2tmM-0003Kw-3J for bug-gnu-emacs@gnu.org; Fri, 13 Oct 2017 02:49:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e2tmI-0001Zk-Vn for bug-gnu-emacs@gnu.org; Fri, 13 Oct 2017 02:49:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56204) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e2tmI-0001ZH-Rz for bug-gnu-emacs@gnu.org; Fri, 13 Oct 2017 02:49:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e2tmI-0008P5-Hq for bug-gnu-emacs@gnu.org; Fri, 13 Oct 2017 02:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 13 Oct 2017 06:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28631 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 28631-submit@debbugs.gnu.org id=B28631.150787731432264 (code B ref 28631); Fri, 13 Oct 2017 06:49:02 +0000 Original-Received: (at 28631) by debbugs.gnu.org; 13 Oct 2017 06:48:34 +0000 Original-Received: from localhost ([127.0.0.1]:36652 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e2tlq-0008OK-EW for submit@debbugs.gnu.org; Fri, 13 Oct 2017 02:48:34 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46447) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e2tlp-0008O6-Q5 for 28631@debbugs.gnu.org; Fri, 13 Oct 2017 02:48:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e2tlh-0001B7-Ft for 28631@debbugs.gnu.org; Fri, 13 Oct 2017 02:48:28 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60516) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e2tlh-0001Ax-D6; Fri, 13 Oct 2017 02:48:25 -0400 Original-Received: from [176.228.60.248] (port=1061 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e2tlg-0002i3-Gp; Fri, 13 Oct 2017 02:48:24 -0400 In-reply-to: <87infjc1s1.fsf@users.sourceforge.net> (message from Noam Postavsky on Thu, 12 Oct 2017 20:46:54 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:138323 Archived-At: > From: Noam Postavsky > Date: Thu, 12 Oct 2017 20:46:54 -0400 > Cc: 28631@debbugs.gnu.org > > --- i/lisp/simple.el > +++ w/lisp/simple.el > @@ -5336,7 +5336,9 @@ deactivate-mark > ;; deactivation should not clobber it (Bug#11772). > ((and (/= (region-beginning) (region-end)) > (or (gui-backend-selection-owner-p 'PRIMARY) > - (null (gui-backend-selection-exists-p 'PRIMARY)))) > + (null (gui-backend-selection-exists-p 'PRIMARY))) > + ;; `winner-undo' shouldn't update the selection (Bug#28631). > + (not (eq this-command 'winner-undo))) > (gui-set-selection 'PRIMARY > (funcall region-extract-function nil))))) > (when mark-active (force-mode-line-update)) ;Refresh toolbar (bug#16382). > > Either way, I think it's okay to push emacs-26, but wait a bit in case > someone else thinks otherwise. Is there really no way to solve this in winner? It seems like a winner bug/misfeature, and I'm worried by the possible effect of this patch on use cases that have nothing to do with the specific scenario of this bug. deactivate-mark is used a lot in places and ways we cannot possibly predict. So I think a solution for emacs-26 should be safer than that. Thanks.