GNU bug report logs - #18090
24.4.50; `delete-selection-helper' logic changed for non-mouse region?

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: Drew Adams <drew.adams@HIDDEN>; dated Wed, 23 Jul 2014 18:04:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 18090 <at> debbugs.gnu.org:


Received: (at 18090) by debbugs.gnu.org; 25 Sep 2018 19:36:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 25 15:36:58 2018
Received: from localhost ([127.0.0.1]:54026 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1g4t8k-0000p2-Ia
	for submit <at> debbugs.gnu.org; Tue, 25 Sep 2018 15:36:58 -0400
Received: from pop.dreamhost.com ([64.90.62.162]:36566
 helo=pdx1-sub0-mail-a31.g.dreamhost.com)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1g4t8j-0000ou-0J
 for 18090 <at> debbugs.gnu.org; Tue, 25 Sep 2018 15:36:57 -0400
Received: from pdx1-sub0-mail-a31.g.dreamhost.com (localhost [127.0.0.1])
 by pdx1-sub0-mail-a31.g.dreamhost.com (Postfix) with ESMTP id 465A57F6EA;
 Tue, 25 Sep 2018 12:36:55 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc
 :subject:references:date:in-reply-to:message-id:mime-version
 :content-type; s=linkov.net; bh=sKPpTOZxPgnzjiw1utjin8QoRhA=; b=
 GihXEAFX03SehQlsZSUoqVwYNeeE+un2+8I/8HFTKj39X8Dlx3q6qIZAn1RdsltU
 v2Jdg5/pD7jdBAsZf2p7Tv/Ds7Lwu066dgcUIG+wdunmut7oxmshxsfgV3lDThpR
 ieSfdIt8Mkk2DA34TFCTKS9YgZrB6h4YH8i+xeZS5w4=
Received: from localhost.linkov.net (m91-129-111-128.cust.tele2.ee
 [91.129.111.128])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 (Authenticated sender: jurta@HIDDEN)
 by pdx1-sub0-mail-a31.g.dreamhost.com (Postfix) with ESMTPSA id 1DA2C7F37D;
 Tue, 25 Sep 2018 12:36:53 -0700 (PDT)
X-DH-BACKEND: pdx1-sub0-mail-a31
X-DH-BACKEND: pdx1-sub0-mail-a31
From: Juri Linkov <juri@HIDDEN>
To: Drew Adams <drew.adams@HIDDEN>
Subject: Re: bug#18090: 24.4.50;
 `delete-selection-helper' logic changed for non-mouse region?
Organization: LINKOV.NET
References: <95e066b9-792c-4b38-8f4b-fd225578ed45@default>
 <eafa1e61-31df-4002-8e1a-289c6dcf5244@default>
 <9859e098-daf7-4b67-a8a6-c53d01a18f93@default>
 <83fty4elsx.fsf@HIDDEN> <87pnx8xckg.fsf@HIDDEN>
 <f40f2b79-2945-4b1e-b8df-d9918cc51e21@default>
 <874leju83n.fsf@HIDDEN>
 <626fca93-0fba-4dd7-b119-7187b818dccb@default>
 <87ftxy69o9.fsf@HIDDEN>
 <d87894b3-72d6-4ff6-8b54-df7d5c33fd07@default>
Date: Tue, 25 Sep 2018 22:02:20 +0300
In-Reply-To: <d87894b3-72d6-4ff6-8b54-df7d5c33fd07@default> (Drew Adams's
 message of "Mon, 24 Sep 2018 14:16:28 -0700 (PDT)")
