From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vincent Lefevre Newsgroups: gmane.emacs.bugs 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 Message-ID: <20150629134704.GD32461@ypig.lip.ens-lyon.fr> References: <87txvcen36.fsf@xvii.vinc17.org> <20120905184424.GQ4846@xvii.vinc17.org> <20150527112723.GA23516@ypig.lip.ens-lyon.fr> <20150629023519.GA7712@xvii.vinc17.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1435585706 27099 80.91.229.3 (29 Jun 2015 13:48:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Jun 2015 13:48:26 +0000 (UTC) Cc: 12354@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jun 29 15:48:14 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Z9ZPw-0001b9-5t for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 Jun 2015 15:48:12 +0200 Original-Received: from localhost ([::1]:42350 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9ZPv-0004Ya-9g for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 Jun 2015 09:48:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45426) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9ZPq-0004YI-Jg for bug-gnu-emacs@gnu.org; Mon, 29 Jun 2015 09:48:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z9ZPn-0000Kl-6b for bug-gnu-emacs@gnu.org; Mon, 29 Jun 2015 09:48:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59559) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9ZPn-0000Kg-3W for bug-gnu-emacs@gnu.org; Mon, 29 Jun 2015 09:48:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Z9ZPm-0005yP-Mu for bug-gnu-emacs@gnu.org; Mon, 29 Jun 2015 09:48:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Vincent Lefevre Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 29 Jun 2015 13:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12354 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12354-submit@debbugs.gnu.org id=B12354.143558563222901 (code B ref 12354); Mon, 29 Jun 2015 13:48:02 +0000 Original-Received: (at 12354) by debbugs.gnu.org; 29 Jun 2015 13:47:12 +0000 Original-Received: from localhost ([127.0.0.1]:32772 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z9ZOx-0005xJ-Ha for submit@debbugs.gnu.org; Mon, 29 Jun 2015 09:47:11 -0400 Original-Received: from ypig.lip.ens-lyon.fr ([140.77.13.48]:59301) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z9ZOu-0005x8-AS for 12354@debbugs.gnu.org; Mon, 29 Jun 2015 09:47:09 -0400 Original-Received: from vlefevre by ypig.lip.ens-lyon.fr with local (Exim 4.86_RC4) (envelope-from ) id 1Z9ZOq-0004Do-4d; Mon, 29 Jun 2015 15:47:04 +0200 Content-Disposition: inline In-Reply-To: X-Mailer-Info: https://www.vinc17.net/mutt/ User-Agent: Mutt/1.5.23-6455-vl-r76280 (2015-06-26) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:104478 Archived-At: 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 - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)