GNU bug report logs - #7001
should `byte-compile-from-buffer' evaluate `binary-overwrite-mode' explicitly?

Previous Next

Package: emacs;

Reported by: MON KEY <monkey <at> sandpframing.com>

Date: Wed, 8 Sep 2010 21:00:03 UTC

Severity: minor

Tags: notabug

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 7001 in the body.
You can then email your comments to 7001 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7001; Package emacs. (Wed, 08 Sep 2010 21:00:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to MON KEY <monkey <at> sandpframing.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 08 Sep 2010 21:00:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: MON KEY <monkey <at> sandpframing.com>
To: bug-gnu-emacs <at> gnu.org
Subject: should `byte-compile-from-buffer' evaluate `binary-overwrite-mode'
	explicitly?
Date: Wed, 8 Sep 2010 17:01:00 -0400
emacs-lisp/bytecomp.el

`byte-compile-from-buffer'

Has this form:

 (setq overwrite-mode 'overwrite-mode-binary)

Should this evalatate `binary-overwrite-mode'  from simple.el instead?

Or, is there a boostrapping issue which prevents this?

--
/s_P\




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7001; Package emacs. (Thu, 09 Sep 2010 17:01:01 GMT) Full text and rfc822 format available.

Message #8 received at 7001 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: MON KEY <monkey <at> sandpframing.com>
Cc: 7001 <at> debbugs.gnu.org
Subject: Re: bug#7001: should `byte-compile-from-buffer' evaluate
	`binary-overwrite-mode' explicitly?
Date: Thu, 09 Sep 2010 19:02:44 +0200
> Has this form:
>  (setq overwrite-mode 'overwrite-mode-binary)
> Should this evalatate `binary-overwrite-mode'  from simple.el instead?

Probably not, since that would run binary-overwrite-mode-hook.
Most likely this line can be removed from bytecomp.el.


        Stefan




bug closed, send any further explanations to MON KEY <monkey <at> sandpframing.com> Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 16 Sep 2010 03:59:01 GMT) Full text and rfc822 format available.

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7001; Package emacs. (Sat, 02 Oct 2010 23:09:01 GMT) Full text and rfc822 format available.

Message #13 received at 7001 <at> debbugs.gnu.org (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 7001 <at> debbugs.gnu.org, MON KEY <monkey <at> sandpframing.com>
Subject: Re: bug#7001: should `byte-compile-from-buffer' evaluate
	`binary-overwrite-mode' explicitly?
Date: Sat, 02 Oct 2010 19:11:13 -0400
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>> Has this form:
>>  (setq overwrite-mode 'overwrite-mode-binary)
>> Should this evalatate `binary-overwrite-mode'  from simple.el instead?
>
> Probably not, since that would run binary-overwrite-mode-hook.

I've added a comment about this.

> Most likely this line can be removed from bytecomp.el.

The comments in bytecomp.el say this is needed for DOS.  No harm leaving
it in, I suppose.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7001; Package emacs. (Sun, 03 Oct 2010 04:02:02 GMT) Full text and rfc822 format available.

Message #16 received at 7001 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: 7001 <at> debbugs.gnu.org, monkey <at> sandpframing.com, monnier <at> iro.umontreal.ca
Subject: Re: bug#7001: should `byte-compile-from-buffer'
	evaluate	`binary-overwrite-mode' explicitly?
Date: Sun, 03 Oct 2010 06:04:46 +0200
> From: Chong Yidong <cyd <at> stupidchicken.com>
> Date: Sat, 02 Oct 2010 19:11:13 -0400
> Cc: 7001 <at> debbugs.gnu.org, MON KEY <monkey <at> sandpframing.com>
> 
> > Most likely this line can be removed from bytecomp.el.
> 
> The comments in bytecomp.el say this is needed for DOS.

That comment is obsolete.  All file I/O works in binary mode on DOS
and Windows since at least 15 years ago.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7001; Package emacs. (Sun, 03 Oct 2010 04:30:03 GMT) Full text and rfc822 format available.

Message #19 received at 7001 <at> debbugs.gnu.org (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 7001 <at> debbugs.gnu.org, monkey <at> sandpframing.com, monnier <at> iro.umontreal.ca
Subject: Re: bug#7001: should `byte-compile-from-buffer'
	evaluate	`binary-overwrite-mode' explicitly?
Date: Sun, 03 Oct 2010 00:32:15 -0400
Eli Zaretskii <eliz <at> gnu.org> writes:

>>
>> > Most likely this line can be removed from bytecomp.el.
>>
>> The comments in bytecomp.el say this is needed for DOS.
>
> That comment is obsolete.  All file I/O works in binary mode on DOS
> and Windows since at least 15 years ago.

Wow, that's some history ;-)  I've removed the line; thanks.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7001; Package emacs. (Sun, 03 Oct 2010 05:41:02 GMT) Full text and rfc822 format available.

Message #22 received at 7001 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: 7001 <at> debbugs.gnu.org, monkey <at> sandpframing.com, monnier <at> iro.umontreal.ca
Subject: Re: bug#7001: should `byte-compile-from-buffer'
	evaluate	`binary-overwrite-mode' explicitly?
Date: Sun, 03 Oct 2010 01:43:26 -0400
> From: Chong Yidong <cyd <at> stupidchicken.com>
> Cc: monnier <at> iro.umontreal.ca, 7001 <at> debbugs.gnu.org, monkey <at> sandpframing.com
> Date: Sun, 03 Oct 2010 00:32:15 -0400
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> >>
> >> > Most likely this line can be removed from bytecomp.el.
> >>
> >> The comments in bytecomp.el say this is needed for DOS.
> >
> > That comment is obsolete.  All file I/O works in binary mode on DOS
> > and Windows since at least 15 years ago.
> 
> Wow, that's some history ;-)  I've removed the line; thanks.

Just for the record: I meant to say that _Emacs_ file I/O on
DOS/Windows works in binary mode, not that DOS/Windows in general do
that.  The following part in emacs.c does the trick:

  #if defined (MSDOS) || defined (WINDOWSNT)
    /* We do all file input/output as binary files.  When we need to translate
       newlines, we do that manually.  */
    _fmode = O_BINARY;
  #endif /* MSDOS || WINDOWSNT */

  #ifdef MSDOS
    if (!isatty (fileno (stdin)))
      setmode (fileno (stdin), O_BINARY);
    if (!isatty (fileno (stdout)))
      {
	fflush (stdout);
	setmode (fileno (stdout), O_BINARY);
      }
  #endif /* MSDOS */




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 31 Oct 2010 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 14 years and 238 days ago.

Previous Next


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