From: Jason Rumney <jasonr@gnu.org>
Cc: gnu-emacs-bug@moderators.isc.org, ihs_4664@yahoo.com,
emacs-devel@gnu.org
Subject: Re: [ihs_4664@yahoo.com: drag-n-drop can't be customized by the target buffer]
Date: Tue, 31 Aug 2004 13:25:43 +0100 [thread overview]
Message-ID: <41346E47.4000405@gnu.org> (raw)
In-Reply-To: <41346A3F.8090403@swipnet.se>
Jan D. wrote:
> It is not that simple, since drag and drop may involve text, pictures,
> URLs and not just only files. But if you just want files that exist,
> the current CVS version of Emacs allows you to do this when using X
> (i.e. not Windows or Mac OS X):
>
> (set (make-local-variable 'x-dnd-protocol-alist)
> '(("^file:" . my-dnd-fun)))
>
> (defun my-dnd-fun (url action)
> (let ((file (x-dnd-get-local-file-name url t)))
> (vm-mime-attach-file file (or (vm-mime-default-type-from-filename
> file)
> "application/octet-stream"))))
>
This works on Windows too, since the DND implementation has been changed
to call x-dnd-handle-one-url for consistency.
prev parent reply other threads:[~2004-08-31 12:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1C16NF-0000dx-6Y@fencepost.gnu.org>
2004-08-31 12:08 ` [ihs_4664@yahoo.com: drag-n-drop can't be customized by the target buffer] Jan D.
[not found] ` <41346A3F.8090403@swipnet.se>
2004-08-31 12:25 ` Jason Rumney [this message]
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=41346E47.4000405@gnu.org \
--to=jasonr@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=gnu-emacs-bug@moderators.isc.org \
--cc=ihs_4664@yahoo.com \
/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).