Subject: Re: bug#22096: 25.0.50; reading from fifo breaks display

From: Mark Oteiza <[email-masked]>
Date: Sat, 5 Dec 2015 12:09:08 -0500

On 05/12/15 at 06:45pm, Eli Zaretskii wrote:
> > From: Mark Oteiza <[email-masked]>
> > Date: Sat, 05 Dec 2015 10:58:38 -0500
> > 
> > > Anyway, you are reading a binary byte stream from an audio daemon, so
> > > I think you cannot expect it to be displayed in any human-readable
> > > way, let alone hope that the major mode in effect in *scratch will be
> > > able to fontify it in some reasonable way.  You should use
> > > insert-file-contents-literally instead, I think.  (And I very much
> > > doubt that "visiting" a non-regular file makes sense, but maybe I'm
> > > missing something.)
> > 
> > Right, I didn't expect VISIT=t to make sense, but the resulting breakage
> > is unexpected.
> 
> Emacs tries to decode the binary stream (unless you use the -literally
> variant), and the result could look (to Emacs) like some text that
> fits some font-locking or paren-matching pattern.

The same display oddity does still happen with

(insert-file-contents-literally "/tmp/mpd.fifo" t 0 10 nil)

and nothing appears to be inserted