emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drag and drop patch for X, please review.


From: Richard Stallman
Subject: Re: Drag and drop patch for X, please review.
Date: Thu, 22 Jan 2004 14:00:44 -0500

    > Which of these messages causes the Lisp-level drag-n-drop event?
    > I would guess it is the last message that does so.

    No, they all do.  That is, the messages the source sends: XdndEnter,
    XdndPosition, XdndPosition and XdndLeave (mouse moved away from Emacs
    or drop aborted).  The replies are sent from lisp with 
    x-send-client-message.

If all of them turn into Lisp events, then all of them could be customized
to depend on any aspect of the environment.  But why bother to make
a Lisp event for anything except the actual drop?  I can see that is
more flexible, but it could be much slower.

    > The time to look up the proper key binding is when the drop *ends*,
    > and only then.  It is not hard to get the key bindings for a given
    > place on the Emacs frame.  We do that for mouse clicks, we could do it
    > here too.

    That is too late.  We must know if we are going to accept the drop 
    before
    it ends.

I think it is acceptable to always accept the drop, when the pointer
is on a buffer text area.

However, since you've implemented Lisp events for all the messages
in the drag-n-drop protocol, I guess it ought to be easy enough
to make the Lisp code that handles the event run some function
provided by the major mode in order to decide whether a drop
is acceptable at a given point.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]