emacs-devel
[Top][All Lists]
Advanced

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

Re: Mysterious differences in nsselect.m


From: Jan Djärv
Subject: Re: Mysterious differences in nsselect.m
Date: Tue, 21 Oct 2014 21:01:29 +0200

Hello.

> What I mean is: if you push to the clipboard a string "hello" and then
> a filename "/a/b", are they still both in there, or does the second
> replace the first?

If they are different types, they both are in there.  The idea is that the 
receiver can request different formats according to his needs, i.e. plain text, 
HTML, GIF.  There is also a protocol so the owner can be notified about what 
the receiver wants and then produce that format on the fly.  But Emacs only 
pushes strings, so they are replaced.

> 
> If the second replaces the first then the loop in
> ns_string_to_pasteboard_internal makes no sense, but if they both stay
> in there, then it basically means we have several clipboards, so we may
> miss one application's clipboard data simply because we don't request
> the right type.

If we where copying a filename for example, we would in that loop push a 
filename and a string.  String makes sense for a text editor, filename more for 
a filebrowser.
But I think it was intended for "future use".

        Jan D.




reply via email to

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