* bug#73830: using one expression to make multiple X selections
[not found] <4a2f64e201951a525ab56fab135c4777@riseup.net>
@ 2024-10-15 18:04 ` libreville
2024-10-16 19:42 ` libreville
0 siblings, 1 reply; 6+ messages in thread
From: libreville @ 2024-10-15 18:04 UTC (permalink / raw)
To: 73830
My apologies, that should of course have read "sleep-for 1", not
"wait-for 1".
On 2024-10-15 13:59, libreville wrote:
>
> (progn
> (gui-set-selection 'CLIPBOARD "3")
> (wait-for 1)
> (gui-set-selection 'CLIPBOARD "4"))
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#73830: using one expression to make multiple X selections
2024-10-15 18:04 ` bug#73830: using one expression to make multiple X selections libreville
@ 2024-10-16 19:42 ` libreville
2024-10-16 21:54 ` Jeremy Bryant via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-16 23:49 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 2 replies; 6+ messages in thread
From: libreville @ 2024-10-16 19:42 UTC (permalink / raw)
To: 73830
Hi there,
going by the list archive, my first email didn't go through. Here it is
again in case that's right:
Hello,
I stumbled on this while trying to elisp a few things into my X
clipboard manager. Evaluating these two expressions in turn:
(gui-set-selection 'CLIPBOARD "1")
(gui-set-selection 'CLIPBOARD "2")
results in both "1" and "2" being saved to the clipboard history.
However:
(progn
(gui-set-selection 'CLIPBOARD "1")
(gui-set-selection 'CLIPBOARD "2"))
results in "2" being saved to the clipboard history but, contrary to
what I would expect, not "1". On the other hand this:
(progn
(gui-set-selection 'CLIPBOARD "3")
(sleep-for 1)
(gui-set-selection 'CLIPBOARD "4"))
gets both "3" and "4" onto the clipboard (history). I get similar
results with kill-new in place of gui-set-selection 'CLIBOARD and with
other ways of grouping the two kills into one expression.
Why does waiting work around the problem?
Tested with both copyq and clipman / Emacs 28.2 / Xfce.
Best,
liv.
On 2024-10-15 18:04, libreville wrote:
> My apologies, that should of course have read "sleep-for 1", not
> "wait-for 1".
>
> On 2024-10-15 13:59, libreville wrote:
>
>>
>> (progn
>> (gui-set-selection 'CLIPBOARD "3")
>> (wait-for 1)
>> (gui-set-selection 'CLIPBOARD "4"))
>>
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#73830: using one expression to make multiple X selections
2024-10-16 19:42 ` libreville
@ 2024-10-16 21:54 ` Jeremy Bryant via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-16 23:49 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
1 sibling, 0 replies; 6+ messages in thread
From: Jeremy Bryant via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-10-16 21:54 UTC (permalink / raw)
To: libreville; +Cc: 73830
libreville <libreville@riseup.net> writes:
>
> Why does waiting work around the problem?
>
> Tested with both copyq and clipman / Emacs 28.2 / Xfce.
Have you tried with a more recent version of Emacs?
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#73830: using one expression to make multiple X selections
2024-10-16 19:42 ` libreville
2024-10-16 21:54 ` Jeremy Bryant via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-10-16 23:49 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-17 11:29 ` snooze button
1 sibling, 1 reply; 6+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-10-16 23:49 UTC (permalink / raw)
To: libreville; +Cc: 73830
libreville <libreville@riseup.net> writes:
> Hi there,
>
> going by the list archive, my first email didn't go through. Here it is
> again in case that's right:
>
>
> Hello,
>
> I stumbled on this while trying to elisp a few things into my X
> clipboard manager. Evaluating these two expressions in turn:
>
> (gui-set-selection 'CLIPBOARD "1")
> (gui-set-selection 'CLIPBOARD "2")
>
> results in both "1" and "2" being saved to the clipboard history.
> However:
>
> (progn
> (gui-set-selection 'CLIPBOARD "1")
> (gui-set-selection 'CLIPBOARD "2"))
>
> results in "2" being saved to the clipboard history but, contrary to
> what I would expect, not "1". On the other hand this:
>
> (progn
> (gui-set-selection 'CLIPBOARD "3")
> (sleep-for 1)
> (gui-set-selection 'CLIPBOARD "4"))
>
> gets both "3" and "4" onto the clipboard (history). I get similar
> results with kill-new in place of gui-set-selection 'CLIBOARD and with
> other ways of grouping the two kills into one expression.
>
> Why does waiting work around the problem?
Because it takes time for X clipboard managers to respond to selection
ownership changes and to complete reading from other programs'
selections.
Not a bug, sorry.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#73830: using one expression to make multiple X selections
2024-10-16 23:49 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-10-17 11:29 ` snooze button
2024-10-27 10:38 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: snooze button @ 2024-10-17 11:29 UTC (permalink / raw)
To: Po Lu; +Cc: 73830
[-- Attachment #1: Type: text/plain, Size: 595 bytes --]
On 17/10/2024 1:49, Po Lu wrote:
>> Why does waiting work around the problem?
> Because it takes time for X clipboard managers to respond to selection
> ownership changes and to complete reading from other programs'
> selections.
>
> Not a bug, sorry.
Thanks for the explanation, and no need to apologise!
For those of us wanting to read more on this, I dug around a bit and
found some explanations
here https://github.com/jhunt/xclipd,
here https://jameshunt.us/writings/x11-clipboard-management-foibles/,
and here
https://www.uninformativ.de/blog/postings/2017-04-02/0/POSTING-en.html
[-- Attachment #2: Type: text/html, Size: 1501 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#73830: using one expression to make multiple X selections
2024-10-17 11:29 ` snooze button
@ 2024-10-27 10:38 ` Eli Zaretskii
0 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2024-10-27 10:38 UTC (permalink / raw)
To: snooze button; +Cc: luangruo, 73830-done
> Cc: 73830@debbugs.gnu.org
> Date: Thu, 17 Oct 2024 13:29:38 +0200
> From: snooze button <snooze-button@riseup.net>
>
> On 17/10/2024 1:49, Po Lu wrote:
>
> Why does waiting work around the problem?
>
> Because it takes time for X clipboard managers to respond to selection
> ownership changes and to complete reading from other programs'
> selections.
>
> Not a bug, sorry.
>
> Thanks for the explanation, and no need to apologise!
>
> For those of us wanting to read more on this, I dug around a bit and found some explanations
>
> here https://github.com/jhunt/xclipd,
>
> here https://jameshunt.us/writings/x11-clipboard-management-foibles/,
>
> and here https://www.uninformativ.de/blog/postings/2017-04-02/0/POSTING-en.html
It sounds like there's nothing we can do here, so I'm now closing this
bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-10-27 10:38 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <4a2f64e201951a525ab56fab135c4777@riseup.net>
2024-10-15 18:04 ` bug#73830: using one expression to make multiple X selections libreville
2024-10-16 19:42 ` libreville
2024-10-16 21:54 ` Jeremy Bryant via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-16 23:49 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-17 11:29 ` snooze button
2024-10-27 10:38 ` Eli Zaretskii
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.