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>
Cc: 22096 <at> debbugs.gnu.org
Subject: bug#22096: 25.0.50; reading from fifo breaks display
Date: Sat, 05 Dec 2015 18:49:39 +0200
> From: Mark Oteiza <mvoteiza <at> udel.edu>
> Date: Sat, 05 Dec 2015 11:06:22 -0500
> 
> >>      It is possible to read a special file (such as a FIFO or an I/O
> >>      device) with `insert-file-contents', as long as REPLACE and VISIT
> >>      are `nil'.
> >> 
> >> It seems this is no longer true, and we have to fix the manual to that
> >> effect.
> >
> > Or maybe that text just gets the value of VISIT wrong: the code in
> > question is very old, and always signaled an error for non-regular
> > files when VISIT is nil.
> 
> Supposedly (according to the docstring) BEG and END have to be nil if
> VISIT is t, so I should probably be getting an error about supplying
> invalid arguments.

The code explicitly doesn't:

  if (!S_ISREG (st.st_mode))
    {
      not_regular = 1;

      if (! NILP (visit))
	goto notfound;

      if (! NILP (replace) || ! NILP (beg) || ! NILP (end))
	xsignal2 (Qfile_error,
		  build_string ("not a regular file"), orig_filename);
    }

The test for VISIT non-nil, but also BEG and END non-nil is only after
that.




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.