[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#18090: 24.4.50; `delete-selection-helper' logic changed for non-mous

From: Juri Linkov
Subject: bug#18090: 24.4.50; `delete-selection-helper' logic changed for non-mouse region?
Date: Mon, 24 Sep 2018 22:08:46 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

>> 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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]