From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#18090: 24.4.50; `delete-selection-helper' logic changed for non-mouse region? Date: Mon, 24 Sep 2018 22:08:46 +0300 Organization: LINKOV.NET Message-ID: <87ftxy69o9.fsf@mail.linkov.net> References: <95e066b9-792c-4b38-8f4b-fd225578ed45@default> <9859e098-daf7-4b67-a8a6-c53d01a18f93@default> <83fty4elsx.fsf@gnu.org> <87pnx8xckg.fsf@mail.linkov.net> <874leju83n.fsf@mail.linkov.net> <626fca93-0fba-4dd7-b119-7187b818dccb@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1537816449 8847 195.159.176.226 (24 Sep 2018 19:14:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 24 Sep 2018 19:14:09 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: 18090@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 24 21:14:05 2018 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 1g4WJ2-0002Cb-Iu for geb-bug-gnu-emacs@m.gmane.org; Mon, 24 Sep 2018 21:14:04 +0200 Original-Received: from localhost ([::1]:46610 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g4WL9-0007GY-5W for geb-bug-gnu-emacs@m.gmane.org; Mon, 24 Sep 2018 15:16:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33369) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g4WK2-0006c7-86 for bug-gnu-emacs@gnu.org; Mon, 24 Sep 2018 15:15:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g4WJz-0000iv-FE for bug-gnu-emacs@gnu.org; Mon, 24 Sep 2018 15:15:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48099) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g4WJz-0000ih-BA for bug-gnu-emacs@gnu.org; Mon, 24 Sep 2018 15:15:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g4WJz-0005XQ-5S for bug-gnu-emacs@gnu.org; Mon, 24 Sep 2018 15:15:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 24 Sep 2018 19:15:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18090 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18090-submit@debbugs.gnu.org id=B18090.153781647521198 (code B ref 18090); Mon, 24 Sep 2018 19:15:03 +0000 Original-Received: (at 18090) by debbugs.gnu.org; 24 Sep 2018 19:14:35 +0000 Original-Received: from localhost ([127.0.0.1]:52351 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g4WJX-0005Vp-JM for submit@debbugs.gnu.org; Mon, 24 Sep 2018 15:14:35 -0400 Original-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 ) id 1g4WJV-0005Vh-MT for 18090@debbugs.gnu.org; Mon, 24 Sep 2018 15:14:34 -0400 Original-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= Original-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@jurta.org) 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 In-Reply-To: <626fca93-0fba-4dd7-b119-7187b818dccb@default> (Drew Adams's message of "Sun, 23 Sep 2018 18:35:03 -0700 (PDT)") 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:150618 Archived-At: >> You are missing the 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.