Message-ID: <87r2hho7vv.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 18090
Cc: 18090 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>> Shouldn't mouse yanking be supported by `delete-selection-mode',
>> what do you think?
>
> Dunno. Please file a bug report, if you think so. Or
> feel free to bring that into this report, if you like.
>
> What do you want it to do? Does it do what you want if you
> (put 'mouse-yank-primary 'delete-selection 'yank)?
> If not, what code change do you think is needed?

The reason why I asked this question is because it's the only case
what might fail AFAICS.  When I tried what you suggested

(put 'mouse-yank-primary 'delete-selection 'yank)

I see that it pastes at the wrong place - before yanking
it moves point at the offset of the distance between the
region beginning and the position clicked with the mouse,
but since delete-selection-mode already deleted the region,
this means that it puts point at unrelated text that
shifts into this position after deleting the region.

mouse-yank-primary provides the correct result only when
mouse-yank-at-point is non-nil.  I don't see how this could be
supported within the limitations of the current design of
delete-selection-mode.  One way is to reimplement delete-selection-mode
using advices - it's easy to put advice around mouse-yank-at-point
that would set mouse-yank-at-point to t around the call to
mouse-yank-at-point.

Another not so good solution is to hard-code checks for
delete-selection-mode in mouse-yank-primary.

So after mouse-yank-primary is supported, we could look
under what conditions to call (current-kill 1)
in delete-selection-helper.

Please note that the current condition in (eq type 'yank)
that checks for (car kill-ring) is unsuitable
because mouse-yank-primary pastes from
(gui-get-primary-selection), not from (car kill-ring)

>> I agree that code that calls (delete-active-region) under the
>> condition (eq type 'yank) is essential to handle `yank'.
>> But I think that (current-kill 1) is not essential
>> unless it renders yank useless in some cases (yet unknown).
>
> Maybe you're right; dunno.
>
> Do you want to remove that code? Without it, does
> `deletion-selection-mode' do what you want for both
> t and nil values of `mouse-drag-copy-region'?
>
> At this point it's not clear to me what behavior is  bugged,
> if any. I'd like to hear what changes, if any, you propose,
> both for the code and the desired behavior (for both t
> and nil values of `mouse-drag-copy-region').

When mouse-drag-copy-region is non-nil, I see that
(mouse-region-match) returns non-nil, so no changes
are required in delete-selection-helper for this case.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#18090; Package emacs. Full text available.

Message received at 18090 <at> debbugs.gnu.org:


Received: (at 18090) by debbugs.gnu.org; 24 Sep 2018 21:16:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 24 17:16:40 2018
Received: from localhost ([127.0.0.1]:52584 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1g4YDg-0002Eq-3O
	for submit <at> debbugs.gnu.org; Mon, 24 Sep 2018 17:16:40 -0400
Received: from userp2130.oracle.com ([156.151.31.86]:60602)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1g4YDc-0002EY-Si
 for 18090 <at> debbugs.gnu.org; Mon, 24 Sep 2018 17:16:38 -0400
Received: from pps.filterd (userp2130.oracle.com [127.0.0.1])
 by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w8OLDeMq083811;
 Mon, 24 Sep 2018 21:16:30 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=mime-version :
 message-id : date : from : sender : to : cc : subject : references :
 in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02;
 bh=Tkkfi0j26uh1HoeJOHKcw+qH8p94X1vnCUwd/FNjTqg=;
 b=1ABfREf/j8in8YjWgvWoopFAqcNqQCSI0nRKMlHxfDoHA6ynGifuqp6Rp0fvMjf5NRlu
 TIs+Rd0fUo7K/s5BqXsWzj3fome1kbOlzysgmQj58hrBP/0YYSVdr2ZhJWXtiE+5bsB0
 MyKdagGGiSgePKJHKcV9QZa1tNNC8/7zwsk/IyOtJ5uNUZ9seK7r4VA2aG3MZfVJVNBx
 s9LMT39mPO2lkdgTp0MGU+bh+vMwhtDWmptIAbbTIL90pxJVbFoY61tW/GwvrOv+SimY
 OX9NObmfEAGDHXuew60xocBnPvEPHeECsKCupYi9dj5uSgQpuPAzvVse9CBNQ1m0ujHF ug== 
Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233])
 by userp2130.oracle.com with ESMTP id 2mnd5t8e39-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Mon, 24 Sep 2018 21:16:30 +0000
Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236])
 by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w8OLGTSi009158
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Mon, 24 Sep 2018 21:16:29 GMT
Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18])
 by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w8OLGTTr019600;
 Mon, 24 Sep 2018 21:16:29 GMT
MIME-Version: 1.0
Message-ID: <d87894b3-72d6-4ff6-8b54-df7d5c33fd07@default>
Date: Mon, 24 Sep 2018 14:16:28 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: RE: bug#18090: 24.4.50; `delete-selection-helper' logic changed for
 non-mouse region?
References: <95e066b9-792c-4b38-8f4b-fd225578ed45@default>
 <eafa1e61-31df-4002-8e1a-289c6dcf5244@default>
 <9859e098-daf7-4b67-a8a6-c53d01a18f93@default> <83fty4elsx.fsf@HIDDEN>
 <87pnx8xckg.fsf@HIDDEN>
 <f40f2b79-2945-4b1e-b8df-d9918cc51e21@default>
 <874leju83n.fsf@HIDDEN>
 <626fca93-0fba-4dd7-b119-7187b818dccb@default>
 <87ftxy69o9.fsf@HIDDEN>
In-Reply-To: <87ftxy69o9.fsf@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 16.0.4735.0 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9026
 signatures=668707
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0
 malwarescore=0
 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=717
 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1
 engine=8.0.1-1807170000 definitions=main-1809240203
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 18090
Cc: 18090 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> > As you say, mouse-yank commands are not supported by
> > `delete-selection-mode' - they do not have a `yank'
> > `delete-selection-mode' property value.

(I meant `delete-selection' property value.)

> Shouldn't mouse yanking be supported by `delete-selection-mode',
> what do you think?

Dunno. Please file a bug report, if you think so. Or
feel free to bring that into this report, if you like.

What do you want it to do? Does it do what you want if you
(put 'mouse-yank-primary 'delete-selection 'yank)?
If not, what code change do you think is needed?

> I agree that code that calls (delete-active-region) under the
> condition (eq type 'yank) is essential to handle `yank'.
> But I think that (current-kill 1) is not essential
> unless it renders yank useless in some cases (yet unknown).

Maybe you're right; dunno.

Do you want to remove that code? Without it, does
`deletion-selection-mode' do what you want for both
t and nil values of `mouse-drag-copy-region'?

At this point it's not clear to me what behavior is  bugged,
if any. I'd like to hear what changes, if any, you propose,
both for the code and the desired behavior (for both t
and nil values of `mouse-drag-copy-region').




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#18090; Package emacs. Full text available.

Message received at 18090 <at> debbugs.gnu.org:


Received: (at 18090) by debbugs.gnu.org; 24 Sep 2018 19:14:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 24 15:14:35 2018
Received: from localhost ([127.0.0.1]:52351 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1g4WJX-0005Vp-JM
	for submit <at> debbugs.gnu.org; Mon, 24 Sep 2018 15:14:35 -0400
Received: from pop.dreamhost.com ([64.90.62.162]:38802
 helo=pdx1-sub0-mail-a31.g.dreamhost.com)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1g4WJV-0005Vh-MT
 for 18090 <at> debbugs.gnu.org; Mon, 24 Sep 2018 15:14:34 -0400
Received: from pdx1-sub0-mail-a31.g.dreamhost.com (localhost [127.0.0.1])
 by pdx1-sub0-mail-a31.g.dreamhost.com (Postfix) with ESMTP id D5F1D7F97E;
 Mon, 24 Sep 2018 12:14:32 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc
 :subject:references:date:in-reply-to:message-id:mime-version
 :content-type; s=linkov.net; bh=eu5VFbv7qUBqjxylqAGTWwmOToc=; b=
 jjHmbGu+xT6VoLJHg6mlCEAr9zlFfuesrh8B92/NyHzXr0HzOIEEhB2h+ktdD1IV
 HWSjOMqdM5TbNdmKJmscbW6PeYC6BrnyjpMszpe7aDj0FZ0YftMnZL4Y/SrFwQCt
 dwdcWGtbUF/r4JamJV+ZJJMyURlSjkj9lYXb2TQaMAM=
Received: from localhost.linkov.net (m91-129-111-128.cust.tele2.ee
 [91.129.111.128])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 (Authenticated sender: jurta@HIDDEN)
 by pdx1-sub0-mail-a31.g.dreamhost.com (Postfix) with ESMTPSA id 97F2C7F288;
 Mon, 24 Sep 2018 12:14:31 -0700 (PDT)
X-DH-BACKEND: pdx1-sub0-mail-a31
X-DH-BACKEND: pdx1-sub0-mail-a31
From: Juri Linkov <juri@HIDDEN>
To: Drew Adams <drew.adams@HIDDEN>
Subject: Re: bug#18090: 24.4.50;
 `delete-selection-helper' logic changed for non-mouse region?
Organization: LINKOV.NET
References: <95e066b9-792c-4b38-8f4b-fd225578ed45@default>
 <eafa1e61-31df-4002-8e1a-289c6dcf5244@default>
 <9859e098-daf7-4b67-a8a6-c53d01a18f93@default>
 <83fty4elsx.fsf@HIDDEN> <87pnx8xckg.fsf@HIDDEN>
 <f40f2b79-2945-4b1e-b8df-d9918cc51e21@default>
 <874leju83n.fsf@HIDDEN>
 <626fca93-0fba-4dd7-b119-7187b818dccb@default>
Date: Mon, 24 Sep 2018 22:08:46 +0300
In-Reply-To: <626fca93-0fba-4dd7-b119-7187b818dccb@default> (Drew Adams's
 message of "Sun, 23 Sep 2018 18:35:03 -0700 (PDT)")
Message-ID: <87ftxy69o9.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 18090
Cc: 18090 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>> You are missing the <mouse-2> part above.
>
> I wasn't missing it. I was trying to point out that that code has nothing
> to do with mouse yanking. As you say, mouse-yank commands are not
> supported by `delete-selection-mode' - they do not have a `yank'
> `delete-selection-mode' property value.

Shouldn't mouse yanking be supported by `delete-selection-mode',
what do you think?

> That code, which you say could be deleted altogether, is essential for
> `delete-selection-mode' to handle `yank'. Don't you agree? That was
> my point. The code in question is about commands whose property
> value is `yank'.

I agree that code that calls (delete-active-region) under the
condition (eq type 'yank) is essential to handle `yank'.
But I think that (current-kill 1) is not essential
unless it renders yank useless in some cases (yet unknown).

> Do you agree? If not, why do you think all of that code could be deleted?

Neither agree nor disagree.  Please provide a recipe to show the buggy behavior
like Eli asked you to do.

> Anyway, I think I understand why you added the `mouse-region-match'
> condition now. But it seems to me that that condition should be used,
> as Eli hinted, only when `mouse-drag-copy-region' is non-nil. (It is nil
> by default now.)
>
> Do you agree? Isn't that the (only) case where you are bothered by
> the mouse selection being replaced by the previous kill-ring entry
> (instead of the implicit one from the mouse selection)?
>
> IOW, do you think this addition makes sense?
>
> (when (and (string= (buffer-substring-no-properties
>                      (point) (mark))
>                     (car kill-ring))
> 	   mouse-drag-copy-region ; <======
>            (fboundp 'mouse-region-match)
>            (mouse-region-match))
>   (current-kill 1))

I don't know yet.  Please describe the settings and steps
that would show how to test this.

Here is a template to help you to create a bug report:

0. emacs -Q

1. M-x delete-selection-mode RET

2. Eval: (setq mouse-drag-copy-region t)

3. Drag mouse to select a word in *scratch*

4. Type `M-w' to copy selected word to the kill-ring

5. Drag mouse to select another word in *scratch*

6. Type `C-y' to yank the word from the kill-ring

I see that the previously copied word correctly replaced the selected word,
so I see no bug here.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#18090; Package emacs. Full text available.

Message received at 18090 <at> debbugs.gnu.org:


Received: (at 18090) by debbugs.gnu.org; 24 Sep 2018 01:35:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 23 21:35:13 2018
Received: from localhost ([127.0.0.1]:51219 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1g4FmL-0008E6-Gr
	for submit <at> debbugs.gnu.org; Sun, 23 Sep 2018 21:35:13 -0400
Received: from userp2120.oracle.com ([156.151.31.85]:60700)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1g4FmJ-0008Dq-Oh
 for 18090 <at> debbugs.gnu.org; Sun, 23 Sep 2018 21:35:12 -0400
Received: from pps.filterd (userp2120.oracle.com [127.0.0.1])
 by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w8O1Z6iQ075590;
 Mon, 24 Sep 2018 01:35:06 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=mime-version :
 message-id : date : from : sender : to : cc : subject : references :
 in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02;
 bh=kuL9qj9VZv0x4DklRSRqeWIaEI8uQ8LgSG5eMKpSimk=;
 b=IgsgCx/aY90jUl/5laJg0rWk0T8S3gyPFawnJAZQ/r02FVLGyaHlh8i6raUJZfFQRUWB
 zk3w9qCU60TBZkiSbdjThdgJmqgHd6lA0eaGYK/itbamhE2fWTNl1pqN34HhkK1ljLPE
 B7Kf2C6ynfQmgXFr+z4dixDgXmaN/onXnzX32B9TT70oGqFDVY0PMX6MsX4JfjaiVCl/
 UGj3cKOd7b3dDS8ICmAHpMICOD08fso4T0NMbhBkemHiyq0zRtN5Sije2CKUNoQQp9eD
 Pq5dcki+APuiR89XEGpw12YsznduRPk5r48n92hWejLp13Oldx37DL8MQ4WZIpMIMhda ng== 
Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233])
 by userp2120.oracle.com with ESMTP id 2mnvtu9vym-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Mon, 24 Sep 2018 01:35:05 +0000
Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236])
 by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w8O1Z4MN005490
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Mon, 24 Sep 2018 01:35:04 GMT
Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9])
 by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w8O1Z3vH009349;
 Mon, 24 Sep 2018 01:35:04 GMT
MIME-Version: 1.0
Message-ID: <626fca93-0fba-4dd7-b119-7187b818dccb@default>
Date: Sun, 23 Sep 2018 18:35:03 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: RE: bug#18090: 24.4.50; `delete-selection-helper' logic changed for
 non-mouse region?
References: <95e066b9-792c-4b38-8f4b-fd225578ed45@default>
 <eafa1e61-31df-4002-8e1a-289c6dcf5244@default>
 <9859e098-daf7-4b67-a8a6-c53d01a18f93@default> <83fty4elsx.fsf@HIDDEN>
 <87pnx8xckg.fsf@HIDDEN>
 <f40f2b79-2945-4b1e-b8df-d9918cc51e21@default>
 <874leju83n.fsf@HIDDEN>
In-Reply-To: <874leju83n.fsf@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 16.0.4735.0 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9025
 signatures=668707
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0
 malwarescore=0
 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999
 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1
 engine=8.0.1-1807170000 definitions=main-1809240015
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 18090
Cc: 18090 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> You are missing the <mouse-2> part above.

I wasn't missing it. I was trying to point out that that code has nothing
to do with mouse yanking. As you say, mouse-yank commands are not
supported by `delete-selection-mode' - they do not have a `yank'
`delete-selection-mode' property value.

That code, which you say could be deleted altogether, is essential for
`delete-selection-mode' to handle `yank'. Don't you agree? That was
my point. The code in question is about commands whose property
value is `yank'.

Do you agree? If not, why do you think all of that code could be deleted?

---

Anyway, I think I understand why you added the `mouse-region-match'
condition now. But it seems to me that that condition should be used,
as Eli hinted, only when `mouse-drag-copy-region' is non-nil. (It is nil
by default now.)

Do you agree? Isn't that the (only) case where you are bothered by
the mouse selection being replaced by the previous kill-ring entry
(instead of the implicit one from the mouse selection)?

IOW, do you think this addition makes sense?

(when (and (string=3D (buffer-substring-no-properties
                     (point) (mark))
                    (car kill-ring))
=09   mouse-drag-copy-region ; <=3D=3D=3D=3D=3D=3D
           (fboundp 'mouse-region-match)
           (mouse-region-match))
  (current-kill 1))




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#18090; Package emacs. Full text available.

Message received at 18090 <at> debbugs.gnu.org:


Received: (at 18090) by debbugs.gnu.org; 21 Sep 2018 06:48:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 21 02:48:26 2018
Received: from localhost ([127.0.0.1]:47600 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1g3FEo-0003Aj-G3
	for submit <at> debbugs.gnu.org; Fri, 21 Sep 2018 02:48:26 -0400
Received: from eggs.gnu.org ([208.118.235.92]:60512)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1g3FEn-0003AX-2B
 for 18090 <at> debbugs.gnu.org; Fri, 21 Sep 2018 02:48:25 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1g3FEd-0003BR-I4
 for 18090 <at> debbugs.gnu.org; Fri, 21 Sep 2018 02:48:19 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled
 version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:46547)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1g3FEc-0003Ar-03; Fri, 21 Sep 2018 02:48:14 -0400
Received: from [176.228.60.248] (port=3536 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1g3FEa-0004bM-SS; Fri, 21 Sep 2018 02:48:13 -0400
Date: Fri, 21 Sep 2018 09:47:59 +0300
Message-Id: <831s9ne480.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Drew Adams <drew.adams@HIDDEN>
In-reply-to: <f40f2b79-2945-4b1e-b8df-d9918cc51e21@default> (message from Drew
 Adams on Thu, 20 Sep 2018 14:55:58 -0700 (PDT))
Subject: Re: bug#18090: 24.4.50; `delete-selection-helper' logic changed for
 non-mouse region?
References: <95e066b9-792c-4b38-8f4b-fd225578ed45@default>
 <eafa1e61-31df-4002-8e1a-289c6dcf5244@default>
 <9859e098-daf7-4b67-a8a6-c53d01a18f93@default> <83fty4elsx.fsf@HIDDEN>
 <87pnx8xckg.fsf@HIDDEN>
 <f40f2b79-2945-4b1e-b8df-d9918cc51e21@default>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 18090
Cc: 18090 <at> debbugs.gnu.org, juri@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)

> Date: Thu, 20 Sep 2018 14:55:58 -0700 (PDT)
> From: Drew Adams <drew.adams@HIDDEN>
> Cc: 18090 <at> debbugs.gnu.org
> 
> > I don't understand this bug report too - in fact, there is no bug,
> > the purpose of the old change was to remove gratuitous optimization
> > that breaks keyboard macros (the result of yanking should not depend
> > on differences between old and new text), 
> 
> Sorry, but I don't understand that. What old change? What
> optimization? What macro breakage (example)? What old and
> new text? No idea what you're saying, there.
> 
> > and nobody complained during last 10+ years.
> 
> I filed this bug report 4 years ago. What kinds of complaints are
> you expecting?

One again, please describe the behavior that looks buggy or incorrect
to you.  The description I found in your original bug report was
unclear.  Let's forget for a moment about the code changes and their
comments, and talk about the problem itself, which must be some
behavior in some scenario.  Please describe a recipe to reproduce that
behavior.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#18090; Package emacs. Full text available.

Message received at 18090 <at> debbugs.gnu.org:


Received: (at 18090) by debbugs.gnu.org; 20 Sep 2018 23:56:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 20 19:56:01 2018
Received: from localhost ([127.0.0.1]:47463 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1g38nh-0000fo-Lx
	for submit <at> debbugs.gnu.org; Thu, 20 Sep 2018 19:56:01 -0400
Received: from pop.dreamhost.com ([64.90.62.162]:60842
 helo=pdx1-sub0-mail-a36.g.dreamhost.com)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1g38nf-0000fS-Ii
 for 18090 <at> debbugs.gnu.org; Thu, 20 Sep 2018 19:56:00 -0400
Received: from pdx1-sub0-mail-a36.g.dreamhost.com (localhost [127.0.0.1])
 by pdx1-sub0-mail-a36.g.dreamhost.com (Postfix) with ESMTP id 87DB97EDA7;
 Thu, 20 Sep 2018 16:55:58 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc
 :subject:references:date:in-reply-to:message-id:mime-version
 :content-type; s=linkov.net; bh=RbScpnc11JJNasblhtEXH6dux6A=; b=
 ykNEv4K767RSBxECOJgI9WDRLZTLuG/ZLn2a62MZsgvucyC/ScBxx4xOxzOgAtQD
 fhXVZhU+JLSWKkPX0vatlZVh5BqpifK9UlPzgI6wnipDBY/7A3jvwof6o4xjiYlP
 zwIRGu16q59ixR9Lr5Nqsb9iXlAjXLMtDKtvMeOnleY=
Received: from localhost.linkov.net (m91-129-107-237.cust.tele2.ee
 [91.129.107.237])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 (Authenticated sender: jurta@HIDDEN)
 by pdx1-sub0-mail-a36.g.dreamhost.com (Postfix) with ESMTPSA id 5E15E7EDB7;
 Thu, 20 Sep 2018 16:55:57 -0700 (PDT)
X-DH-BACKEND: pdx1-sub0-mail-a36
X-DH-BACKEND: pdx1-sub0-mail-a36
From: Juri Linkov <juri@HIDDEN>
To: Drew Adams <drew.adams@HIDDEN>
Subject: Re: bug#18090: 24.4.50;
 `delete-selection-helper' logic changed for non-mouse region?
Organization: LINKOV.NET
References: <95e066b9-792c-4b38-8f4b-fd225578ed45@default>
 <eafa1e61-31df-4002-8e1a-289c6dcf5244@default>
 <9859e098-daf7-4b67-a8a6-c53d01a18f93@default>
 <83fty4elsx.fsf@HIDDEN> <87pnx8xckg.fsf@HIDDEN>
 <f40f2b79-2945-4b1e-b8df-d9918cc51e21@default>
Date: Fri, 21 Sep 2018 01:50:32 +0300
In-Reply-To: <f40f2b79-2945-4b1e-b8df-d9918cc51e21@default> (Drew Adams's
 message of "Thu, 20 Sep 2018 14:55:58 -0700 (PDT)")
Message-ID: <874leju83n.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 18090
Cc: 18090 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>> I see that mouse operations are not supported by delete-selection-mode
>> anyway - yanking with <mouse-2> doesn't replace the selected region,
>
> Huh? I kill some text (or copy it to the kill-ring). Then I select some
> other text with the mouse. Then I type or I yank. The typed or
> yanked text replaces the mouse-selected text. What am I missing?

You are missing the <mouse-2> part above.

>> so the whole
>> 	     (when (and (string= (buffer-substring-no-properties
>> 				  (point) (mark)) (car kill-ring))
>> 			(fboundp 'mouse-region-match)
>> 			(mouse-region-match))
>> 	       (current-kill 1))
>> could be deleted altogether.
>
> Why would we do that? That's been there forever - except for the
> mouse-region-match part that you added (subject of this report).

Not true, mouse-region-match part has been there exactly as long
as without it.

>> I don't understand this bug report too - in fact, there is no bug,
>> the purpose of the old change was to remove gratuitous optimization
>> that breaks keyboard macros (the result of yanking should not depend
>> on differences between old and new text),
>
> Sorry, but I don't understand that. What old change? What
> optimization? What macro breakage (example)? What old and
> new text? No idea what you're saying, there.

Please read the detailed explanations on the thread in
http://lists.gnu.org/archive/html/emacs-devel/2007-06/msg01642.html

>> and nobody complained during last 10+ years.
>
> I filed this bug report 4 years ago.

What bug?  The bug was already fixed long ago.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#18090; Package emacs. Full text available.

Message received at 18090 <at> debbugs.gnu.org:


Received: (at 18090) by debbugs.gnu.org; 20 Sep 2018 21:56:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 20 17:56:09 2018
Received: from localhost ([127.0.0.1]:47433 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1g36vh-00049g-Ec
	for submit <at> debbugs.gnu.org; Thu, 20 Sep 2018 17:56:09 -0400
Received: from userp2130.oracle.com ([156.151.31.86]:44206)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1g36vg-00049S-5r
 for 18090 <at> debbugs.gnu.org; Thu, 20 Sep 2018 17:56:08 -0400
Received: from pps.filterd (userp2130.oracle.com [127.0.0.1])
 by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w8KLrc7S120229;
 Thu, 20 Sep 2018 21:56:01 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=mime-version :
 message-id : date : from : sender : to : cc : subject : references :
 in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02;
 bh=W7g7DkwW3/37wHcc3msDA/nFYUTsW+jlYPeZz+65pik=;
 b=rUlItCmEWzyEUu+rLWsF4CiOx+z/4uAxCCbQR5gdkzlahYfcNxm6cmNFz2+ormFbb0mA
 YSWSSVVFxOef3BmROVWg6R4Dqc/U41NyIiajlmJZJQN+xR43kiY/2fRa3BT9HikxvLFr
 387TmHJyDY9gVe8mzOV3jBsbyvBcp1uA2AyPDFTVlNzqBkFAaW77xjo1m5Ye5hBWpIKE
 6X28qyGfJl7Q9VELt28Xerzn7tIO7j0Ylyix+JAx6AReTzCUc7mz3iWFyDWo9cFXwy06
 Bhd0lI+gw2WoK3ObCrThh4CPEUHNGEFCT0vPmtGWrt5RhPv1VQCqcLXL2MY59/XfFeJS TQ== 
Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234])
 by userp2130.oracle.com with ESMTP id 2mmkm201w2-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Thu, 20 Sep 2018 21:56:01 +0000
Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72])
 by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w8KLu0Vk000382
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Thu, 20 Sep 2018 21:56:00 GMT
Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16])
 by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w8KLtxxx002840;
 Thu, 20 Sep 2018 21:55:59 GMT
MIME-Version: 1.0
Message-ID: <f40f2b79-2945-4b1e-b8df-d9918cc51e21@default>
Date: Thu, 20 Sep 2018 14:55:58 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
To: Juri Linkov <juri@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>
Subject: RE: bug#18090: 24.4.50; `delete-selection-helper' logic changed for
 non-mouse region?
References: <95e066b9-792c-4b38-8f4b-fd225578ed45@default>
 <eafa1e61-31df-4002-8e1a-289c6dcf5244@default>
 <9859e098-daf7-4b67-a8a6-c53d01a18f93@default> <83fty4elsx.fsf@HIDDEN>
 <87pnx8xckg.fsf@HIDDEN>
In-Reply-To: <87pnx8xckg.fsf@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 16.0.4735.0 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9022
 signatures=668707
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0
 malwarescore=0
 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999
 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1
 engine=8.0.1-1807170000 definitions=main-1809200212
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 18090
Cc: 18090 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> I see that mouse operations are not supported by delete-selection-mode
> anyway - yanking with <mouse-2> doesn't replace the selected region,

Huh? I kill some text (or copy it to the kill-ring). Then I select some
other text with the mouse. Then I type or I yank. The typed or
yanked text replaces the mouse-selected text. What am I missing?

> so the whole
> =09     (when (and (string=3D (buffer-substring-no-properties
> =09=09=09=09  (point) (mark)) (car kill-ring))
> =09=09=09(fboundp 'mouse-region-match)
> =09=09=09(mouse-region-match))
> =09       (current-kill 1))
> could be deleted altogether. =20

Why would we do that? That's been there forever - except for the
mouse-region-match part that you added (subject of this report).

> Otherwise, if there is a wish to support
> mouse yanking, a separate enhancement request could be created.

Why do you think that clause is about mouse yanking? It's about
using a command that has `yank' as the value of its `delete-selection'
property.

> I don't understand this bug report too - in fact, there is no bug,
> the purpose of the old change was to remove gratuitous optimization
> that breaks keyboard macros (the result of yanking should not depend
> on differences between old and new text),=20

Sorry, but I don't understand that. What old change? What
optimization? What macro breakage (example)? What old and
new text? No idea what you're saying, there.

> and nobody complained during last 10+ years.

I filed this bug report 4 years ago. What kinds of complaints are
you expecting?

> But if Drew wants such optimization, then a new customizable option
> could be added.

I don't know what optimization you're talking about; sorry.

The comment that introduces the code that you think is
extra and should be deleted is this:

;; Before a yank command, make sure we don't yank the
;; head of the kill-ring that really comes from the
;; currently active region we are going to delete.
;; That would make yank a no-op.

That comment has been there since at least Emacs 20!

It says that the purpose of this code is to prevent just yanking
the same text that will be deleted. That's the entire purpose
of property-value `yank'. This is not an optimization. It's
precisely so you _can_ yank to replace the selection. Without
this code you cannot - you end up replacing the selection
with its own text.

The part of the code that you want to remove is the ONLY
code that has been present forever for the `yank' condition.
Remove that and you'll remove the use of property-value
`yank'.

Clearly I'm not understanding you. Please try to clarify. I hope
this is just a case of you or me missing something, and not one
of real disagreement.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#18090; Package emacs. Full text available.

Message received at 18090 <at> debbugs.gnu.org:


Received: (at 18090) by debbugs.gnu.org; 20 Sep 2018 21:12:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 20 17:12:48 2018
Received: from localhost ([127.0.0.1]:47410 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1g36Fk-00036z-2q
	for submit <at> debbugs.gnu.org; Thu, 20 Sep 2018 17:12:48 -0400
Received: from pop.dreamhost.com ([64.90.62.162]:41418
 helo=pdx1-sub0-mail-a36.g.dreamhost.com)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1g36Fh-00036q-P3
 for 18090 <at> debbugs.gnu.org; Thu, 20 Sep 2018 17:12:46 -0400
Received: from pdx1-sub0-mail-a36.g.dreamhost.com (localhost [127.0.0.1])
 by pdx1-sub0-mail-a36.g.dreamhost.com (Postfix) with ESMTP id CDD1A7EDA7;
 Thu, 20 Sep 2018 14:12:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc
 :subject:references:date:in-reply-to:message-id:mime-version
 :content-type; s=linkov.net; bh=rkVoDgS6COePrQwNW6KpKoFnxBs=; b=
 k3l6WIGKDxbZfoPs2y8RiMbBsDkSOpyIYLiLT8iCbQpb+HpCpvOoTlmOyyCpvfEL
 qX/FQT8zn/EVEDJKVGw+VoY/fgLi0v7c7VW/QIZzBugXU8VXaKinHroJOzVI9ypg
 N3AMt4lKXj9W53qb5lKocOG5C3SfvBXVyPRCSu5r+JE=
Received: from localhost.linkov.net (m91-129-107-237.cust.tele2.ee
 [91.129.107.237])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 (Authenticated sender: jurta@HIDDEN)
 by pdx1-sub0-mail-a36.g.dreamhost.com (Postfix) with ESMTPSA id 8EAAA7EDB7;
 Thu, 20 Sep 2018 14:12:43 -0700 (PDT)
X-DH-BACKEND: pdx1-sub0-mail-a36
X-DH-BACKEND: pdx1-sub0-mail-a36
From: Juri Linkov <juri@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#18090: 24.4.50;
 `delete-selection-helper' logic changed for non-mouse region?
Organization: LINKOV.NET
References: <95e066b9-792c-4b38-8f4b-fd225578ed45@default>
 <eafa1e61-31df-4002-8e1a-289c6dcf5244@default>
 <9859e098-daf7-4b67-a8a6-c53d01a18f93@default>
 <83fty4elsx.fsf@HIDDEN>
Date: Thu, 20 Sep 2018 23:52:04 +0300
In-Reply-To: <83fty4elsx.fsf@HIDDEN> (Eli Zaretskii's message of "Thu, 20 Sep
 2018 09:15:58 +0300")
Message-ID: <87pnx8xckg.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 18090
Cc: 18090 <at> debbugs.gnu.org, Drew Adams <drew.adams@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> That change was made due to problems described in this thread:
>
>   http://lists.gnu.org/archive/html/emacs-devel/2007-06/msg01642.html
>
> FWIW, I cannot reproduce the original problem reported by Juri in that
> thread, in Emacs 22.1, which according to my calculations was released
> before the change.  So I cannot dig deeper into the issue, but my
> first thought was that this code needs to be rethought/augmented due
> to changes in Emacs 24 regarding selections, since currently the
> default is not to copy to the kill-ring the region selected by
> dragging the mouse.

I see that mouse operations are not supported by delete-selection-mode
anyway - yanking with <mouse-2> doesn't replace the selected region,
so the whole

	     (when (and (string= (buffer-substring-no-properties
				  (point) (mark))
				 (car kill-ring))
			(fboundp 'mouse-region-match)
			(mouse-region-match))
	       (current-kill 1))

could be deleted altogether.  Otherwise, if there is a wish to support
mouse yanking, a separate enhancement request could be created.

> I also don't think I understand your report, Drew.  What exactly is
> the problem you are complaining about?  Surely, the problem is not the
> code, but its effect; however, all you say about the effect is that
> "yanking point is rotated only when the mouse was used".  I don't
> understand what "rotating yanking point" means, let alone why it is
> problematic.

I don't understand this bug report too - in fact, there is no bug,
the purpose of the old change was to remove gratuitous optimization
that breaks keyboard macros (the result of yanking should not depend
on differences between old and new text), and nobody complained
during last 10+ years.

But if Drew wants such optimization, then a new customizable option
could be added.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#18090; Package emacs. Full text available.

Message received at 18090 <at> debbugs.gnu.org:


Received: (at 18090) by debbugs.gnu.org; 20 Sep 2018 15:05:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 20 11:05:08 2018
Received: from localhost ([127.0.0.1]:47148 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1g30Vw-0008SO-0l
	for submit <at> debbugs.gnu.org; Thu, 20 Sep 2018 11:05:08 -0400
Received: from userp2130.oracle.com ([156.151.31.86]:36328)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1g30Vt-0008Rg-UR
 for 18090 <at> debbugs.gnu.org; Thu, 20 Sep 2018 11:05:06 -0400
Received: from pps.filterd (userp2130.oracle.com [127.0.0.1])
 by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w8KF48Xf160274;
 Thu, 20 Sep 2018 15:04:59 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=mime-version :
 message-id : date : from : sender : to : cc : subject : references :
 in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02;
 bh=oNa+DqZcVpb6MFOhYoEM2ZeR6tH9/qKYSRI6RTCRnko=;
 b=kTrpXjhh5t83KcyaJ5Dc9GfWgQ6HRuiMXN0uhVL/0LOqhOBGAfb/PcLll3TLTs+fuB/a
 VRZlpy0Dm5xfVcamERx+q+52kJ2JFkEGGFUzS5RPi1n+Ynm6No30khFlGbFpxvEqoorn
 YqRwZWIpPCDRhUzljBW6ZJceGzk91kSGrmD5rrT7LGb3iqrD2XR5lqfDsIEZMvcMqd1i
 csIY6C0HMT7kMaDAqynHv/Wpp63E54DphZglACwZ5BChbDk8riPLY+190jO8bXgPrFKX
 OzuHt/wv2koWQqn2EPcgaSl0QCJq76XxSWWLbVz5klq+LcyxzMSiy8YzNUl54oeu1lAS YQ== 
Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234])
 by userp2130.oracle.com with ESMTP id 2mgsgu3eh9-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Thu, 20 Sep 2018 15:04:59 +0000
Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235])
 by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w8KF4wrR026985
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Thu, 20 Sep 2018 15:04:58 GMT
Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14])
 by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w8KF4vRQ021376;
 Thu, 20 Sep 2018 15:04:57 GMT
MIME-Version: 1.0
Message-ID: <aa9ce097-bbbf-4cc7-a4e8-1e9b829ad5df@default>
Date: Thu, 20 Sep 2018 08:04:56 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>, Juri Linkov <juri@HIDDEN>
Subject: RE: bug#18090: 24.4.50; `delete-selection-helper' logic changed for
 non-mouse region?
References: <95e066b9-792c-4b38-8f4b-fd225578ed45@default>
 <eafa1e61-31df-4002-8e1a-289c6dcf5244@default>
 <9859e098-daf7-4b67-a8a6-c53d01a18f93@default> <83fty4elsx.fsf@HIDDEN>
In-Reply-To: <83fty4elsx.fsf@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 16.0.4735.0 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9021
 signatures=668707
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0
 malwarescore=0
 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999
 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1
 engine=8.0.1-1807170000 definitions=main-1809200149
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 18090
Cc: 18090 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> That change was made due to problems described in this thread:
>=20
>   https://urldefense.proofpoint.com/v2/url?u=3Dhttp-
> 3A__lists.gnu.org_archive_html_emacs-2Ddevel_2007-
> 2D06_msg01642.html&d=3DDwIBAg&c=3DRoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMU
> B65eapI_JnE&r=3DkI3P6ljGv6CTHIKju0jqInF6AOwMCYRDQUmqX22rJ98&m=3D1Sma
> MGY0ePhv2v_dZNfjfbgjYaW_usF7c6AeSBPND4A&s=3DtjJCnI84nM3eLwqFSz2ImzZ
> U1RBUgqh9dbJs3SvCK_w&e=3D
>=20
> FWIW, I cannot reproduce the original problem reported by Juri in that
> thread, in Emacs 22.1, which according to my calculations was released
> before the change.  So I cannot dig deeper into the issue, but my
> first thought was that this code needs to be rethought/augmented due
> to changes in Emacs 24 regarding selections, since currently the
> default is not to copy to the kill-ring the region selected by
> dragging the mouse.
>=20
> I also don't think I understand your report, Drew.  What exactly is
> the problem you are complaining about?  Surely, the problem is not the
> code, but its effect; however, all you say about the effect is that
> "yanking point is rotated only when the mouse was used".  I don't
> understand what "rotating yanking point" means, let alone why it is
> problematic.
>=20
> I hope Juri, who made that change, will be able to investigate some
> more.

I have my own code for `delete-selection-mode' stuff, including my
own version of ` delete-selection-helper'. I added the two lines that
were added to the vanilla version for reference, but I commented
them out. I see no need for them - no problem without them. And
I think it doesn't make sense to treat the mouse differently here.

 (while (and tail  (string=3D (buffer-substring-no-properties (point) (mark=
))
           ;; Vanilla Emacs has this, which seems very wrong.
           ;; See Emacs bug #18090.
           ;;;   (fboundp 'mouse-region-match)
           ;;;   (mouse-region-match)
           )

I can't add more than that, I'm afraid. I don't see the bug that Juri
reports, even though the code I use does not have those two
commented lines.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#18090; Package emacs. Full text available.

Message received at 18090 <at> debbugs.gnu.org:


Received: (at 18090) by debbugs.gnu.org; 20 Sep 2018 06:16:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 20 02:16:27 2018
Received: from localhost ([127.0.0.1]:46254 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1g2sGJ-0007kg-9R
	for submit <at> debbugs.gnu.org; Thu, 20 Sep 2018 02:16:27 -0400
Received: from eggs.gnu.org ([208.118.235.92]:50099)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1g2sGF-0007kP-GV
 for 18090 <at> debbugs.gnu.org; Thu, 20 Sep 2018 02:16:23 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1g2sG7-0002GZ-3M
 for 18090 <at> debbugs.gnu.org; Thu, 20 Sep 2018 02:16:18 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05 autolearn=disabled
 version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52360)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1g2sG6-0002GU-W5; Thu, 20 Sep 2018 02:16:15 -0400
Received: from [176.228.60.248] (port=3575 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1g2sG6-0006lZ-Jw; Thu, 20 Sep 2018 02:16:14 -0400
Date: Thu, 20 Sep 2018 09:15:58 +0300
Message-Id: <83fty4elsx.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Drew Adams <drew.adams@HIDDEN>, Juri Linkov <juri@HIDDEN>
In-reply-to: <9859e098-daf7-4b67-a8a6-c53d01a18f93@default> (message from Drew
 Adams on Wed, 19 Sep 2018 10:51:39 -0700 (PDT))
Subject: Re: bug#18090: 24.4.50;
 `delete-selection-helper' logic changed for non-mouse region?
References: <95e066b9-792c-4b38-8f4b-fd225578ed45@default>
 <eafa1e61-31df-4002-8e1a-289c6dcf5244@default>
 <9859e098-daf7-4b67-a8a6-c53d01a18f93@default>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 18090
Cc: 18090 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)

> Date: Wed, 19 Sep 2018 10:51:39 -0700 (PDT)
> From: Drew Adams <drew.adams@HIDDEN>
> 
> ping
> 
> > Sent: Tuesday, April 3, 2018 2:06 PM
> > ping
> > Could someone else please take a look at this?
> > Thx.

That change was made due to problems described in this thread:

  http://lists.gnu.org/archive/html/emacs-devel/2007-06/msg01642.html

FWIW, I cannot reproduce the original problem reported by Juri in that
thread, in Emacs 22.1, which according to my calculations was released
before the change.  So I cannot dig deeper into the issue, but my
first thought was that this code needs to be rethought/augmented due
to changes in Emacs 24 regarding selections, since currently the
default is not to copy to the kill-ring the region selected by
dragging the mouse.

I also don't think I understand your report, Drew.  What exactly is
the problem you are complaining about?  Surely, the problem is not the
code, but its effect; however, all you say about the effect is that
"yanking point is rotated only when the mouse was used".  I don't
understand what "rotating yanking point" means, let alone why it is
problematic.

I hope Juri, who made that change, will be able to investigate some
more.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#18090; Package emacs. Full text available.

Message received at 18090 <at> debbugs.gnu.org:


Received: (at 18090) by debbugs.gnu.org; 19 Sep 2018 17:51:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 19 13:51:50 2018
Received: from localhost ([127.0.0.1]:45933 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1g2gdi-0000Ql-E4
	for submit <at> debbugs.gnu.org; Wed, 19 Sep 2018 13:51:50 -0400
Received: from userp2130.oracle.com ([156.151.31.86]:41978)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1g2gdg-0000QQ-Ev
 for 18090 <at> debbugs.gnu.org; Wed, 19 Sep 2018 13:51:49 -0400
Received: from pps.filterd (userp2130.oracle.com [127.0.0.1])
 by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w8JHn5iQ184191
 for <18090 <at> debbugs.gnu.org>; Wed, 19 Sep 2018 17:51:42 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=mime-version :
 message-id : date : from : sender : to : subject : references :
 in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02;
 bh=a80TnV3ve+26b2ee19/QGFpBpA10entT3l657nAmo3E=;
 b=icrVP+RwFWypUQEsYE8CUNT1gxPkdI3prD6fC+/w5IhD2m6zQH9QfhgTbCMmvVgWSrom
 MEmmsKDqYi3kInBxZhXVTNJHq3BO4WQx365QwGCdUVRCrZg0b0BP7bMWwOuKCWoCqIdA
 VslB/zyOoVTEDTB3uL8tNoOp1g/hJCMhMuq8OyensbddEf5Aqpr7MPqrAi+o76lbDy39
 0UUbCZpLPNTi7700ogHhGj1+YtNAf6gRuKCrxYmrwZG3feY356Zmbua8GpwkKDTvwpsE
 NwUJ5V1Emj0mkCGBdwk9ySkBpEdxMubCCM9xLEIfdYEQ1gntlQS39X7WCFdnd50rSX7m JA== 
Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234])
 by userp2130.oracle.com with ESMTP id 2mgsgtvn5k-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK)
 for <18090 <at> debbugs.gnu.org>; Wed, 19 Sep 2018 17:51:42 +0000
Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236])
 by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w8JHpftV023634
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK)
 for <18090 <at> debbugs.gnu.org>; Wed, 19 Sep 2018 17:51:41 GMT
Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18])
 by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w8JHpekC010011
 for <18090 <at> debbugs.gnu.org>; Wed, 19 Sep 2018 17:51:41 GMT
MIME-Version: 1.0
Message-ID: <9859e098-daf7-4b67-a8a6-c53d01a18f93@default>
Date: Wed, 19 Sep 2018 10:51:39 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
To: 18090 <at> debbugs.gnu.org
Subject: RE: bug#18090: 24.4.50; `delete-selection-helper' logic changed for
 non-mouse region?
References: <95e066b9-792c-4b38-8f4b-fd225578ed45@default>
 <eafa1e61-31df-4002-8e1a-289c6dcf5244@default>
In-Reply-To: <eafa1e61-31df-4002-8e1a-289c6dcf5244@default>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 16.0.4735.0 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9021
 signatures=668707
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=13
 malwarescore=0
 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=478
 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1
 engine=8.0.1-1807170000 definitions=main-1809190172
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 18090
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

ping

> Sent: Tuesday, April 3, 2018 2:06 PM
> ping
> Could someone else please take a look at this?
> Thx.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#18090; Package emacs. Full text available.

Message received at 18090 <at> debbugs.gnu.org:


Received: (at 18090) by debbugs.gnu.org; 3 Apr 2018 21:11:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 03 17:11:23 2018
Received: from localhost ([127.0.0.1]:37391 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1f3TD8-0008Vp-Tr
	for submit <at> debbugs.gnu.org; Tue, 03 Apr 2018 17:11:23 -0400
Received: from userp2120.oracle.com ([156.151.31.85]:50806)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1f3TD6-0008Vd-SY
 for 18090 <at> debbugs.gnu.org; Tue, 03 Apr 2018 17:11:21 -0400
Received: from pps.filterd (userp2120.oracle.com [127.0.0.1])
 by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w33L4vXG108941
 for <18090 <at> debbugs.gnu.org>; Tue, 3 Apr 2018 21:11:15 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=mime-version :
 message-id : date : from : sender : to : subject : references :
 in-reply-to : content-type : content-transfer-encoding; s=corp-2017-10-26;
 bh=8majV3j7mQeQWBCYSRrAf1WQANSKCdo105BCv8TEGKQ=;
 b=Kbi+WjdWO412nfR9CCDKdKNMww+2b2U+A9+iBDwx82Lh40SRDjaX0PytoPFj+AXvb47g
 a/d/4kpue4pM4ZWDjk7MCFedyHAhbuMs+BJI/qdbOc1YC+ILrwq+yoITKFIUcUoXV3Rp
 isecwk0SceCiaHVO7aZQcwerPqwdCvT9IKC6eI8LxhzTvO7P+3CeKvJLsbV3W9gmvJzx
 BSiZA+xr+bqleR3IjXNSud/GzCUEYmBGnVzlbNHnpCQgJxduOojxhwkfGq1IYz2P487P
 YIpPjj/5OjoJOh7su7F3hv5HwJ7NMvyQXepucobXr79N21lnZfPKF7zlUPe3PTEvof9l Og== 
Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233])
 by userp2120.oracle.com with ESMTP id 2h4h78r0yy-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK)
 for <18090 <at> debbugs.gnu.org>; Tue, 03 Apr 2018 21:11:15 +0000
Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72])
 by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w33L6Dj6003680
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK)
 for <18090 <at> debbugs.gnu.org>; Tue, 3 Apr 2018 21:06:14 GMT
Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11])
 by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w33L6DgW008570
 for <18090 <at> debbugs.gnu.org>; Tue, 3 Apr 2018 21:06:13 GMT
