emacs-devel
[Top][All Lists]
Advanced

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

Re: mouse-drag-and-drop-region


From: martin rudalics
Subject: Re: mouse-drag-and-drop-region
Date: Sat, 02 Dec 2017 11:16:57 +0100

> I re-re-revised mouse-drag-and-drop-region.  I'm sending replay to
> https://lists.gnu.org/archive/html/emacs-devel/2017-11/msg00663.html,
> ChangeLog, and patch.

Thank you.  Still, please consider sending patches as attachments so
applying them is simpler.

> OK.  A new variable `mouse-drag-and-drop-region-show-cursor' is
> defined.

Please note that the first line of a doc string may contain complete
sentences only.  You could write something like

(defvar mouse-drag-and-drop-region-show-cursor t
  "If non-nil, move point with mouse cursor during dragging.
In addition, highlight the original region with
`mouse-drag-and-drop-region-face'.")

> Now the code checks if cursor is on the text area.  If not, it restore
> the initial region.  I'm not sure to tell "Drop failed" is a good
> idea.  When an user wants to undo the drag, he may drag to toolbar.
> Restore the initial region is what is expected.  The code for now does
> not tell the message.

OK.  But the code fails to poperly restore the previous cursor type when
the drop fails.  For example when with emacs -Q I evaluate

(progn
  (setq mouse-drag-and-drop-region t)
  (setq mouse-drag-and-drop-region-show-cursor t)
  (display-buffer "*Messages*"))

mark some text in the *scratch* buffer and accidentally drag-and-drop it
on the mode line of the *Messages* buffer, the cursor in the *Messages*
buffer disappears.  I think you have to remember the old cursor type and
make sure it gets restored whatever happens.

martin



reply via email to

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