> So I think that we should remember for each window on the involved frame > its start and point positions and restore them unless the window is the > one where the drop happened. I attached a patch for this which also > restores the cursor type of every window. The patch includes all your > latest changes (so it should apply against the repository version) and > is largely untested but should give you the idea what to do. Thank you. I think that by your revision, the problem was solved. I also revised code not to let user drop the text to minibuffer. This time, I attach a patch as a separated file. > Please consider also the following four bindings in `mouse-drag-track': > > (echo-keystrokes 0) > > (make-cursor-line-fully-visible nil) > > ;; Suppress automatic hscrolling, because that is a nuisance > ;; when setting point near the right fringe (but see below). > (auto-hscroll-mode-saved auto-hscroll-mode) > > (old-track-mouse track-mouse) > > Maybe they are useful for you as well (a lot of experience went into the > coding of that function). I wonder if this is beyond my skill. Could you revise this part? > Also please consider to restrict the size of the tooltip shown (think of > someone who wants to drag the entire text of a buffer). I think > `mouse-drag-and-drop-region-show-tooltip' should optionally allow to > specify a number giving the maximum length of the string which I would > divide into one half for the beginning of the text, one half for the end > and ellipses in between. It is a good idea. Now tooltip shows only substring. I think mouse-drag-and-drop-region-show-tooltip should be something like 256 by default. > Finally, please think of how to embed your function into other packages: > For example, how would a user drag file names from one dired buffer to > another in order to copy or move the associated files from one directory > to another? Can we accomodate an exit function to do the pasting job? It is a good idea. I suppose you mean dragging `file' when event-start is with 'dired-filename.