unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Jan Djärv" <jan.h.d@swipnet.se>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Adrian Robert <Adrian.B.Robert@gmail.com>, emacs-devel@gnu.org
Subject: Re: Mysterious differences in nsselect.m
Date: Tue, 21 Oct 2014 21:01:29 +0200	[thread overview]
Message-ID: <8FCE673E-3441-4D58-B427-998425406BD5@swipnet.se> (raw)
In-Reply-To: <jwv38ahlg2f.fsf-monnier+emacs@gnu.org>

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	other threads:[~2014-10-21 19:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-18 22:16 Mysterious differences in nsselect.m Stefan Monnier
2014-10-19  8:13 ` Jan Djärv
2014-10-19  9:59   ` Adrian Robert
2014-10-21 13:28   ` Stefan Monnier
2014-10-21 19:01     ` Jan Djärv [this message]

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=8FCE673E-3441-4D58-B427-998425406BD5@swipnet.se \
    --to=jan.h.d@swipnet.se \
    --cc=Adrian.B.Robert@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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).