Subject: bug#35882: `emacsclient -t' breaks a terminal when try to open not a readable file

From: Eli Zaretskii <[email-masked]>
Date: Sat, 08 Jun 2019 10:38:13 +0300

> Date: Fri, 24 May 2019 12:43:40 +0000
> From: [email-masked]
> 
> After typing `emacsclient -t <filename>' where <filename> doesn't have a read permission for user,
> I stop seeing the text I am typing in a terminal, also broken formatting of output text.
> `stty sane' fixes that.

I believe this problem is already indirectly solved on the master
branch, since we now visit the file before creating the frame.  What I
see here with the master branch code is an error message saying
"*ERROR*: File is not readable: FILE", and the client exits without
leaving the terminal in a messed-up state.

Would it be possible for you to try the master branch and see if it
indeed solves the problem?

Thanks.