I tried the revised `mouse-drag-and-drop-region' on Emacs -Q 26.0.90 on
macOS 10.9.5. I can drag text within a frame but cannot do so among
frames. I think I miss something. Do you have idea?
The yellow visual rectangle of the text being dragged seems to get stuck at the source frame but if you continue your drag and release in another frame with a non-read-only buffer, your text should be properly dropped there. Is this what you did? Try it a couple different times to ensure there is not some initialization warm up problem.
For clarity, here is the latest code:
(defcustom mouse-drag-and-drop-region nil
"If non-nil, then text regions can be dragged and dropped to new locations.
Normally, drops within the same buffer move the text of the region; drops
to a different buffer copy the region. However, if this value is a modifier
symbol, such as `control' or `shift' or `meta', and the matching modifier
key is pressed when dropping the region, then the region text is always
copied. The drop location must be within the text area of an Emacs window."
:type 'symbol
:version "26.1"
:group 'mouse)
(defun mouse-drag-and-drop-region (event)
"Drag and drop the active region text to the point of mouse button release.
Normally, drops within the same buffer move the region text and drops
to a different buffer copy it. However, if a modifier key is pressed
when dropping, and the value of the variable `mouse-drag-and-drop-region'
is the symbol for that modifier, then the text is always copied. The drop
location must be within the text area of an Emacs window."
(interactive "e")
(require 'tooltip)
(let ((start (region-beginning))
(end (region-end))
(point (point))
(buffer (current-buffer))
(source-window (selected-window))
event-handler
release-point
value-selection)
(track-mouse
;; When event was click instead of drag, skip loop