unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Spencer Baugh <sbaugh@janestreet.com>
To: Po Lu <luangruo@yahoo.com>
Cc: sbaugh@catern.com, 64423@debbugs.gnu.org
Subject: bug#64423: 29.0.92; save-interprogram-paste-before-kill doesn't prevent streaming large selections
Date: Wed, 05 Jul 2023 20:50:34 -0400	[thread overview]
Message-ID: <iery1jtj21x.fsf@janestreet.com> (raw)
In-Reply-To: <87ttuhnbil.fsf@yahoo.com> (Po Lu's message of "Thu, 06 Jul 2023 08:12:34 +0800")

Po Lu <luangruo@yahoo.com> writes:
> Spencer Baugh <sbaugh@janestreet.com> writes:
>
>> The insignificant problem is Emacs potentially getting the wrong
>> selection if we interrupt an incremental selection transfer?
>
> Yes, when the user does so deliberately.
>
>> I'm confused, it seems like that contradicts what you said earlier.
>>
>> If interrupting an incremental selection transfer is an insignificant
>> problem, then there should be no obstacle to automatically interrupting
>> the incremental selection transfer if it's too large.
>
> Interrupting incremental selection transfer _automatically_ is a
> significant problem, because Emacs cannot judge if the selection owner
> is functioning normally.  If the user quits, he has determined that it
> is not, so it is acceptable for Emacs to terminate the transfer there
> and then without considering the consequences to the selection owner and
> future selection transfers.

And yet, we do this today: that's what x-selection-timeout does.  Should
we remove that functionality?

I assume we should not remove that functionality.  So if automatically
interrupting a selection transfer if the owner takes too long is fine,
what's the issue with interrupting it if the owner sends too much data?
Both situations are usually the result of buggy X clients, both
situations would break Emacs if not handled, both situations are
standard considerations for robustness in any network protocol.

>> OK, so we are doing at least as good as other toolkits when it comes to
>> retrieving the selection.  But at my site the UX is still worse than
>> other applications because save-interprogram-paste-before-kill makes
>> taking ownership of the selection block, while for other applications it
>> does not.  And save-interprogram-paste-before-kill is a useful feature,
>> and I want to make it work.
>
> Other programs do not have a kill ring at all.

Yes.  And Emacs does, so it needs to do more work than other
applications to make to work correctly.

>> Yes.  x-selection-timeout is configured to 5 seconds for every user at
>> my site.  They still find it unexpected and complain when killing takes
>> that long.
>
> But do they complain about inserting the contents of the selection
> also taking too long?  Or when a program other than Emacs blocks for
> more than 5 seconds upon Button2 or Ctrl+V?

No, because then they are performing an operation which it makes sense
might block: pasting data copied from another application.  In that
situation, they are fine with it.

> Anyway, this points to a problem with an X client at your site and not a
> problem with Emacs.

No, there is no problem with other X clients.  It is simply that users
expect delays when yanking and don't expect delays when killing.

So, Emacs should be able to configure a different x-selection-timeout
when running the save-interprogram-paste-before-kill logic, to reflect
the fact that users have these different expectations for yanking and
killing.  I don't see why this is objectionable.





  reply	other threads:[~2023-07-06  0:50 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-02 14:13 bug#64423: 29.0.92; save-interprogram-paste-before-kill doesn't prevent streaming large selections sbaugh
2023-07-03  2:35 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-03 12:46   ` Spencer Baugh
2023-07-04  0:40     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-04  1:45       ` sbaugh
2023-07-04  3:58         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-04 11:46           ` sbaugh
2023-07-04 13:19             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-04 14:46               ` sbaugh
2023-07-04 16:18                 ` Eli Zaretskii
2023-07-04 16:32                   ` Ihor Radchenko
2023-07-04 16:41                     ` Eli Zaretskii
2023-07-04 16:48                   ` sbaugh
2023-07-04 17:02                     ` Eli Zaretskii
2023-07-04 17:14                       ` Ihor Radchenko
2023-07-04 17:30                         ` Eli Zaretskii
2023-07-04 17:35                           ` Ihor Radchenko
2023-07-05  0:30                           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-05  2:29                             ` Eli Zaretskii
2023-07-05  3:51                               ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-05 11:27                                 ` Eli Zaretskii
2023-07-05  0:19                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-05 13:59                   ` Spencer Baugh
2023-07-06  0:12                     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-06  0:50                       ` Spencer Baugh [this message]
2023-07-06  1:59                         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-08 16:39             ` sbaugh
2023-07-08 16:48               ` Eli Zaretskii
2023-07-08 17:07                 ` Spencer Baugh
2023-07-08 17:49                   ` Eli Zaretskii
2023-07-09  0:39                     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-09  6:10                       ` Eli Zaretskii
2023-07-09  6:12                         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-09  6:46                           ` Eli Zaretskii
2023-07-12 19:18                             ` sbaugh
2023-07-13  0:32                               ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-13  4:48                               ` Eli Zaretskii
2023-07-13 16:17                                 ` sbaugh
2023-07-13 18:39                                   ` Eli Zaretskii
2023-07-13 22:39                                     ` sbaugh
2023-07-15  8:31                                       ` Eli Zaretskii
2023-07-15  8:33                                         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-07-15  9:01                                           ` Eli Zaretskii
2023-07-15  9:35                                             ` Eli Zaretskii
2023-07-15 17:38                                               ` sbaugh
2023-07-15 19:12                                                 ` Eli Zaretskii
2023-07-15 21:00                                                   ` Spencer Baugh
2023-07-17 16:43 ` Mattias Engdegård
2023-08-03 15:53 ` Spencer Baugh

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=iery1jtj21x.fsf@janestreet.com \
    --to=sbaugh@janestreet.com \
    --cc=64423@debbugs.gnu.org \
    --cc=luangruo@yahoo.com \
    --cc=sbaugh@catern.com \
    /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).