[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-bug-tracker] bug#5309: marked as done (23.1.91; Cannot load .emac

From: Emacs bug Tracking System
Subject: [Emacs-bug-tracker] bug#5309: marked as done (23.1.91; Cannot load .emacs-history from savehist.el)
Date: Fri, 22 Jan 2010 08:55:04 +0000

Your message dated Fri, 22 Jan 2010 10:54:42 +0200
with message-id <address@hidden>
and subject line Re: bug#5303: 23.1.91; Cannot load .emacs-history from 
has caused the Emacs bug report #5303,
regarding 23.1.91; Cannot load .emacs-history from savehist.el
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact address@hidden

5303: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=5303
Emacs Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 23.1.91; Cannot load .emacs-history from savehist.el Date: Sun, 3 Jan 2010 17:48:11 -0800
Sending this again, but with a much smaller attachment (46 KB), after having
pared down the file. I intended to send this new attachment as a reply to the
original bug report, but I never received that mail, so I couldn't reply to it.
I waited almost 7 hours.

I'm guessing that the original report was somehow lost or was perhaps rejected
because of the large (568 KB) attachment size (?). Dunno. (Seems like a
submitter should at least receive a rejection notice in that case, but I
received nothing.)

So, apologies for creating a new bug, but I have no bug number from the first
report attempt to reply to. Hopefully this time it will get through. If the
original bug does get opened, then we can delete that. The original message is
below, so you have all the info in this bug report.


From: Drew Adams Sent: Sunday, January 03, 2010 11:14 AM
To: 'address@hidden'
Subject: 23.1.91; Cannot load .emacs-history from savehist.el

emacs -Q
Trying to load the attached file raises the error "End of file during
parsing: c:/.emacs-history".
There is no real end-of-file problem, however: This file was created by
savehist.el using Emacs 23.1, and it loads fine in all releases of Emacs
(20 through 23).  An error is raised only for the Emacs

NOTE: I had to attach a copy of the original file, because Windows doesn't allow
me to attach a file named `.emacs-history'. But trying to load that copy,
`emacs-history', also raises the same error.

However, something weird is going on. If the file is in c:/ when I try to load
it, then the error is raised. If the file is in c:/mydir/ when I try to load it,
then it loads with no error. I do not understand this at all. Exactly the same
file, different behavior. And it doesn't matter whether I make the file copy
using Emacs C-x C-w or using Windows copy+paste.
Dunno if simply attaching the file will enable you to reproduce
the bug - hope so.

In GNU Emacs (i386-mingw-nt5.1.2600)
 of 2010-01-02 on PRETEST
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4)'

Attachment: pared-hist
Description: Binary data

--- End Message ---
--- Begin Message --- Subject: Re: bug#5303: 23.1.91; Cannot load .emacs-history from savehist.el Date: Fri, 22 Jan 2010 10:54:42 +0200
> From: Chong Yidong <address@hidden>
> Cc: address@hidden, address@hidden,
>         Stefan Monnier <address@hidden>,
>         Richard Stallman <address@hidden>
> Date: Thu, 21 Jan 2010 15:41:06 -0500
> Chong Yidong <address@hidden> writes:
> >>   . Was safe_to_load_p intended to return non-zero value for invalid
> >>     file descriptors such as -2?
> >
> > I think that is a bug.
> Does it fix the bug if safe_to_load_p returns 0 when the call to
> emacs_read on line 895 returns a value <= 0?

It does, but I prefer not to call safe_to_load_p at all in that case.
I've installed a slightly different fix, see below.

(There's another, possibly similar bug: load-file fails for
C:/the-file.el.gz because jka-compr signals a wrong type argument
error.  But that problem existed with the original Fload as well.  I
will file a separate bug and see what I can find there.)

2010-01-22  Eli Zaretskii  <address@hidden>

        * lread.c (Fload): Don't treat files without .elc extension as
        byte-compiled if they are ``magic'', i.e. `openp' returned -2 for
        them.  (bug#5303)

=== modified file 'src/lread.c'
--- src/lread.c 2010-01-13 08:35:10 +0000
+++ src/lread.c 2010-01-22 08:35:48 +0000
@@ -1155,7 +1155,7 @@ Return t if the file exists and loads su
   if (!bcmp (SDATA (found) + SBYTES (found) - 4,
             ".elc", 4)
-      || (version = safe_to_load_p (fd)) > 0)
+      || (fd >= 0 && (version = safe_to_load_p (fd)) > 0))
     /* Load .elc files directly, but not when they are
        remote and have no handler!  */

--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]