From: Drew Adams <drew.adams@oracle.com>
To: Eli Zaretskii <eliz@gnu.org>, Drew Adams <drew.adams@oracle.com>
Cc: 32747@debbugs.gnu.org
Subject: bug#32747: 26; `C-M-w M-w' with non-nil `mouse-drag-copy-region', if selected with mouse
Date: Wed, 19 Sep 2018 06:51:40 -0700 (PDT) [thread overview]
Message-ID: <932a1915-c043-4708-9f16-dc0ee8fafdb3@default> (raw)
In-Reply-To: <<83tvmlew2a.fsf@gnu.org>>
> > 1. emacs -Q
> > 2. (setq mouse-drag-copy-region t) ; Mouse selection copies to kill-ring.
> > 3. In *scratch*, select some text, e.g. "This buffer".
> > 4. Use `M-w' to copy the selected text to the kill ring.
> > 5. With the mouse, select some other text, e.g. "visit that file".
> > 6. Use `C-M-w M-w', to append the second selection to the first as the
> > last kill. The kill should thus be "This buffervisit that file".
> > 7. `C-y' to yank the last kill.
> >
> > The text yanked should be "This buffervisit that file". Instead, it is
> > "visit that filevisit that file". That is, the second selection is
> > added to the kill ring and appended to itself.
>
> I see something almost opposite:
>
> . in Emacs 23.4, the above recipe produces the "wrong" behavior,
> unless I set mouse-drag-copy-region to nil (it is t by default)
>
> . in Emacs 24 and later, mouse-drag-copy-region is nil by default, so
> the recipe works in "emacs -Q" without any customizations, but if I
> set mouse-drag-copy-region to t, I get the old "wrong" Emacs 23
> behavior
>
> So I wonder what is going on with your system that you seem to see
> such strikingly different results.
Thanks for checking this.
Apologies. Dunno what I was seeing, or thought I was seeing, for
Emacs 23.4. Perhaps I was mixed up by not realizing that the
default value for the variable was different, and perhaps not
testing both cases or something.
Anyay, replaying the recipe now (again, from -Q), I see the bad
behavior in _all_ Emacs releases (including back to Emacs 20,
when there was no variable `mouse-drag-copy-region').
In Emacs 23.4, changing `mouse-drag-copy-region' to nil does _not_
fix the behavior, for me. Are you sure that it does, for you? Both nil
and t values just duplicate the mouse selection - the first text selected
and copied to the kill-ring with `M-w' is not present in either case.
In Emacs 24.5 and later the bad behavior exists only when the
variable is non-nil.
So the bug does not seem to be a regression, and it is longstanding.
Perhaps no one ever tried to use `C-M-w M-w' with a mouse
selection when testing?
Do you agree that this is a bug? If not, do you agree that it is a
worthwhile enhancement request that `C-M-w' be able to affect
a mouse selection the same way it affects a selection made with
the keyboard?
To me, this is a bug. The behavior contradicts what the doc says for
`C-M-w', and the behavior is useless (why would anyone want
duplication of the mouse selection - appending it to itself instead
of the previous kill?)
(The same problem exists for an actual kill, BTW. E.g. following
`C-M-w' with `C-w' instead of `M-w'.)
That I see the problem in Emacs 23.4 with both values of the
variable, and I see it in older releases where the variable does
not exist yet, maybe provides a clue for fixing the bug; dunno.
Whatever is done now for the nil case works correctly.
next parent reply other threads:[~2018-09-19 13:51 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <<ea7faa90-5fef-43f8-8aa9-bb3d60d476c4@default>
[not found] ` <<83tvmlew2a.fsf@gnu.org>
2018-09-19 13:51 ` Drew Adams [this message]
2018-09-19 14:38 ` bug#32747: 26; `C-M-w M-w' with non-nil `mouse-drag-copy-region', if selected with mouse Eli Zaretskii
[not found] <<<ea7faa90-5fef-43f8-8aa9-bb3d60d476c4@default>
[not found] ` <<<83tvmlew2a.fsf@gnu.org>
[not found] ` <<932a1915-c043-4708-9f16-dc0ee8fafdb3@default>
[not found] ` <<83pnx9een5.fsf@gnu.org>
2018-09-19 18:24 ` Drew Adams
2018-09-19 18:44 ` Eli Zaretskii
[not found] <<<<ea7faa90-5fef-43f8-8aa9-bb3d60d476c4@default>
[not found] ` <<<<83tvmlew2a.fsf@gnu.org>
[not found] ` <<<932a1915-c043-4708-9f16-dc0ee8fafdb3@default>
[not found] ` <<<83pnx9een5.fsf@gnu.org>
[not found] ` <<01b0f0c4-e3b8-440f-a739-5995ca4ff615@default>
[not found] ` <<83o9cte392.fsf@gnu.org>
2018-09-19 19:23 ` Drew Adams
2018-09-16 21:29 ` Drew Adams
2018-09-19 8:22 ` Eli Zaretskii
2018-09-20 15:16 ` Drew Adams
2018-09-20 20:17 ` Eli Zaretskii
2018-09-20 15:09 ` Drew Adams
[not found] ` <87h8ikpf4u.fsf_-_@gmail.com>
2022-04-21 14:20 ` bug#32747: Be able to append mouse selections at the head of `kill-ring' (e.g, with C-M-w) Lars Ingebrigtsen
2022-05-22 16:07 ` Lars Ingebrigtsen
2022-06-19 22:59 ` Lars Ingebrigtsen
[not found] <<<<<ea7faa90-5fef-43f8-8aa9-bb3d60d476c4@default>
[not found] ` <<<<<83tvmlew2a.fsf@gnu.org>
[not found] ` <<<<932a1915-c043-4708-9f16-dc0ee8fafdb3@default>
[not found] ` <<<<83pnx9een5.fsf@gnu.org>
[not found] ` <<<01b0f0c4-e3b8-440f-a739-5995ca4ff615@default>
[not found] ` <<<83o9cte392.fsf@gnu.org>
[not found] ` <<9136cccc-7e97-4a74-89a9-00eccab73c32@default>
[not found] ` <<4394ff48-2444-4a9b-b635-e96e66a30cba@default>
[not found] ` <<83a7obexed.fsf@gnu.org>
2018-09-20 20:44 ` bug#32747: 26; `C-M-w M-w' with non-nil `mouse-drag-copy-region', if selected with mouse Drew Adams
2018-09-20 20:55 ` Eli Zaretskii
[not found] <<<<<<ea7faa90-5fef-43f8-8aa9-bb3d60d476c4@default>
[not found] ` <<<<<<83tvmlew2a.fsf@gnu.org>
[not found] ` <<<<<932a1915-c043-4708-9f16-dc0ee8fafdb3@default>
[not found] ` <<<<<83pnx9een5.fsf@gnu.org>
[not found] ` <<<<01b0f0c4-e3b8-440f-a739-5995ca4ff615@default>
[not found] ` <<<<83o9cte392.fsf@gnu.org>
[not found] ` <<<9136cccc-7e97-4a74-89a9-00eccab73c32@default>
[not found] ` <<<4394ff48-2444-4a9b-b635-e96e66a30cba@default>
[not found] ` <<<83a7obexed.fsf@gnu.org>
[not found] ` <<1254fccb-35ae-4c51-8471-e01844f64517@default>
[not found] ` <<834lejevn7.fsf@gnu.org>
2018-09-20 20:59 ` Drew Adams
2018-09-20 22:16 ` Noam Postavsky
2018-09-21 4:23 ` Drew Adams
2018-09-21 6:44 ` Eli Zaretskii
2018-10-30 3:54 ` Drew Adams
2018-10-30 7:33 ` Eli Zaretskii
[not found] ` <<a141e4d1-fc48-44e3-819a-85befed70c26@default>
[not found] ` <<87efdnq0g9.fsf@gmail.com>
[not found] ` <<80dfd942-980e-44f7-9592-d4c2388168d1@default>
[not found] ` <<83d0rrlwhy.fsf@gnu.org>
2018-10-30 13:33 ` Drew Adams
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=932a1915-c043-4708-9f16-dc0ee8fafdb3@default \
--to=drew.adams@oracle.com \
--cc=32747@debbugs.gnu.org \
--cc=eliz@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.