unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* dired-mouse-drag-files
@ 2022-03-25 12:56 Eli Zaretskii
  2022-03-25 14:06 ` dired-mouse-drag-files Po Lu
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2022-03-25 12:56 UTC (permalink / raw)
  To: Po Lu; +Cc: emacs-devel

This feature is not universally available, but is doc string doesn't
say so (the manual does).

Moreover, setting the variable non-nil unconditionally shows a tooltip
on file names in Dired buffers saying that the user can drag the file
to another program, but that is only so on X; on other platforms it's
a misleading tooltip.

As an aside, changing the value of the variable doesn't affect the
Dired buffers that already exist, only those created afterwards, which
I think is not the best UX.

Can you please fix these issues?

Thanks.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: dired-mouse-drag-files
  2022-03-25 12:56 dired-mouse-drag-files Eli Zaretskii
@ 2022-03-25 14:06 ` Po Lu
  2022-03-25 14:16   ` dired-mouse-drag-files Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Po Lu @ 2022-03-25 14:06 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

> This feature is not universally available, but is doc string doesn't
> say so (the manual does).
>
> Moreover, setting the variable non-nil unconditionally shows a tooltip
> on file names in Dired buffers saying that the user can drag the file
> to another program, but that is only so on X; on other platforms it's
> a misleading tooltip.
>
> As an aside, changing the value of the variable doesn't affect the
> Dired buffers that already exist, only those created afterwards, which
> I think is not the best UX.
>
> Can you please fix these issues?

I will work on them ASAP, tho the idea is to have it universally
available by the time Emacs 29 is released.  (If nobody volunteers in a
week, I will try to find the time to implement it on NS.)

Thanks.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: dired-mouse-drag-files
  2022-03-25 14:06 ` dired-mouse-drag-files Po Lu
@ 2022-03-25 14:16   ` Eli Zaretskii
  2022-03-26  0:35     ` dired-mouse-drag-files Po Lu
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2022-03-25 14:16 UTC (permalink / raw)
  To: Po Lu; +Cc: emacs-devel

> From: Po Lu <luangruo@yahoo.com>
> Cc: emacs-devel@gnu.org
> Date: Fri, 25 Mar 2022 22:06:54 +0800
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > This feature is not universally available, but is doc string doesn't
> > say so (the manual does).
> >
> > Moreover, setting the variable non-nil unconditionally shows a tooltip
> > on file names in Dired buffers saying that the user can drag the file
> > to another program, but that is only so on X; on other platforms it's
> > a misleading tooltip.
> >
> > As an aside, changing the value of the variable doesn't affect the
> > Dired buffers that already exist, only those created afterwards, which
> > I think is not the best UX.
> >
> > Can you please fix these issues?
> 
> I will work on them ASAP, tho the idea is to have it universally
> available by the time Emacs 29 is released.  (If nobody volunteers in a
> week, I will try to find the time to implement it on NS.)

At least for MS-Windows, I don't think this is a feasible goal, though
I'd be happy to be proven wrong.  I think we only support dragging
file names there, and only _into_ Emacs.

So some systems will probably never support this.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: dired-mouse-drag-files
  2022-03-25 14:16   ` dired-mouse-drag-files Eli Zaretskii
@ 2022-03-26  0:35     ` Po Lu
  0 siblings, 0 replies; 5+ messages in thread
From: Po Lu @ 2022-03-26  0:35 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

> At least for MS-Windows, I don't think this is a feasible goal, though
> I'd be happy to be proven wrong.  I think we only support dragging
> file names there, and only _into_ Emacs.
>
> So some systems will probably never support this.

I see, too bad.  Thanks for explaining.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: dired-mouse-drag-files
       [not found] <87tub2t2gu.fsf@uibk.ac.at>
@ 2022-04-10  1:04 ` Po Lu
  0 siblings, 0 replies; 5+ messages in thread
From: Po Lu @ 2022-04-10  1:04 UTC (permalink / raw)
  To: Justus-dev; +Cc: emacs-devel

[You forgot to copy in the list, I did that for you this time.]

Justus-dev@Piater.name writes:

> What about Wayland?
>
> I don't think this should be too hard to implement (famous last words).
> Perhaps I'll give it a shot myself. Any advice?
>
> Best,
> Justus

It shouldn't be too hard, thanks!  First, rewrite pgtkselect.c to use
the low-level GDK selections API (the code translates very neatly from
X), since the GTK clipboard API is not very suitable for Emacs
drag-and-drop.  The file that needs work is pgtkselect.c.

Then, implement `x-begin-drag' using the GDK drag-and-drop system.  I
suggest running a nested event loop until the drop completes.

Most of the low level functions there are not much higher level than the
functions `x_dnd_get_target_window' and `x_set_dnd_targets' on X.

This documentation should be fairly helpful:

https://developer-old.gnome.org/gdk3/stable/gdk3-Drag-and-Drop.html
https://developer-old.gnome.org/gdk3/stable/gdk3-Selections.html



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-04-10  1:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-25 12:56 dired-mouse-drag-files Eli Zaretskii
2022-03-25 14:06 ` dired-mouse-drag-files Po Lu
2022-03-25 14:16   ` dired-mouse-drag-files Eli Zaretskii
2022-03-26  0:35     ` dired-mouse-drag-files Po Lu
     [not found] <87tub2t2gu.fsf@uibk.ac.at>
2022-04-10  1:04 ` dired-mouse-drag-files Po Lu

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).