From: Po Lu <luangruo@yahoo.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: master 99c637499e: Only apply last change to the clipboard
Date: Wed, 02 Feb 2022 21:51:26 +0800 [thread overview]
Message-ID: <87zgn98jhd.fsf@yahoo.com> (raw)
In-Reply-To: <83bkzp77sw.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 02 Feb 2022 14:49:03 +0200")
Eli Zaretskii <eliz@gnu.org> writes:
>> Hmm, that means the result is not useful for `gui-selection-value'.
>> Would there be a way to implement that feature on MS-Windows?
>>
>> The simplest way to implement it would be to return `t' if Emacs stored
>> the text currently in the clipboard.
> What would be the purpose of that? What would you like to do with
> "ownership" of the clipboard data, and why?
That way, `gui-selection-value' can return nil if Emacs owns the
selection (per the doc string of `interprogram-paste-function') to avoid
fetching the selection in the common case where the user is yanking text
saved by Emacs.
> Emacs on Windows already tries internally to keep track of whether the
> stuff in the clipboard was put there by the current session, so I'm
> not sure why else would you need this.
See the doc string of `interprogram-paste-function':
If no other program has provided text to paste, the function should
return nil (in which case the caller, usually current-kill, should use
the top of the Emacs kill ring)
Thanks.
next prev parent reply other threads:[~2022-02-02 13:51 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <164368163944.24305.8528536193885928245@vcs2.savannah.gnu.org>
[not found] ` <20220201021359.C439EC40717@vcs2.savannah.gnu.org>
2022-02-01 5:20 ` master 99c637499e: Only apply last change to the clipboard Stefan Monnier
2022-02-01 5:24 ` Po Lu
2022-02-01 5:28 ` Po Lu
2022-02-01 14:59 ` Eli Zaretskii
2022-02-02 0:58 ` Po Lu
2022-02-02 3:32 ` Eli Zaretskii
2022-02-02 4:50 ` Po Lu
2022-02-02 12:49 ` Eli Zaretskii
2022-02-02 13:51 ` Po Lu [this message]
2022-02-02 14:44 ` Eli Zaretskii
2022-02-03 1:11 ` Po Lu
2022-02-03 4:01 ` Stefan Monnier
2022-02-03 7:48 ` Eli Zaretskii
2022-02-03 13:32 ` Stefan Monnier
2022-02-01 5:35 ` Stefan Monnier
2022-02-01 7:40 ` Po Lu
2022-02-01 13:41 ` Stefan Monnier
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=87zgn98jhd.fsf@yahoo.com \
--to=luangruo@yahoo.com \
--cc=eliz@gnu.org \
--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 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.