MIME-Version: 1.0
Message-ID: <eafa1e61-31df-4002-8e1a-289c6dcf5244@default>
Date: Tue, 3 Apr 2018 14:06:11 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
To: 18090 <at> debbugs.gnu.org
Subject: RE: bug#18090: 24.4.50; `delete-selection-helper' logic changed for
 non-mouse region?
References: <95e066b9-792c-4b38-8f4b-fd225578ed45@default>
In-Reply-To: <95e066b9-792c-4b38-8f4b-fd225578ed45@default>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 16.0.4666.0 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8852
 signatures=668697
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=13
 malwarescore=0
 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=992
 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1
 engine=8.0.1-1711220000 definitions=main-1804030211
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 18090
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

ping

Could someone else please take a look at this?
Thx.

> Sent: Wednesday, July 23, 2014 11:03 AM


> Prior to Emacs 23, the delsel.el code that handles a yank had this code:
>=20
> ;; Before a yank command, make sure we don't yank the
> ;; head of the kill-ring that really comes from the
> ;; currently active region we are going to delete.
> ;; That would make yank a no-op.
> (when (and (string=3D (buffer-substring-no-properties (point) (mark))
>                     (car kill-ring)))
>   (current-kill 1))
>=20
> That code dates from the creation of delsel.el.  In Emacs 23, these
> two sexps were appended to the `and' conditions, which completely
> changes the meaning/behavior (though the comment was not modified):
>=20
>  (fboundp 'mouse-region-match)
>  (mouse-region-match)
>=20
> This changed the behavior so that the yanking point is now rotated only
> when the mouse was used to set the region.  This makes no sense to me,
> but perhaps I am missing something.  Does this make sense to you?
> If it does make sense, then at least the comment should be updated to
> reflect the current behavior.
>=20
>=20
> ---
>=20
> BTW, I also think it would be better to use `while' instead of `when'
> in the code:
>=20
> (let ((tail  kill-ring))
>   (while (and tail  (string=3D (buffer-substring-no-properties (point)
> (mark))
>                              (car tail))
>               (fboundp 'mouse-region-match) ; ????
>               (mouse-region-match)) ; ????
>     (current-kill 1)
>     (setq tail  (cdr tail))))
>=20
>=20
> In GNU Emacs 24.4.50.1 (i686-pc-mingw32)
>  of 2014-06-28 on ODIEONE
> Bzr revision: 117431 rgm@HIDDEN
> Windowing system distributor `Microsoft Corp.', version 6.1.7601
> Configured using:
>  `configure --prefix=3D/c/Devel/emacs/snapshot/trunk
>  --enable-checking=3Dyes,glyphs 'CFLAGS=3D-O0 -g3'
>  LDFLAGS=3D-Lc:/Devel/emacs/lib 'CPPFLAGS=3D-DGC_MCHECK=3D1
>  -Ic:/Devel/emacs/include''
>=20
>=20
>=20




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#18090; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 23 Jul 2014 18:03:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 23 14:03:25 2014
Received: from localhost ([127.0.0.1]:35851 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XA0sr-0004AW-Ah
	for submit <at> debbugs.gnu.org; Wed, 23 Jul 2014 14:03:25 -0400
Received: from eggs.gnu.org ([208.118.235.92]:48594)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <drew.adams@HIDDEN>) id 1XA0sl-0004A1-6A
 for submit <at> debbugs.gnu.org; Wed, 23 Jul 2014 14:03:19 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1XA0sV-000883-H1
 for submit <at> debbugs.gnu.org; Wed, 23 Jul 2014 14:03:09 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:49325)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1XA0sV-00087z-DV
 for submit <at> debbugs.gnu.org; Wed, 23 Jul 2014 14:02:59 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:50268)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1XA0sM-0006IJ-2x
 for bug-gnu-emacs@HIDDEN; Wed, 23 Jul 2014 14:02:59 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1XA0sC-00086T-Pm
 for bug-gnu-emacs@HIDDEN; Wed, 23 Jul 2014 14:02:50 -0400
