From 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 7 Apr 2024 13:41:34 -0500 Subject: new repository --- devdocs/elisp/drag-and-drop.html | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 devdocs/elisp/drag-and-drop.html (limited to 'devdocs/elisp/drag-and-drop.html') diff --git a/devdocs/elisp/drag-and-drop.html b/devdocs/elisp/drag-and-drop.html new file mode 100644 index 00000000..2f69c6f4 --- /dev/null +++ b/devdocs/elisp/drag-and-drop.html @@ -0,0 +1,6 @@ +

Drag and Drop

When a user drags something from another application over Emacs, that other application expects Emacs to tell it if Emacs can handle the data that is dragged. The variable x-dnd-test-function is used by Emacs to determine what to reply. The default value is x-dnd-default-test-function which accepts drops if the type of the data to be dropped is present in x-dnd-known-types. You can customize x-dnd-test-function and/or x-dnd-known-types if you want Emacs to accept or reject drops based on some other criteria.

If you want to change the way Emacs handles drop of different types or add a new type, customize x-dnd-types-alist. This requires detailed knowledge of what types other applications use for drag and drop.

When an URL is dropped on Emacs it may be a file, but it may also be another URL type (https, etc.). Emacs first checks dnd-protocol-alist to determine what to do with the URL. If there is no match there, Emacs looks for a match in browse-url-handlers and browse-url-default-handlers. If still no match has been found, the text for the URL is inserted. If you want to alter Emacs behavior, you can customize these variables.

+

+ Copyright © 1990-1996, 1998-2022 Free Software Foundation, Inc.
Licensed under the GNU GPL license.
+ https://www.gnu.org/software/emacs/manual/html_node/elisp/Drag-and-Drop.html +

+
-- cgit v1.2.3