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

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

bug#28591: 27.0.50; xterm-set-window-title


From: Mark Oteiza
Subject: bug#28591: 27.0.50; xterm-set-window-title
Date: Sat, 30 Sep 2017 15:27:34 -0400
User-agent: NeoMutt/20170912-48-0df7d3-dirty

On 29/09/17 at 08:29pm, Eli Zaretskii wrote:
> > Date: Fri, 29 Sep 2017 07:57:00 -0400
> > From: Mark Oteiza <mvoteiza@udel.edu>
> > 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.





reply via email to

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