Received: from aserp1040.oracle.com ([141.146.126.69]:43356)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1XA0sC-00086O-Ii
 for bug-gnu-emacs@HIDDEN; Wed, 23 Jul 2014 14:02:40 -0400
Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237])
 by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id
 s6NI2cXW006796
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK)
 for <bug-gnu-emacs@HIDDEN>; Wed, 23 Jul 2014 18:02:39 GMT
Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231])
 by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s6NI2cGs029692
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
 for <bug-gnu-emacs@HIDDEN>; Wed, 23 Jul 2014 18:02:38 GMT
Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22])
 by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s6NI2cEw004032
 for <bug-gnu-emacs@HIDDEN>; Wed, 23 Jul 2014 18:02:38 GMT
MIME-Version: 1.0
Message-ID: <95e066b9-792c-4b38-8f4b-fd225578ed45@default>
Date: Wed, 23 Jul 2014 11:02:37 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 24.4.50; `delete-selection-helper' logic changed for non-mouse region?
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8  (707110) [OL
 12.0.6691.5000 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Source-IP: acsinet21.oracle.com [141.146.126.237]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

Prior to Emacs 23, the delsel.el code that handles a yank had this code:

;; Before a yank command, make sure we don't yank the
;; head of the kill-ring that really comes from the
;; currently active region we are going to delete.
;; That would make yank a no-op.
(when (and (string=3D (buffer-substring-no-properties (point) (mark))
                    (car kill-ring)))
  (current-kill 1))

That code dates from the creation of delsel.el.  In Emacs 23, these
two sexps were appended to the `and' conditions, which completely
changes the meaning/behavior (though the comment was not modified):

 (fboundp 'mouse-region-match)
 (mouse-region-match)

This changed the behavior so that the yanking point is now rotated only
when the mouse was used to set the region.  This makes no sense to me,
but perhaps I am missing something.  Does this make sense to you?
If it does make sense, then at least the comment should be updated to
reflect the current behavior.


---

BTW, I also think it would be better to use `while' instead of `when'
in the code:

(let ((tail  kill-ring))
  (while (and tail  (string=3D (buffer-substring-no-properties (point) (mar=
k))
                             (car tail))
              (fboundp 'mouse-region-match) ; ????
              (mouse-region-match)) ; ????
    (current-kill 1)
    (setq tail  (cdr tail))))


In GNU Emacs 24.4.50.1 (i686-pc-mingw32)
 of 2014-06-28 on ODIEONE
Bzr revision: 117431 rgm@HIDDEN
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=3D/c/Devel/emacs/snapshot/trunk
 --enable-checking=3Dyes,glyphs 'CFLAGS=3D-O0 -g3'
 LDFLAGS=3D-Lc:/Devel/emacs/lib 'CPPFLAGS=3D-DGC_MCHECK=3D1
 -Ic:/Devel/emacs/include''




Acknowledgement sent to Drew Adams <drew.adams@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#18090; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.