From: martin rudalics <rudalics@gmx.at>
To: Tak Kunihiro <tak.kunihiro@gmail.com>
Cc: eliz@gnu.org, agrambot@gmail.com, emacs-devel@gnu.org
Subject: Re: mouse-drag-and-drop-region
Date: Tue, 05 Dec 2017 09:53:45 +0100 [thread overview]
Message-ID: <5A265E99.8030908@gmx.at> (raw)
In-Reply-To: <20171205.135713.548952609807146453.tak.kunihiro@gmail.com>
> 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.
Thanks. One issue I'm yet uncertain about: This part
(if (and mouse-drag-and-drop-region-show-tooltip
(not drag-but-negligible)
(not point-to-paste-read-only)
cursor-in-text-area)
(tooltip-show text-tooltip)
(tooltip-hide))
means that the tooltip text does not appear as long as the mouse is
within the initial region (because there drag-but-negligible is non-nil,
I presume). This comes somewhat unexpected - I'd expect the initial
feedback via a tooltip to appear right away as soon as I start dragging.
Personally, I'd even show the tooltip text when the mouse is temporarily
out of the frame and leave it to the cursor to indicate whether a drop
is possible at that position. But this is a personal preference - I'll
check in whatever you prefer.
> This
> time, I attach a patch as a separated file.
Highly appreciated. Applies without any problems now.
>> Please consider also the following four bindings in `mouse-drag-track':
>>
>> (echo-keystrokes 0)
I remember that occasionally during dragging some thing (I don't
remember whether it does happen with the region) I see in the echo area
text like down-mouse-1 or the like appear. If you see that too, this
binding might be useful to suppress such feedback.
>>
>> (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)
Both of theses might have impact when you move the cursor to a position
that is only partially visible at some border of the window. You might
have to experiment, for example, by starting with a horizontally
scrolled window or a window with point near the bottom to see the
impact.
>> (old-track-mouse track-mouse)
This should handle the case where `mouse-drag-and-drop-region'
intercepts an already ongoing track operation. I have no idea whether
such a thing can happen in practice.
>> 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?
I indicated above whether and why these may be useful. We probably
should just wait until real problems show up in this regard.
> 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.
OK.
>> 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.
Never using dired I have no idea. But ISTR that most two-pane file
managers (aka Norton Commander clones) have some mouse support to do
that. So it might be a good idea to think about how to incorporate such
support right now.
One issue with dired and customization buffers we probably have to
resolve is the following: When `inhibit-read-only' is non-nil, we should
allow cutting/pasting from/into read-only buffers or text. I've never
looked into this matter. Maybe you can find some code which does handle
that so we can steal it.
martin
next prev parent reply other threads:[~2017-12-05 8:53 UTC|newest]
Thread overview: 89+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-14 9:54 mouse-drag-and-drop-region martin rudalics
2017-11-14 17:01 ` mouse-drag-and-drop-region Eli Zaretskii
2017-11-14 18:29 ` mouse-drag-and-drop-region martin rudalics
2017-11-14 20:17 ` mouse-drag-and-drop-region Alex
2017-11-15 9:22 ` mouse-drag-and-drop-region martin rudalics
2017-11-15 18:22 ` mouse-drag-and-drop-region Eli Zaretskii
2017-11-15 18:50 ` mouse-drag-and-drop-region martin rudalics
2017-11-15 20:01 ` mouse-drag-and-drop-region Eli Zaretskii
2017-11-16 9:04 ` mouse-drag-and-drop-region martin rudalics
2017-11-15 19:46 ` mouse-drag-and-drop-region Alex
2017-11-15 20:15 ` mouse-drag-and-drop-region Eli Zaretskii
2017-11-15 22:03 ` mouse-drag-and-drop-region Alex
2017-11-16 15:54 ` mouse-drag-and-drop-region Eli Zaretskii
2017-11-17 6:33 ` mouse-drag-and-drop-region Alex
2017-11-17 7:33 ` mouse-drag-and-drop-region Eli Zaretskii
2017-11-17 15:58 ` mouse-drag-and-drop-region Stefan Monnier
2017-11-17 16:39 ` mouse-drag-and-drop-region Eli Zaretskii
2017-11-17 22:44 ` mouse-drag-and-drop-region Stefan Monnier
2017-11-18 7:54 ` mouse-drag-and-drop-region Eli Zaretskii
2017-11-18 14:36 ` mouse-drag-and-drop-region Stefan Monnier
2017-11-18 15:04 ` mouse-drag-and-drop-region Eli Zaretskii
2017-11-18 15:49 ` mouse-drag-and-drop-region Stefan Monnier
2017-11-18 6:48 ` mouse-drag-and-drop-region Alex
2017-11-18 9:07 ` mouse-drag-and-drop-region Eli Zaretskii
2017-11-18 21:58 ` mouse-drag-and-drop-region Alex
2017-11-19 15:27 ` mouse-drag-and-drop-region Eli Zaretskii
2017-11-17 8:53 ` mouse-drag-and-drop-region martin rudalics
2017-11-18 6:49 ` mouse-drag-and-drop-region Alex
2017-11-16 9:04 ` mouse-drag-and-drop-region martin rudalics
2017-11-17 6:02 ` mouse-drag-and-drop-region Alex
2017-11-17 8:53 ` mouse-drag-and-drop-region martin rudalics
2017-11-15 20:22 ` mouse-drag-and-drop-region Eli Zaretskii
2017-11-16 0:28 ` mouse-drag-and-drop-region Tak Kunihiro
2017-11-16 9:11 ` mouse-drag-and-drop-region martin rudalics
2017-11-20 13:29 ` mouse-drag-and-drop-region Tak Kunihiro
2017-11-20 16:03 ` mouse-drag-and-drop-region Drew Adams
2017-11-20 16:09 ` mouse-drag-and-drop-region Alan Schmitt
2017-11-20 17:34 ` mouse-drag-and-drop-region Eli Zaretskii
2017-11-20 18:17 ` mouse-drag-and-drop-region Paul Eggert
2017-11-21 9:24 ` mouse-drag-and-drop-region martin rudalics
2017-11-21 13:09 ` mouse-drag-and-drop-region Stefan Monnier
2017-11-21 14:05 ` mouse-drag-and-drop-region martin rudalics
2017-11-21 19:07 ` mouse-drag-and-drop-region Stefan Monnier
2017-11-22 8:26 ` mouse-drag-and-drop-region martin rudalics
2017-11-22 21:20 ` mouse-drag-and-drop-region Stefan Monnier
2017-11-23 7:46 ` mouse-drag-and-drop-region martin rudalics
2017-11-23 14:00 ` mouse-drag-and-drop-region Stefan Monnier
2017-11-23 16:09 ` mouse-drag-and-drop-region Eli Zaretskii
2017-11-24 9:02 ` mouse-drag-and-drop-region martin rudalics
2017-11-24 9:19 ` mouse-drag-and-drop-region Eli Zaretskii
2017-11-24 9:41 ` mouse-drag-and-drop-region martin rudalics
2017-11-24 13:25 ` mouse-drag-and-drop-region Stefan Monnier
2017-11-26 10:24 ` mouse-drag-and-drop-region martin rudalics
2017-11-24 13:45 ` mouse-drag-and-drop-region Eli Zaretskii
2017-11-26 10:24 ` mouse-drag-and-drop-region martin rudalics
2017-11-26 15:54 ` mouse-drag-and-drop-region Eli Zaretskii
2017-11-27 8:48 ` mouse-drag-and-drop-region martin rudalics
2017-11-27 15:59 ` mouse-drag-and-drop-region Eli Zaretskii
2017-11-21 15:45 ` mouse-drag-and-drop-region Eli Zaretskii
2017-11-22 8:22 ` mouse-drag-and-drop-region martin rudalics
2017-11-21 18:52 ` mouse-drag-and-drop-region Robert Weiner
2017-11-22 8:22 ` mouse-drag-and-drop-region martin rudalics
2017-11-23 23:28 ` mouse-drag-and-drop-region Tak Kunihiro
2017-11-24 9:02 ` mouse-drag-and-drop-region martin rudalics
2017-11-27 13:11 ` mouse-drag-and-drop-region Tak Kunihiro
2017-11-28 8:50 ` mouse-drag-and-drop-region martin rudalics
2017-12-01 14:16 ` mouse-drag-and-drop-region Tak Kunihiro
2017-12-02 10:16 ` mouse-drag-and-drop-region martin rudalics
2017-12-03 10:06 ` mouse-drag-and-drop-region martin rudalics
2017-12-03 13:36 ` mouse-drag-and-drop-region martin rudalics
2017-12-05 4:57 ` mouse-drag-and-drop-region Tak Kunihiro
2017-12-05 8:53 ` martin rudalics [this message]
2017-12-06 9:29 ` mouse-drag-and-drop-region Tak Kunihiro
2017-12-07 9:26 ` mouse-drag-and-drop-region martin rudalics
2017-12-07 21:45 ` mouse-drag-and-drop-region Tak Kunihiro
2017-12-08 10:12 ` mouse-drag-and-drop-region martin rudalics
2017-12-08 16:14 ` mouse-drag-and-drop-region Robert Weiner
2017-12-09 10:35 ` mouse-drag-and-drop-region martin rudalics
2017-12-14 23:14 ` mouse-drag-and-drop-region Tak Kunihiro
2017-12-15 8:50 ` mouse-drag-and-drop-region martin rudalics
2017-12-15 13:25 ` mouse-drag-and-drop-region martin rudalics
2017-12-16 2:07 ` mouse-drag-and-drop-region Tak Kunihiro
2017-12-16 9:42 ` mouse-drag-and-drop-region martin rudalics
2017-12-17 4:40 ` mouse-drag-and-drop-region Tak Kunihiro
2017-12-17 10:44 ` mouse-drag-and-drop-region martin rudalics
2017-12-21 1:36 ` mouse-drag-and-drop-region Tak Kunihiro
2017-12-22 8:43 ` mouse-drag-and-drop-region martin rudalics
2017-12-22 9:25 ` mouse-drag-and-drop-region Eli Zaretskii
2017-12-22 17:57 ` mouse-drag-and-drop-region martin rudalics
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=5A265E99.8030908@gmx.at \
--to=rudalics@gmx.at \
--cc=agrambot@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=tak.kunihiro@gmail.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).