From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Mark Oteiza Newsgroups: gmane.emacs.bugs Subject: bug#28591: 27.0.50; xterm-set-window-title Date: Sat, 30 Sep 2017 15:27:34 -0400 Message-ID: <20170930192734.5qwfmncd4j3d4ngc@logos.localdomain> References: <87efqv9dp5.fsf@udel.edu> <87377avghj.fsf@udel.edu> <20170926040808.zofxjqrl735zeye3@logos.localdomain> <83ing1941b.fsf@gnu.org> <20170929115700.ag4xni2tckiak4nt@logos.localdomain> <83d16976rh.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1506799692 15634 195.159.176.226 (30 Sep 2017 19:28:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 30 Sep 2017 19:28:12 +0000 (UTC) User-Agent: NeoMutt/20170912-48-0df7d3-dirty Cc: yamaoka@jpl.org, 28591@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Sep 30 21:28:07 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dyNQk-0003VW-2T for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 Sep 2017 21:28:06 +0200 Original-Received: from localhost ([::1]:40178 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dyNQr-0003v5-FH for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 Sep 2017 15:28:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60393) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dyNQj-0003uz-IJ for bug-gnu-emacs@gnu.org; Sat, 30 Sep 2017 15:28:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dyNQg-0008KL-2q for bug-gnu-emacs@gnu.org; Sat, 30 Sep 2017 15:28:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:32794) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dyNQf-0008KE-Vg for bug-gnu-emacs@gnu.org; Sat, 30 Sep 2017 15:28:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dyNQf-00060p-Pr for bug-gnu-emacs@gnu.org; Sat, 30 Sep 2017 15:28:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mark Oteiza Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Sep 2017 19:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28591 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28591-submit@debbugs.gnu.org id=B28591.150679966323084 (code B ref 28591); Sat, 30 Sep 2017 19:28:01 +0000 Original-Received: (at 28591) by debbugs.gnu.org; 30 Sep 2017 19:27:43 +0000 Original-Received: from localhost ([127.0.0.1]:41475 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dyNQM-00060G-QW for submit@debbugs.gnu.org; Sat, 30 Sep 2017 15:27:43 -0400 Original-Received: from mail-qk0-f179.google.com ([209.85.220.179]:47129) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dyNQL-000600-Ee for 28591@debbugs.gnu.org; Sat, 30 Sep 2017 15:27:41 -0400 Original-Received: by mail-qk0-f179.google.com with SMTP id b82so2300990qkc.4 for <28591@debbugs.gnu.org>; Sat, 30 Sep 2017 12:27:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=udel-edu.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=bCWe/gFVdWUHmjbCIvdMsJUP09O4KlufZ05z7bz+LHs=; b=OcAf8H6ojCmTlA/2zmg3ETl5zrSTIcggTwDrtFoLdDV67lLBOZG4THYnhvKXo3WIdP hwDaMYWsxZINvAeR2DFRasAZmM9kgzb6eQAPYhW+FSmxiqv0/NsBY4LpS3Q8LJ0zHqNq Srm234Nwud8QJuJ6cH3xRXl6qiFTohjIIftQlHNgGf3bUHb8H3Wct/3lrA9dzKKWs//L /dIIwsYO5JS2XwnfFd2qe/K3Hs3bk7Tl8hiIrlOdxOSaisZkfZ5tlcd8LV/pl8xmyG19 WsaOsU8NuI1TbuXFFNBd+m/7iTcfkv9wTcfXetLeK4CSO0RWrcwVgtdcS7R0WiThR7LV O4LA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=bCWe/gFVdWUHmjbCIvdMsJUP09O4KlufZ05z7bz+LHs=; b=OS7DXcAAIeZJDzdyyQdEqKhuVF/S6jtHOmarTx3lpESpD2IOKT5cZ10QEFC8DIdbDU QTcjxNB7VEsANPZhx9CAlaw8KcZcJFHB64RddfV5LI9Z76SR16mJg6jlYsNKF1+QCEvn M2JAUdKquLrxN6TW07uK0MXINYTAqpEEYpcjx7L/swTIOODTrwlweZI09/OVTLmkDsRG 4m8xTHypcLeeSgZ3CBSCACM9G4o0UReZLgFFnN83jAKsadXNni5WfHzzCg1VYmeEqZDk agr9uVe+EVWi+eDv3NpiEaRX9/JJi0n5p1pYE+SJFOZlXl79obd2Sk9eEtl7ZvOJzXyn 2seA== X-Gm-Message-State: AMCzsaV262ByGENZegSuddzjB4dn8yIfYQS+KVrKR1x5GYw8+UndZJUb HIbQ+7qav9x850G7vyzz6XkxDw== X-Google-Smtp-Source: AOwi7QCMf1xeB2jJ0h9y4f2c41XPotBK0mtVho/dvpw/j1f44iHswHiZtliA6zAJYnM6sLIAl5pMlA== X-Received: by 10.55.188.131 with SMTP id m125mr9048193qkf.12.1506799655922; Sat, 30 Sep 2017 12:27:35 -0700 (PDT) Original-Received: from logos.localdomain (pool-173-67-36-61.bltmmd.fios.verizon.net. [173.67.36.61]) by smtp.gmail.com with ESMTPSA id a35sm4657843qtb.16.2017.09.30.12.27.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 30 Sep 2017 12:27:35 -0700 (PDT) Content-Disposition: inline In-Reply-To: <83d16976rh.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:137709 Archived-At: On 29/09/17 at 08:29pm, Eli Zaretskii wrote: > > Date: Fri, 29 Sep 2017 07:57:00 -0400 > > From: Mark Oteiza > > Cc: yamaoka@jpl.org, 28591@debbugs.gnu.org > > > > Everything except foregrounding a client works (I did not test this), > > where the following occurs: > > > > Error in post-command-hook (xterm-set-window-title): (error "Terminal > > is currently suspended") > > This error comes from here: > > DEFUN ("send-string-to-terminal", Fsend_string_to_terminal, > Ssend_string_to_terminal, 1, 2, 0, > doc: /* Send STRING to the terminal without alteration. > Control characters in STRING will have terminal-dependent effects. > > Optional parameter TERMINAL specifies the tty terminal device to use. > It may be a terminal object, a frame, or nil for the terminal used by > the currently selected frame. In batch mode, STRING is sent to stdout > when TERMINAL is nil. */) > (Lisp_Object string, Lisp_Object terminal) > { > > ... > if (! tty->output) > error ("Terminal is currently suspended"); > > So one way of fixing it would be to have a suspend-hook set some flag > which your post-command-hook would check, and avoid calling > send-string-to-terminal when the terminal is suspended. > > Another possibility would be to add a utility function, called > 'tty-suspended-p', which you could then test in your > post-command-hook. Its implementation should test the tty->output > value. > > Would any of this make sense? It would, but I ended up taking Martin's suggestion and replacing the use of post-command-hook with instead using buffer-list-update-hook, which doesn't have this problem.