GNU bug report logs - #22096
25.0.50; reading from fifo breaks display

Previous Next

Package: emacs;

Reported by: Mark Oteiza <mvoteiza <at> udel.edu>

Date: Sat, 5 Dec 2015 05:41:02 UTC

Severity: normal

Found in version 25.0.50

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Mark Oteiza <mvoteiza <at> udel.edu>, Kenichi Handa <handa <at> gnu.org>
Cc: 22096 <at> debbugs.gnu.org
Subject: bug#22096: 25.0.50; reading from fifo breaks display
Date: Sat, 05 Dec 2015 21:38:23 +0200
> From: Mark Oteiza <mvoteiza <at> udel.edu>
> Date: Sat, 05 Dec 2015 13:29:14 -0500
> 
> Simpler recipe:
> 
> 1. mkfifo foo
> 2. echo "bar" > foo
> 
> In emacs -Q:
> 
> 3. Evaluate (insert-file-contents-literally "foo" t)
> 
> The buffer display is now broken.

Thanks.  My Emacs is configured with --enable-checking, so it aborted
due to assertion violation.  The patch below fixes that for me; please
see if it fixes the display problem for you.

Does anyone understand how come we used just
bset_enable_multibyte_characters, bypassing all the rest that is
required to make a non-empty buffer unibyte?  It looks simply
blatantly wrong to me.  Compare, for example, with what
decide_coding_unwind does.  Did we never execute this particular code
since it was written, at least not for non-empty buffers?

I hope Handa-san (CC'ed) could comment on this.

diff --git a/src/fileio.c b/src/fileio.c
index 6cda1e3..8e44eb0 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -4265,7 +4265,7 @@ by calling `format-decode', which see.  */)
	  && NILP (replace))
	/* Visiting a file with these coding system makes the buffer
	   unibyte.  */
-	bset_enable_multibyte_characters (current_buffer, Qnil);
+	Fset_buffer_multibyte (Qnil);
     }

   coding.dst_multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_charac\
ters));





This bug report was last modified 4 years and 262 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.