emacs-devel
[Top][All Lists]
Advanced

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

Re: master 99c637499e: Only apply last change to the clipboard


From: Po Lu
Subject: Re: master 99c637499e: Only apply last change to the clipboard
Date: Wed, 02 Feb 2022 21:51:26 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux)

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.


reply via email to

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