From: Shynur Xie <one.last.kiss@outlook.com>
To: 63872@debbugs.gnu.org
Subject: bug#63872: [PATCH] `mouse-drag-and-drop-region' sometimes couldn't cut
Date: Sat, 3 Jun 2023 13:35:28 +0000 [thread overview]
Message-ID: <PH0PR11MB7470D7F1727C0CBAE79FD638D74FA@PH0PR11MB7470.namprd11.prod.outlook.com> (raw)
[-- 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
next reply other threads:[~2023-06-03 13:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-03 13:35 Shynur Xie [this message]
2023-06-03 13:52 ` bug#63872: [PATCH] `mouse-drag-and-drop-region' sometimes couldn't cut 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
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=PH0PR11MB7470D7F1727C0CBAE79FD638D74FA@PH0PR11MB7470.namprd11.prod.outlook.com \
--to=one.last.kiss@outlook.com \
--cc=63872@debbugs.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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).