all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nick Helm <nick@tenpoint.co.nz>
To: Alan Third <alan@idiocy.org>
Cc: 30929@debbugs.gnu.org
Subject: bug#30929: 26.0.91; Text drag and drop does not work
Date: Sat, 28 Apr 2018 21:57:40 +1200	[thread overview]
Message-ID: <m2sh7fwt4b.fsf@tenpoint.co.nz> (raw)
In-Reply-To: <20180426204442.GB48707@breton.holly.idiocy.org> (Alan Third's message of "Thu, 26 Apr 2018 21:44:42 +0100")

On Fri, 27 Apr 2018 at 08:44:42 +1200, Alan Third wrote:

> On Thu, Apr 26, 2018 at 11:16:32AM +1200, Nick Helm wrote:
>> 
>> My main problem is the bewildering number of different data types that
>> have be to handled, in particular casting every possibility from 
>> ObjC -> C -> Lisp and interpreting them at the end.
>
> When we pass the data to lisp we *always* want it in plain
> text, so if it’s a file then the filepath, a URL is plaintext anyway,
> as is text.
>
> Anything else we can ignore or reject.

OK, this is helpful. I was thinking we'd need to handle all the uniform
type identifiers. For example, yes a NSURLPboardType is always text but
it might conform to public.text, public.plain-text,
public.utf8-plain-text, public.url, public.file-url, etc. But I guess
Emacs couldn't care less about all that. The current code simply
converts to a UTF8 string and sends it on, so I'll do that too.

>> I'd planned to highlight the target Emacs window with a border to
>> give the user better feedback about the drop location
>
> Do you need to use ns_focus and ns_unfocus? These select and unselect
> an NSRect you want to update. If you search through nsterm.m for
> ns_focus you’ll be able to find other places where we draw to the
> frame.

Thanks, I'll give that a try.

>> As far as I can tell, Emacs on free platforms doesn't support being the
>> dragging source (either to other apps or within Emacs itself), so
>> I didn't look at that option at all.
>
> If it works in GNUstep, and I think this must, then we’re home free as
> it counts as a Free platform.
>
>     http://wiki.gnustep.org/index.php/Drag_and_drop
>
> I’ve got a GNUstep build virtual machine, so I can make sure it all
> works OK.

If you could check and let me know, that would be great. I'll get the
destination stuff working properly first though.

> If you need any help, or don’t understand something, please feel free
> to ask.

Thanks, I really appreciate it.









  reply	other threads:[~2018-04-28  9:57 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-24 12:28 bug#30929: 26.0.91; Text drag and drop does not work Nick Helm
2018-03-25 11:57 ` Alan Third
2018-03-28  9:20   ` Nick Helm
2018-04-07 15:01     ` Alan Third
2018-04-09  1:51       ` Nick Helm
2018-04-10 19:38         ` Alan Third
2018-04-12  5:34           ` Nick Helm
2018-04-13 18:33             ` Alan Third
2018-04-24 12:42               ` Nick Helm
2018-04-24 18:19                 ` Alan Third
2018-04-25 23:16                   ` Nick Helm
2018-04-26 20:44                     ` Alan Third
2018-04-28  9:57                       ` Nick Helm [this message]
2019-01-05 10:27                         ` Alan Third
2019-01-05 13:05                           ` Nick Helm
2019-01-05 16:20                             ` Alan Third
2019-01-07 10:38                               ` Nick Helm
2019-01-10 19:23                                 ` Alan Third

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2sh7fwt4b.fsf@tenpoint.co.nz \
    --to=nick@tenpoint.co.nz \
    --cc=30929@debbugs.gnu.org \
    --cc=alan@idiocy.org \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.