bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#12354: 24.2; garbage inserted at the beginning of the buffer even wh


From: Vincent Lefevre
Subject: bug#12354: 24.2; garbage inserted at the beginning of the buffer even when xterm-extra-capabilities is t
Date: Mon, 29 Jun 2015 15:47:04 +0200
User-agent: Mutt/1.5.23-6455-vl-r76280 (2015-06-26)

On 2015-06-29 09:12:01 -0400, Stefan Monnier wrote:
> > In fact, reportBackground also yields the garbage problem.
> > So, there's a bug here:
> 
> >     (when (memq 'reportBackground xterm-extra-capabilities)
> >       (xterm--query "\e]11;?\e\\"
> >                     '(("\e]11;" .  xterm--report-background-handler))))
> 
> > If I understand correctly, there's a timeout here, but since the
> > feature is claimed to be supported, the timeout should be removed.
> 
> The timeout is present because we prefer having garbage in those
> (presumably rare) cases where the terminal answers too late, over having
> Emacs hang forever (tho it's not a hard-hang) when the terminal doesn't
> understand the request.

Won't C-g have any effect? In such a case, the user could hit C-g
then modify his settings. Or see below.

Note that reaching the timeout isn't that rare. It happened recently
to someone else here, who didn't notice and committed his changes to
the repository, with the consequence that the file could no longer be
compiled. IMHO, with the default configuration (i.e. with "check"),
Emacs should make sure that files cannot be silently corrupted.

Perhaps, in case of timeout and some data have been written to the
buffer before a cursor move, Emacs should warn about this when the
user saves the buffer (or perhaps earlier). When this happens, there
are two possibilities:

1. There is indeed garbage because the terminal was slow to respond,
   and the user removes this garbage (and he may want to increase the
   timeout value, in particular if this occurs too often).

2. No garbage, the terminal didn't respond, in which case the user may
   want to modify his configuration to avoid a timeout in all cases.

So, in either case, the warning would be beneficial to the user.

> You try the patch below, and set xterm-query-timeout to some value of
> your choosing (e.g. nil).

Thanks.

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)





reply via email to

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