* bug#63872: [PATCH] `mouse-drag-and-drop-region' sometimes couldn't cut
@ 2023-06-03 13:35 Shynur Xie
2023-06-03 13:52 ` Shynur Xie
2023-06-04 0:31 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 2 replies; 9+ messages in thread
From: Shynur Xie @ 2023-06-03 13:35 UTC (permalink / raw)
To: 63872
[-- Attachment #1: Type: text/plain, Size: 499 bytes --]
The function `mouse-drag-and-drop-region' couldn't cut/move the
selected region when `mark-even-if-inactive' is t.
Say execute `emacs -Q` then evaluate
(custom-set-variables
'(mark-even-if-inactive nil)
'(mouse-drag-and-drop-region t))
When I use mouse to drag and drop a selected region, the region is not
cut and pasted; it is copied and pasted instead.
The attached patch binds `mark-even-if-inactive' to t within the body
of `mouse-drag-and-drop-region'.
--
shynur
[-- Attachment #2: 0001-Fix-bug-that-mouse-drag-and-drop-region-couldn-t-cut.patch --]
[-- Type: application/octet-stream, Size: 885 bytes --]
From e6c6d33b3b4f142d475a50c71b011ea0ef0f1533 Mon Sep 17 00:00:00 2001
From: Shynur <one.last.kiss@outlook.com>
Date: Sat, 3 Jun 2023 21:14:41 +0800
Subject: [PATCH] Fix bug that `mouse-drag-and-drop-region' couldn't cut
* lisp/mouse.el (mouse-drag-and-drop-region): Bind
`mark-even-if-inactive' to t locally.
---
lisp/mouse.el | 1 +
1 file changed, 1 insertion(+)
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 3c30361ad7d..475b3871348 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -3154,6 +3154,7 @@ is copied instead of being cut."
;; System tooltips tend to flicker and in general work
;; incorrectly.
(use-system-tooltips nil)
+ (mark-even-if-inactive t)
;; Whether or not some text was ``cut'' from Emacs to another
;; program and the cleaanup code should not try modifying the
;; region.
--
2.39.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* bug#63872: [PATCH] `mouse-drag-and-drop-region' sometimes couldn't cut
2023-06-03 13:35 bug#63872: [PATCH] `mouse-drag-and-drop-region' sometimes couldn't cut Shynur Xie
@ 2023-06-03 13:52 ` Shynur Xie
2023-06-04 0:31 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
1 sibling, 0 replies; 9+ messages in thread
From: Shynur Xie @ 2023-06-03 13:52 UTC (permalink / raw)
To: 63872@debbugs.gnu.org
A typo in line 2:
> selected region when `mark-even-if-inactive' is t.
^
should be "nil" here
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#63872: [PATCH] `mouse-drag-and-drop-region' sometimes couldn't cut
2023-06-03 13:35 bug#63872: [PATCH] `mouse-drag-and-drop-region' sometimes couldn't cut Shynur Xie
2023-06-03 13:52 ` Shynur Xie
@ 2023-06-04 0:31 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-04 8:38 ` Shynur Xie
1 sibling, 1 reply; 9+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-06-04 0:31 UTC (permalink / raw)
To: Shynur Xie; +Cc: 63872
Shynur Xie <one.last.kiss@outlook.com> writes:
> When I use mouse to drag and drop a selected region, the region is not
> cut and pasted; it is copied and pasted instead.
With transient-mark-mode on or off?
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#63872: [PATCH] `mouse-drag-and-drop-region' sometimes couldn't cut
2023-06-04 0:31 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-06-04 8:38 ` Shynur Xie
2023-06-04 8:48 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 9+ messages in thread
From: Shynur Xie @ 2023-06-04 8:38 UTC (permalink / raw)
To: Po Lu; +Cc: 63872@debbugs.gnu.org
> From: Po Lu
> Date: Sun, 04 Jun 2023 08:31:31 +0800
> To: Shynur
>
>> When I use mouse to drag and drop a selected region, the region is
>> not cut and pasted; it is copied and pasted instead.
>
> With transient-mark-mode on or off?
On, by default. I used `-Q` to launch Emacs.
(I forgot to CC the last email, my apologies. I am resending it now.)
^ permalink raw reply [flat|nested] 9+ messages in thread
* bug#63872: [PATCH] `mouse-drag-and-drop-region' sometimes couldn't cut
2023-06-04 8:38 ` Shynur Xie
@ 2023-06-04 8:48 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
[not found] ` <SN7PR11MB74653C0C276CD27DE0CCD886D74CA@SN7PR11MB7465.namprd11.prod.outlook.com>
0 siblings, 1 reply; 9+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-06-04 8:48 UTC (permalink / raw)
To: Shynur Xie; +Cc: 63872@debbugs.gnu.org
Shynur Xie <one.last.kiss@outlook.com> writes:
>> From: Po Lu
>> Date: Sun, 04 Jun 2023 08:31:31 +0800
>> To: Shynur
>>
>>> When I use mouse to drag and drop a selected region, the region is
>>> not cut and pasted; it is copied and pasted instead.
>>
>> With transient-mark-mode on or off?
>
> On, by default. I used `-Q` to launch Emacs.
Right. Have you looked at the option
`mouse-drag-and-drop-region-cut-when-buffers-differ'? I believe you're
experiencing intentional behavior: by default, text is copied when the
buffer which receives the drop is different from its source.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2023-09-06 12:07 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-03 13:35 bug#63872: [PATCH] `mouse-drag-and-drop-region' sometimes couldn't cut Shynur Xie
2023-06-03 13:52 ` Shynur Xie
2023-06-04 0:31 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-04 8:38 ` Shynur Xie
2023-06-04 8:48 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
[not found] ` <SN7PR11MB74653C0C276CD27DE0CCD886D74CA@SN7PR11MB7465.namprd11.prod.outlook.com>
2023-06-04 10:50 ` Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-06 10:57 ` Stefan Kangas
2023-09-06 11:42 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-06 12:07 ` Stefan Kangas
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.