GNU bug report logs - #870
Missing ^J in ChangeLog

Previous Next

Packages: w32, emacs;

Reported by: "Juanma Barranquero" <lekktu <at> gmail.com>

Date: Wed, 3 Sep 2008 11:10:05 UTC

Severity: normal

Done: Jason Rumney <jasonr <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 870 in the body.
You can then email your comments to 870 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 bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#870; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to "Juanma Barranquero" <lekktu <at> gmail.com>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Juanma Barranquero" <lekktu <at> gmail.com>
To: submit <at> debbugs.gnu.org
Subject: Missing ^J in ChangeLog
Date: Wed, 3 Sep 2008 13:03:17 +0200
Sometimes, while editing a ChangeLog file, one or several ^J disappear.

It could be related to doing other modifications to the ChangeLog
(reverting the buffer when there's outside changes while trying to
commit, for example), but so far there is no recipe to reproduce it.

The bug has been observed many times, and by at least two developers. It
seems to be confined to the Windows port.

emacs-devel discussion:

http://lists.gnu.org/archive/html/emacs-devel/2008-06/msg02050.html
http://lists.gnu.org/archive/html/emacs-devel/2008-07/msg00075.html




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#870; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to martin rudalics <rudalics <at> gmx.at>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #10 received at 870 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: 870 <at> debbugs.gnu.org
Cc: Juanma Barranquero <lekktu <at> gmail.com>
Subject: Re: bug#870: Missing ^J in ChangeLog
Date: Wed, 03 Sep 2008 14:50:43 +0200
> Sometimes, while editing a ChangeLog file, one or several ^J disappear.
>
> It could be related to doing other modifications to the ChangeLog
> (reverting the buffer when there's outside changes while trying to
> commit, for example), but so far there is no recipe to reproduce it.
>
> The bug has been observed many times, and by at least two developers. It
> seems to be confined to the Windows port.
>
> emacs-devel discussion:
>
> http://lists.gnu.org/archive/html/emacs-devel/2008-06/msg02050.html
> http://lists.gnu.org/archive/html/emacs-devel/2008-07/msg00075.html

Can't you put a `modification-hook' (or even a `read-only' hook) on all
^Js in your ChangeLog buffers?

martin




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#870; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to "Juanma Barranquero" <lekktu <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #15 received at 870 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Juanma Barranquero" <lekktu <at> gmail.com>
To: "martin rudalics" <rudalics <at> gmx.at>
Cc: 870 <at> debbugs.gnu.org
Subject: Re: bug#870: Missing ^J in ChangeLog
Date: Wed, 3 Sep 2008 17:20:39 +0200
On Wed, Sep 3, 2008 at 14:50, martin rudalics <rudalics <at> gmx.at> wrote:

> Can't you put a `modification-hook' (or even a `read-only' hook) on all
> ^Js in your ChangeLog buffers?

Yes, I've added a modification hook, but so far I haven't been able to
catch the bug happening.

 Juanma




bug marked as found in version 23.0.60. Request was from "Juanma Barranquero" <lekktu <at> gmail.com> to control <at> emacsbugs.donarmstrong.com. (Tue, 09 Sep 2008 15:40:04 GMT) Full text and rfc822 format available.

bug reassigned from package `emacs' to `emacs,w32'. Request was from "Juanma Barranquero" <lekktu <at> gmail.com> to control <at> emacsbugs.donarmstrong.com. (Tue, 09 Sep 2008 15:40:05 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, eliz <at> gnu.org, jasonr <at> gnu.org, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com:
bug#870; Package emacs,w32. Full text and rfc822 format available.

Acknowledgement sent to "Juanma Barranquero" <lekktu <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to eliz <at> gnu.org, jasonr <at> gnu.org, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com. Full text and rfc822 format available.

Message #24 received at 870 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Juanma Barranquero" <lekktu <at> gmail.com>
To: 870 <at> debbugs.gnu.org
Subject: Re: bug#870: Missing ^J in ChangeLog
Date: Wed, 22 Oct 2008 17:14:27 +0200
X-Debbugs-CC: eliz <at> gnu.org, jasonr <at> gnu.org

I just had it happen to me again, after a long while. Those were my steps:

 1.- Edit and save src/xdisp.c.
 2.- Edit and save src/ChangeLog to add a new entry.
 3.- Run vc-dir (through C-x v d) and select to check only on "src/";
vc-dir says there are pending changes in src/ChangeLog (among other
files).
 4.- Exit Emacs.
 5.- cvs update from the checkout root; src/ChangeLog is merged. There
are no conflicts (my change to src/ChangeLog was not at the top of the
file because, before merging, the first entry was already by me).
 6.- Enter Emacs (it visits src/ChangeLog because I'm using desktop.el).
 7.- Split the second entry (by me) in two, moving part of it as a new
entry at the top of src/ChangeLog.
 8.- Save src/ChangeLog.
 9.- Run vc-dir again; there are files ready to be commited.
10.- Mark them with M (vc-dir-mark-all-files) and commit them with v
(vc-next-action).
11.- Fill the CVS log entry and send with C-c C-c.

I'm puzzled. I'd think CVSNT was screwing with CRLF, but after 5) the
ChangeLog was fine, or I would have seen it at 6).

  Juanma




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com:
bug#870; Package emacs,w32. Full text and rfc822 format available.

Acknowledgement sent to Eli Zaretskii <eliz <at> gnu.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com. Full text and rfc822 format available.

Message #29 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Juanma Barranquero <lekktu <at> gmail.com>, 870 <at> debbugs.gnu.org
Cc: jasonr <at> gnu.org, bug-gnu-emacs <at> gnu.org
Subject: Re: bug#870: Missing ^J in ChangeLog
Date: Wed, 22 Oct 2008 21:45:35 +0200
> Date: Wed, 22 Oct 2008 17:14:27 +0200
> From: "Juanma Barranquero" <lekktu <at> gmail.com>
> 
> I'm puzzled. I'd think CVSNT was screwing with CRLF, but after 5) the
> ChangeLog was fine, or I would have seen it at 6).

I suspect that we have a more fundamental problem somewhere in
insert-file-contents or its subroutines.  Did you see that in the
Index nodes of Info manuals some lines end with TWO ^M characters,
whereas the file has only one?  Maybe the same problem is at work
here, who knows?





Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com:
bug#870; Package emacs,w32. Full text and rfc822 format available.

Acknowledgement sent to Eli Zaretskii <eliz <at> gnu.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com. Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com:
bug#870; Package emacs,w32. Full text and rfc822 format available.

Acknowledgement sent to "Lennart Borgman (gmail)" <lennart.borgman <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com. Full text and rfc822 format available.

Message #39 received at 870 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Lennart Borgman (gmail)" <lennart.borgman <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>, 870 <at> debbugs.gnu.org
Cc: Juanma Barranquero <lekktu <at> gmail.com>
Subject: Re: bug#870: Missing ^J in ChangeLog
Date: Wed, 22 Oct 2008 22:15:24 +0200
Eli Zaretskii wrote:
>> Date: Wed, 22 Oct 2008 17:14:27 +0200
>> From: "Juanma Barranquero" <lekktu <at> gmail.com>
>>
>> I'm puzzled. I'd think CVSNT was screwing with CRLF, but after 5) the
>> ChangeLog was fine, or I would have seen it at 6).
> 
> I suspect that we have a more fundamental problem somewhere in
> insert-file-contents or its subroutines.  Did you see that in the
> Index nodes of Info manuals some lines end with TWO ^M characters,
> whereas the file has only one?  Maybe the same problem is at work
> here, who knows?


Due to the problem with ^M in w32 info files this is very visible ;-)

How is those lines build (where is the code that builds them)?




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com:
bug#870; Package emacs,w32. Full text and rfc822 format available.

Acknowledgement sent to Eli Zaretskii <eliz <at> gnu.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com. Full text and rfc822 format available.

Message #44 received at 870 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: "Lennart Borgman (gmail)" <lennart.borgman <at> gmail.com>
Cc: 870 <at> debbugs.gnu.org, lekktu <at> gmail.com
Subject: Re: bug#870: Missing ^J in ChangeLog
Date: Wed, 22 Oct 2008 23:08:56 +0200
> Date: Wed, 22 Oct 2008 22:15:24 +0200
> From: "Lennart Borgman (gmail)" <lennart.borgman <at> gmail.com>
> CC: Juanma Barranquero <lekktu <at> gmail.com>
> 
> How is those lines build (where is the code that builds them)?

Like I said: insert-file-contents and its subroutines.




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com:
bug#870; Package emacs,w32. Full text and rfc822 format available.

Acknowledgement sent to "Lennart Borgman (gmail)" <lennart.borgman <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com. Full text and rfc822 format available.

Message #49 received at 870 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Lennart Borgman (gmail)" <lennart.borgman <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 870 <at> debbugs.gnu.org, lekktu <at> gmail.com
Subject: Re: bug#870: Missing ^J in ChangeLog
Date: Wed, 22 Oct 2008 23:22:56 +0200
Eli Zaretskii wrote:
>> Date: Wed, 22 Oct 2008 22:15:24 +0200
>> From: "Lennart Borgman (gmail)" <lennart.borgman <at> gmail.com>
>> CC: Juanma Barranquero <lekktu <at> gmail.com>
>>
>> How is those lines build (where is the code that builds them)?
> 
> Like I said: insert-file-contents and its subroutines.

Do you mean that the whole index page is built by an
insert-file-contents call?





Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com:
bug#870; Package emacs,w32. Full text and rfc822 format available.

Acknowledgement sent to "Juanma Barranquero" <lekktu <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com. Full text and rfc822 format available.

Message #54 received at 870 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Juanma Barranquero" <lekktu <at> gmail.com>
To: "Eli Zaretskii" <eliz <at> gnu.org>
Cc: 870 <at> debbugs.gnu.org
Subject: Re: bug#870: Missing ^J in ChangeLog
Date: Wed, 22 Oct 2008 23:58:36 +0200
On Wed, Oct 22, 2008 at 21:45, Eli Zaretskii <eliz <at> gnu.org> wrote:

> I suspect that we have a more fundamental problem somewhere in
> insert-file-contents or its subroutines.

Yes, I suppose so, but it is strange it only manifests in ChangeLogs.

> Did you see that in the
> Index nodes of Info manuals some lines end with TWO ^M characters,
> whereas the file has only one?  Maybe the same problem is at work
> here, who knows?

Are you talking of #876? I don't think it is related to #870.

  Juanma




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com:
bug#870; Package emacs,w32. Full text and rfc822 format available.

Acknowledgement sent to Eli Zaretskii <eliz <at> gnu.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com. Full text and rfc822 format available.

Message #59 received at 870 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: "Lennart Borgman (gmail)" <lennart.borgman <at> gmail.com>
Cc: 870 <at> debbugs.gnu.org, lekktu <at> gmail.com
Subject: Re: bug#870: Missing ^J in ChangeLog
Date: Thu, 23 Oct 2008 00:06:48 +0200
> Date: Wed, 22 Oct 2008 23:22:56 +0200
> From: "Lennart Borgman (gmail)" <lennart.borgman <at> gmail.com>
> CC: 870 <at> emacsbugs.donarmstrong.com, lekktu <at> gmail.com
> 
> Eli Zaretskii wrote:
> >> Date: Wed, 22 Oct 2008 22:15:24 +0200
> >> From: "Lennart Borgman (gmail)" <lennart.borgman <at> gmail.com>
> >> CC: Juanma Barranquero <lekktu <at> gmail.com>
> >>
> >> How is those lines build (where is the code that builds them)?
> > 
> > Like I said: insert-file-contents and its subroutines.
> 
> Do you mean that the whole index page is built by an
> insert-file-contents call?

No.




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com:
bug#870; Package emacs,w32. Full text and rfc822 format available.

Acknowledgement sent to Eli Zaretskii <eliz <at> gnu.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com. Full text and rfc822 format available.

Message #64 received at 870 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Juanma Barranquero <lekktu <at> gmail.com>
Cc: 870 <at> debbugs.gnu.org
Subject: Re: bug#870: Missing ^J in ChangeLog
Date: Thu, 23 Oct 2008 00:17:00 +0200
> Date: Wed, 22 Oct 2008 23:58:36 +0200
> From: "Juanma Barranquero" <lekktu <at> gmail.com>
> Cc: 870 <at> emacsbugs.donarmstrong.com
> 
> > Did you see that in the
> > Index nodes of Info manuals some lines end with TWO ^M characters,
> > whereas the file has only one?  Maybe the same problem is at work
> > here, who knows?
> 
> Are you talking of #876? I don't think it is related to #870.

No, I'm talking about pairs of ^M^M characters at the end of some
lines, where in the file there's only one ^M at the end of each line.




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com:
bug#870; Package emacs,w32. Full text and rfc822 format available.

Acknowledgement sent to "Lennart Borgman" <lennart.borgman <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com. Full text and rfc822 format available.

Message #69 received at 870 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Lennart Borgman" <lennart.borgman <at> gmail.com>
To: "Eli Zaretskii" <eliz <at> gnu.org>, 870 <at> debbugs.gnu.org
Cc: "Juanma Barranquero" <lekktu <at> gmail.com>
Subject: Re: bug#870: Missing ^J in ChangeLog
Date: Thu, 23 Oct 2008 00:26:23 +0200
On Wed, Oct 22, 2008 at 10:15 PM, Lennart Borgman (gmail)
<lennart.borgman <at> gmail.com> wrote:
> Eli Zaretskii wrote:
>>> Date: Wed, 22 Oct 2008 17:14:27 +0200
>>> From: "Juanma Barranquero" <lekktu <at> gmail.com>
>>>
>>> I'm puzzled. I'd think CVSNT was screwing with CRLF, but after 5) the
>>> ChangeLog was fine, or I would have seen it at 6).
>>
>> I suspect that we have a more fundamental problem somewhere in
>> insert-file-contents or its subroutines.  Did you see that in the
>> Index nodes of Info manuals some lines end with TWO ^M characters,
>> whereas the file has only one?  Maybe the same problem is at work
>> here, who knows?
>
>
> Due to the problem with ^M in w32 info files this is very visible ;-)
>
> How is those lines build (where is the code that builds them)?

Even though those lines in the info index shows as

   ^M^M

at the end it seems like the it is 13, 10 not 13, 13. Is this just
another bug, or?




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com:
bug#870; Package emacs,w32. Full text and rfc822 format available.

Acknowledgement sent to "Lennart Borgman" <lennart.borgman <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com. Full text and rfc822 format available.

Message #74 received at 870 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Lennart Borgman" <lennart.borgman <at> gmail.com>
To: "Eli Zaretskii" <eliz <at> gnu.org>, 870 <at> debbugs.gnu.org
Cc: "Juanma Barranquero" <lekktu <at> gmail.com>
Subject: Re: bug#870: Missing ^J in ChangeLog
Date: Thu, 23 Oct 2008 01:10:58 +0200
On Thu, Oct 23, 2008 at 12:26 AM, Lennart Borgman
<lennart.borgman <at> gmail.com> wrote:
> On Wed, Oct 22, 2008 at 10:15 PM, Lennart Borgman (gmail)
> <lennart.borgman <at> gmail.com> wrote:
>> Eli Zaretskii wrote:
>>>> Date: Wed, 22 Oct 2008 17:14:27 +0200
>>>> From: "Juanma Barranquero" <lekktu <at> gmail.com>
>>>>
>>>> I'm puzzled. I'd think CVSNT was screwing with CRLF, but after 5) the
>>>> ChangeLog was fine, or I would have seen it at 6).
>>>
>>> I suspect that we have a more fundamental problem somewhere in
>>> insert-file-contents or its subroutines.  Did you see that in the
>>> Index nodes of Info manuals some lines end with TWO ^M characters,
>>> whereas the file has only one?  Maybe the same problem is at work
>>> here, who knows?
>>
>>
>> Due to the problem with ^M in w32 info files this is very visible ;-)
>>
>> How is those lines build (where is the code that builds them)?
>
> Even though those lines in the info index shows as
>
>   ^M^M
>
> at the end it seems like the it is 13, 10 not 13, 13. Is this just
> another bug, or?

It looks like a display bug!

I copied the two ^M^M to *scratch* and tried to investigate what was
there. I saw some strange things, but the most enlightening was when I
copied these characters as a line. With cua-mode on I selected the
line and copied it to a new location. Then suddenly it became

  ^M
                            (line 34)^M

which is actually what you can see in the file

   info/emacs-7




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com:
bug#870; Package emacs,w32. Full text and rfc822 format available.

Acknowledgement sent to "Juanma Barranquero" <lekktu <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com. Full text and rfc822 format available.

Message #79 received at 870 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Juanma Barranquero" <lekktu <at> gmail.com>
To: "Eli Zaretskii" <eliz <at> gnu.org>
Cc: 870 <at> debbugs.gnu.org
Subject: Re: bug#870: Missing ^J in ChangeLog
Date: Thu, 23 Oct 2008 01:32:34 +0200
On Thu, Oct 23, 2008 at 00:17, Eli Zaretskii <eliz <at> gnu.org> wrote:

> No, I'm talking about pairs of ^M^M characters at the end of some
> lines, where in the file there's only one ^M at the end of each line.

How can I reproduce that? I don't see the problem, or I don't know
where to look.

  Juanma




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com:
bug#870; Package emacs,w32. Full text and rfc822 format available.

Acknowledgement sent to "Juanma Barranquero" <lekktu <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com. Full text and rfc822 format available.

Message #84 received at 870 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Juanma Barranquero" <lekktu <at> gmail.com>
To: "Eli Zaretskii" <eliz <at> gnu.org>
Cc: 870 <at> debbugs.gnu.org
Subject: Re: bug#870: Missing ^J in ChangeLog
Date: Thu, 23 Oct 2008 01:41:11 +0200
On Thu, Oct 23, 2008 at 01:32, Juanma Barranquero <lekktu <at> gmail.com> wrote:

> How can I reproduce that? I don't see the problem, or I don't know
> where to look.

Forget my previous message, I see it now.

I think Lennart's right, it seems like a display bug. If you put the
cursor over the second ^M and do C-u C-x =, it says that it is a LF.

   Juanma




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com:
bug#870; Package emacs,w32. Full text and rfc822 format available.

Acknowledgement sent to "Lennart Borgman" <lennart.borgman <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com. Full text and rfc822 format available.

Message #89 received at 870 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Lennart Borgman" <lennart.borgman <at> gmail.com>
To: "Juanma Barranquero" <lekktu <at> gmail.com>, 870 <at> debbugs.gnu.org
Cc: "Eli Zaretskii" <eliz <at> gnu.org>
Subject: Re: bug#870: Missing ^J in ChangeLog
Date: Thu, 23 Oct 2008 02:39:20 +0200
On Thu, Oct 23, 2008 at 1:41 AM, Juanma Barranquero <lekktu <at> gmail.com> wrote:
> On Thu, Oct 23, 2008 at 01:32, Juanma Barranquero <lekktu <at> gmail.com> wrote:
>
>> How can I reproduce that? I don't see the problem, or I don't know
>> where to look.
>
> Forget my previous message, I see it now.
>
> I think Lennart's right, it seems like a display bug. If you put the
> cursor over the second ^M and do C-u C-x =, it says that it is a LF.

... but with (buffer-substring ...) you can see that there are
invisible characters ...




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com:
bug#870; Package emacs,w32. Full text and rfc822 format available.

Acknowledgement sent to "Juanma Barranquero" <lekktu <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com. Full text and rfc822 format available.

Message #94 received at 870 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Juanma Barranquero" <lekktu <at> gmail.com>
To: "Lennart Borgman" <lennart.borgman <at> gmail.com>
Cc: 870 <at> debbugs.gnu.org
Subject: Re: bug#870: Missing ^J in ChangeLog
Date: Thu, 23 Oct 2008 15:34:10 +0200
> ... but with (buffer-substring ...) you can see that there are
> invisible characters ...

In that case, it looks like it *is* an instance of #870:

visible line1^M
invisible line2^M
visible line 3^M

appearing as

visible line1^M^M
visible line3^M

  Juanma




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com:
bug#870; Package emacs,w32. (Mon, 05 Jan 2009 05:10:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Juanma Barranquero" <lekktu <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com. (Mon, 05 Jan 2009 05:10:05 GMT) Full text and rfc822 format available.

Message #99 received at 870 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Juanma Barranquero" <lekktu <at> gmail.com>
To: "Emacs Devel" <emacs-devel <at> gnu.org>
Cc: 870 <at> debbugs.gnu.org
Subject: Repeatable instance of bug#870
Date: Mon, 5 Jan 2009 06:03:36 +0100
[Message part 1 (text/plain, inline)]
Today, I've been finally able to create a repeatable test case for
bug#870, "Missing ^J in ChangeLog".

The bug manifests itself as one or more ^J chars missing when reading
a text file. AFAIK, it has only happened with ChangeLogs, and just to
a few Windows users (not unexpectedly, as we typically handle much
more CRLF files than people on other systems).

On my setup, the bug can be repeated at will by doing:

   emacs -Q --eval "(desktop-save-mode 1)" ChangeLog.870
   C-x C-f
   y <RET>    ; to save the desktop when asked
   emacs -Q --eval "(desktop-read)"
   C-s C-q C-M

After that, the cursor will be over a ^M char, the remnant of a CRLF
pair whose ^J has disappeared.

If before restarting Emacs you edit .emacs.desktop and remove
"(buffer-file-coding-system . utf-8-dos)" from the ChangeLog.870
entry, the bug does not happen.

The missing ^J is exactly at position #x8000 of the ChangeLog.870
file. If you do remove a character from the file and repeat the test,
the problem does not happen at position #x8000, but another instance
of the same bug does happen at position #x38007. That seems to
indicate some kind of trouble with a 32 KiB buffer.

I'm attaching a bzipped copy of ChangeLog.870.

Any help in debugging this bug (or even a patch fixing it ;-) will be
much appreciated.

    Juanma
[ChangeLog.870.bz2 (application/x-bzip2, attachment)]

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com:
bug#870; Package emacs,w32. (Mon, 05 Jan 2009 11:05:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jason Rumney <jasonr <at> gnu.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com. (Mon, 05 Jan 2009 11:05:05 GMT) Full text and rfc822 format available.

Message #104 received at 870 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Jason Rumney <jasonr <at> gnu.org>
To: Juanma Barranquero <lekktu <at> gmail.com>, 870 <at> debbugs.gnu.org
Cc: Emacs Devel <emacs-devel <at> gnu.org>
Subject: Re: bug#870: Repeatable instance of bug#870
Date: Mon, 05 Jan 2009 18:59:03 +0800
Juanma Barranquero wrote:
>    emacs -Q --eval "(desktop-save-mode 1)" ChangeLog.870
>   

I can also reproduce the bug with C-x RET r utf-8-dos after visiting the 
file normally.

It appears that there is a bug in all the decode_coding_* functions when 
a CR lies on a CHARBUF_SIZE (0x4000) boundary with a matching LF on the 
other side of the boundary.

They all do something like:

     if (eol_crlf && c1 == '\r')
       ONE_MORE_BYTE (byte_after_cr);

but ONE_MORE_BYTE will abort the decode if it reaches the end of the 
buffer, leaving the CR in limbo between having been read and being added 
to the buffer. Then on decoding the subsequent block, the initial LF 
does not trip the normal CRLF decoding, so it is put into the buffer.





Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com:
bug#870; Package emacs,w32. (Mon, 05 Jan 2009 11:20:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Juanma Barranquero" <lekktu <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com. (Mon, 05 Jan 2009 11:20:03 GMT) Full text and rfc822 format available.

Message #109 received at 870 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Juanma Barranquero" <lekktu <at> gmail.com>
To: "Jason Rumney" <jasonr <at> gnu.org>
Cc: 870 <at> debbugs.gnu.org, "Emacs Devel" <emacs-devel <at> gnu.org>
Subject: Re: bug#870: Repeatable instance of bug#870
Date: Mon, 5 Jan 2009 12:12:48 +0100
On Mon, Jan 5, 2009 at 11:59, Jason Rumney <jasonr <at> gnu.org> wrote:

> It appears that there is a bug in all the decode_coding_* functions when a
> CR lies on a CHARBUF_SIZE (0x4000) boundary with a matching LF on the other
> side of the boundary.
>
> They all do something like:
>
>     if (eol_crlf && c1 == '\r')
>       ONE_MORE_BYTE (byte_after_cr);
>
> but ONE_MORE_BYTE will abort the decode if it reaches the end of the buffer,
> leaving the CR in limbo between having been read and being added to the
> buffer. Then on decoding the subsequent block, the initial LF does not trip
> the normal CRLF decoding, so it is put into the buffer.

Wouldn't that mean that, on writing the buffer, the file would end
with extra CRs, instead of missing LFs?

    Juanma




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com:
bug#870; Package emacs,w32. (Mon, 05 Jan 2009 11:30:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jason Rumney <jasonr <at> gnu.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com. (Mon, 05 Jan 2009 11:30:03 GMT) Full text and rfc822 format available.

Message #114 received at 870 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Jason Rumney <jasonr <at> gnu.org>
To: Juanma Barranquero <lekktu <at> gmail.com>
Cc: 870 <at> debbugs.gnu.org, Emacs Devel <emacs-devel <at> gnu.org>
Subject: Re: bug#870: Repeatable instance of bug#870
Date: Mon, 05 Jan 2009 19:22:16 +0800
Juanma Barranquero wrote:
> On Mon, Jan 5, 2009 at 11:59, Jason Rumney <jasonr <at> gnu.org> wrote:
>
>   
>> It appears that there is a bug in all the decode_coding_* functions when a
>> CR lies on a CHARBUF_SIZE (0x4000) boundary with a matching LF on the other
>> side of the boundary.
>>
>> They all do something like:
>>
>>     if (eol_crlf && c1 == '\r')
>>       ONE_MORE_BYTE (byte_after_cr);
>>
>> but ONE_MORE_BYTE will abort the decode if it reaches the end of the buffer,
>> leaving the CR in limbo between having been read and being added to the
>> buffer. Then on decoding the subsequent block, the initial LF does not trip
>> the normal CRLF decoding, so it is put into the buffer.
>>     
>
> Wouldn't that mean that, on writing the buffer, the file would end
> with extra CRs, instead of missing LFs?
>   
The CRs are effectively stripped on reading, since they end up in limbo 
between being read and being added to the decoding buffer. I haven't 
tried writing the file, but I think (from memory and from the way the 
code looks to me) the problem is a missing CR, not a missing LF.





Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com:
bug#870; Package emacs,w32. (Mon, 05 Jan 2009 11:40:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Juanma Barranquero" <lekktu <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com. (Mon, 05 Jan 2009 11:40:04 GMT) Full text and rfc822 format available.

Message #119 received at 870 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Juanma Barranquero" <lekktu <at> gmail.com>
To: "Jason Rumney" <jasonr <at> gnu.org>
Cc: 870 <at> debbugs.gnu.org, "Emacs Devel" <emacs-devel <at> gnu.org>
Subject: Re: bug#870: Repeatable instance of bug#870
Date: Mon, 5 Jan 2009 12:31:09 +0100
On Mon, Jan 5, 2009 at 12:22, Jason Rumney <jasonr <at> gnu.org> wrote:

> The CRs are effectively stripped on reading, since they end up in limbo
> between being read and being added to the decoding buffer. I haven't tried
> writing the file, but I think (from memory and from the way the code looks
> to me) the problem is a missing CR, not a missing LF.

That's not what I see.

ChangeLog.870 initially contains:

0000 7ff0 20 74 69 6d 65 2d 73 74  61 6d 70 2e 65 6c 3a 0d   time-stamp.el:.
0000 8000 0a 09 2a 20 74 69 6d 65  2e 65 6c 3a 0d 0a 09 2a  ..* time.el:...*

After rereading the file, in Emacs it shows as:

	* time-stamp.el:^M	* time.el:

which I interpret as if, while reading, the ^M was read without ^L and
so taken literally, while the ^L was missing.

Then, if I write it back, the file on disk contains

0000 7ff0 20 74 69 6d 65 2d 73 74  61 6d 70 2e 65 6c 3a 0d   time-stamp.el:.
0000 8000 09 2a 20 74 69 6d 65 2e  65 6c 3a 0d 0a 09 2a 20  .* time.el:...*

so a LF has gone missing.

    Juanma




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com:
bug#870; Package emacs,w32. (Mon, 05 Jan 2009 14:00:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jason Rumney <jasonr <at> gnu.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com. (Mon, 05 Jan 2009 14:00:03 GMT) Full text and rfc822 format available.

Message #124 received at 870 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Jason Rumney <jasonr <at> gnu.org>
To: Juanma Barranquero <lekktu <at> gmail.com>
Cc: 870 <at> debbugs.gnu.org, Emacs Devel <emacs-devel <at> gnu.org>
Subject: Re: bug#870: Repeatable instance of bug#870
Date: Mon, 05 Jan 2009 21:50:06 +0800
Juanma Barranquero wrote:
> After rereading the file, in Emacs it shows as:
>
> 	* time-stamp.el:^M	* time.el:
>
> which I interpret as if, while reading, the ^M was read without ^L and
> so taken literally, while the ^L was missing.
>
> Then, if I write it back, the file on disk contains
>
> 0000 7ff0 20 74 69 6d 65 2d 73 74  61 6d 70 2e 65 6c 3a 0d   time-stamp.el:.
> 0000 8000 09 2a 20 74 69 6d 65 2e  65 6c 3a 0d 0a 09 2a 20  .* time.el:...*
>
> so a LF has gone missing.
>   

Yes, you're right it is a LF (^J) that has gone missing - I was 
confused. So maybe I am wrong about exactly what happens in that part of 
the decode functions - maybe the CR does get written to the buffer, but 
the following LF is somehow swallowed.





Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com:
bug#870; Package emacs,w32. (Mon, 05 Jan 2009 14:35:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Juanma Barranquero" <lekktu <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com. (Mon, 05 Jan 2009 14:35:03 GMT) Full text and rfc822 format available.

Message #129 received at 870 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Juanma Barranquero" <lekktu <at> gmail.com>
To: "Jason Rumney" <jasonr <at> gnu.org>
Cc: 870 <at> debbugs.gnu.org, "Emacs Devel" <emacs-devel <at> gnu.org>
Subject: Re: bug#870: Repeatable instance of bug#870
Date: Mon, 5 Jan 2009 15:28:25 +0100
On Mon, Jan 5, 2009 at 14:50, Jason Rumney <jasonr <at> gnu.org> wrote:

> So
> maybe I am wrong about exactly what happens in that part of the decode
> functions - maybe the CR does get written to the buffer, but the following
> LF is somehow swallowed.

The bug does not happen on encoding (for writing), because it is
already visible after re-decoding (I mean, after desktop.el applies
buffer-file-coding-system, or after the
revert-buffer-with-coding-system call in your example). Once the
buffer has the lone ^M, it's no wonder it ends up in the file after
writing.

I think you're right that the problem is related to decoding a CRLF
when the pair crosses a buffer boundary.

    Juanma




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com:
bug#870; Package emacs,w32. (Wed, 07 Jan 2009 01:15:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Kenichi Handa <handa <at> m17n.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com. (Wed, 07 Jan 2009 01:15:04 GMT) Full text and rfc822 format available.

Message #134 received at 870 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Kenichi Handa <handa <at> m17n.org>
To: Jason Rumney <jasonr <at> gnu.org>
Cc: lekktu <at> gmail.com, 870 <at> debbugs.gnu.org, emacs-devel <at> gnu.org
Subject: Re: bug#870: Repeatable instance of bug#870
Date: Wed, 07 Jan 2009 10:07:02 +0900
In article <4961E7F7.2000509 <at> gnu.org>, Jason Rumney <jasonr <at> gnu.org> writes:

> Juanma Barranquero wrote:
> >    emacs -Q --eval "(desktop-save-mode 1)" ChangeLog.870
> >   

> I can also reproduce the bug with C-x RET r utf-8-dos after visiting the 
> file normally.

I can reproduce it by that recipe.

> It appears that there is a bug in all the decode_coding_* functions when 
> a CR lies on a CHARBUF_SIZE (0x4000) boundary with a matching LF on the 
> other side of the boundary.

> They all do something like:

>       if (eol_crlf && c1 == '\r')
>         ONE_MORE_BYTE (byte_after_cr);

> but ONE_MORE_BYTE will abort the decode if it reaches the end of the 
> buffer, leaving the CR in limbo between having been read and being added 
> to the buffer. Then on decoding the subsequent block, the initial LF 
> does not trip the normal CRLF decoding, so it is put into the buffer.

??? decode_coding_* gets bytes from coding->source and
produces characters in CHARBUF.  So, I think the above
analysis is not correct.

As normal visiting of ChangeLog.870 doesn't have the problem
but revisiting it causes the problem, I think the bug is in
Finsert_file_contents; perhaps in the handling of REPLACE.
I'll have a look at it.

---
Kenichi Handa
handa <at> m17n.org




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com:
bug#870; Package emacs,w32. (Wed, 07 Jan 2009 07:00:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Kenichi Handa <handa <at> m17n.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com. (Wed, 07 Jan 2009 07:00:03 GMT) Full text and rfc822 format available.

Message #139 received at 870 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Kenichi Handa <handa <at> m17n.org>
To: Kenichi Handa <handa <at> m17n.org>
Cc: jasonr <at> gnu.org, lekktu <at> gmail.com, 870 <at> debbugs.gnu.org,
        emacs-devel <at> gnu.org
Subject: Re: bug#870: Repeatable instance of bug#870
Date: Wed, 07 Jan 2009 15:53:48 +0900
In article <E1LKMsw-0005wG-G6 <at> etlken.m17n.org>, Kenichi Handa <handa <at> m17n.org> writes:

> > It appears that there is a bug in all the decode_coding_* functions when 
> > a CR lies on a CHARBUF_SIZE (0x4000) boundary with a matching LF on the 
> > other side of the boundary.

> > They all do something like:

> >       if (eol_crlf && c1 == '\r')
> >         ONE_MORE_BYTE (byte_after_cr);

> > but ONE_MORE_BYTE will abort the decode if it reaches the end of the 
> > buffer, leaving the CR in limbo between having been read and being added 
> > to the buffer. Then on decoding the subsequent block, the initial LF 
> > does not trip the normal CRLF decoding, so it is put into the buffer.

> ??? decode_coding_* gets bytes from coding->source and
> produces characters in CHARBUF.  So, I think the above
> analysis is not correct.

> As normal visiting of ChangeLog.870 doesn't have the problem
> but revisiting it causes the problem, I think the bug is in
> Finsert_file_contents; perhaps in the handling of REPLACE.
> I'll have a look at it.

I fixed the bug.  Actually what wrong was decode_coding_*
but in the different place as above.

---
Kenichi Handa
handa <at> m17n.org




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com:
bug#870; Package emacs,w32. (Wed, 07 Jan 2009 08:25:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to martin rudalics <rudalics <at> gmx.at>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com. (Wed, 07 Jan 2009 08:25:06 GMT) Full text and rfc822 format available.

Message #144 received at 870 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Kenichi Handa <handa <at> m17n.org>
Cc: 870 <at> debbugs.gnu.org
Subject: Re: bug#870: Repeatable instance of bug#870
Date: Wed, 07 Jan 2009 09:19:11 +0100
>> As normal visiting of ChangeLog.870 doesn't have the problem
>> but revisiting it causes the problem, I think the bug is in
>> Finsert_file_contents; perhaps in the handling of REPLACE.
>> I'll have a look at it.
>
> I fixed the bug.  Actually what wrong was decode_coding_*
> but in the different place as above.

Handa-san, while you're there could you please also have a look at
bug#1039?  Maybe it's related to the present issue.

Thank you, martin.




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com:
bug#870; Package emacs,w32. (Wed, 07 Jan 2009 09:50:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Juanma Barranquero" <lekktu <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com. (Wed, 07 Jan 2009 09:50:03 GMT) Full text and rfc822 format available.

Message #149 received at 870 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Juanma Barranquero" <lekktu <at> gmail.com>
To: "Kenichi Handa" <handa <at> m17n.org>
Cc: jasonr <at> gnu.org, 870 <at> debbugs.gnu.org, emacs-devel <at> gnu.org
Subject: Re: bug#870: Repeatable instance of bug#870
Date: Wed, 7 Jan 2009 10:43:46 +0100
On Wed, Jan 7, 2009 at 07:53, Kenichi Handa <handa <at> m17n.org> wrote:

> I fixed the bug.

Thanks! (I've been suffering this #$@!&* for the past eight months or so.)

I've added the "(Bug#870)" ref to your ChangeLog entry.

    Juanma




Reply sent to Jason Rumney <jasonr <at> gnu.org>:
You have taken responsibility. (Wed, 07 Jan 2009 11:00:03 GMT) Full text and rfc822 format available.

Notification sent to "Juanma Barranquero" <lekktu <at> gmail.com>:
bug acknowledged by developer. (Wed, 07 Jan 2009 11:00:03 GMT) Full text and rfc822 format available.

Message #154 received at 870-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Jason Rumney <jasonr <at> gnu.org>
To: Juanma Barranquero <lekktu <at> gmail.com>
Cc: Kenichi Handa <handa <at> m17n.org>, 870-done <at> debbugs.gnu.org
Subject: Re: bug#870: Repeatable instance of bug#870
Date: Wed, 07 Jan 2009 18:54:10 +0800
Juanma Barranquero wrote:
> Thanks! (I've been suffering this #$@!&* for the past eight months or so.)
>   

As usual, a repeatable test case helps a lot more than a mysterious 
occurrence that a few people have seen but noone can explain.

> I've added the "(Bug#870)" ref to your ChangeLog entry.
>   

And I've added "-done" to the bug-address Cc to close the bug report 
(and removed emacs-devel to cut down on the duplicates that end up on 
the list).





Message #155 received at 870-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Juanma Barranquero" <lekktu <at> gmail.com>
To: "Jason Rumney" <jasonr <at> gnu.org>
Cc: "Kenichi Handa" <handa <at> m17n.org>, 870-done <at> debbugs.gnu.org
Subject: Re: bug#870: Repeatable instance of bug#870
Date: Wed, 7 Jan 2009 12:01:23 +0100
On Wed, Jan 7, 2009 at 11:54, Jason Rumney <jasonr <at> gnu.org> wrote:

> As usual, a repeatable test case helps a lot more than a mysterious
> occurrence that a few people have seen but noone can explain.

I know. That's what I was so happy to have been able to find a test case. :)

> And I've added "-done" to the bug-address Cc to close the bug report.

I was going to send a -done message. Thanks.

However, for the past few days (since 2008/01/04 or so)
NNN-done <at> emacsbugs messages seem to be ignored, though messages to
control <at> emacsbugs do work.

    Juanma




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com:
bug#870; Package emacs,w32. (Wed, 07 Jan 2009 11:20:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jason Rumney <jasonr <at> gnu.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com. (Wed, 07 Jan 2009 11:20:03 GMT) Full text and rfc822 format available.

Message #160 received at 870 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Jason Rumney <jasonr <at> gnu.org>
To: Juanma Barranquero <lekktu <at> gmail.com>
Cc: Kenichi Handa <handa <at> m17n.org>, 870 <at> debbugs.gnu.org
Subject: Re: bug#870: Repeatable instance of bug#870
Date: Wed, 07 Jan 2009 19:10:22 +0800
Juanma Barranquero wrote:
> However, for the past few days (since 2008/01/04 or so)
> NNN-done <at> emacsbugs messages seem to be ignored, though messages to
> control <at> emacsbugs do work.
>   

I haven't noticed that - it seems to have worked in this case. Maybe 
something has been changed to automatically reopen reports when a 
subsequent mail is received on the original report address. If so, I 
think it is a degradation, as often such messages are background chit 
chat about other side issues, if someone really reports that the fix 
does not work, then the bug can be reopened through the control address.





Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com:
bug#870; Package emacs,w32. (Wed, 07 Jan 2009 12:35:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Kenichi Handa <handa <at> m17n.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com. (Wed, 07 Jan 2009 12:35:03 GMT) Full text and rfc822 format available.

Message #165 received at 870 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Kenichi Handa <handa <at> m17n.org>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 870 <at> debbugs.gnu.org
Subject: Re: bug#870: Repeatable instance of bug#870
Date: Wed, 07 Jan 2009 21:29:59 +0900
In article <4964657F.5010205 <at> gmx.at>, martin rudalics <rudalics <at> gmx.at> writes:

>>> As normal visiting of ChangeLog.870 doesn't have the problem
>>> but revisiting it causes the problem, I think the bug is in
>>> Finsert_file_contents; perhaps in the handling of REPLACE.
>>> I'll have a look at it.
> 
> I fixed the bug.  Actually what wrong was decode_coding_*
> but in the different place as above.

> Handa-san, while you're there could you please also have a look at
> bug#1039?  Maybe it's related to the present issue.

I installed a fix.  It was a different issue.

2009-01-07  Kenichi Handa  <handa <at> m17n.org>

	* fileio.c (Finsert_file_contents): In the case of replace,
	remeber the coding system used for decoding in
	coding_system (Bug#1039).

---
Kenichi Handa
handa <at> m17n.org






Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com:
bug#870; Package emacs,w32. (Wed, 07 Jan 2009 15:40:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to martin rudalics <rudalics <at> gmx.at>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com. (Wed, 07 Jan 2009 15:40:06 GMT) Full text and rfc822 format available.

Message #170 received at 870 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Kenichi Handa <handa <at> m17n.org>
Cc: 870 <at> debbugs.gnu.org
Subject: Re: bug#870: Repeatable instance of bug#870
Date: Wed, 07 Jan 2009 16:33:56 +0100
> I installed a fix.  It was a different issue.
>
> 2009-01-07  Kenichi Handa  <handa <at> m17n.org>
>
> 	* fileio.c (Finsert_file_contents): In the case of replace,
> 	remeber the coding system used for decoding in
> 	coding_system (Bug#1039).

Thanks for taking care of this.  Your fix solves the problem for me
though I'm not sure whether it fixes the issue raised by Peter:

> That patch fixes the bug I reported, but it creates a new one: if you
> change the EOL convention outside of emacs, revert-buffer no longer
> detects this. To reproduce:
> printf "hello\r\nworld\r\n" > hello
> emacs -Q hello &
> printf "hello\rworld\r" > hello
> M-x revert-buffer
> # emacs still sees DOS newlines

In particular, when I visit a file, (1) save it with a different line
ending, (2) change the line ending outside this instance of Emacs, and
(3) revert the buffer, its line ending is the one saved in (1) and not
the one from (2).  But IIUC Emacs 22 didn't handle this either.

martin




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com:
bug#870; Package emacs,w32. (Tue, 13 Jan 2009 02:40:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Kenichi Handa <handa <at> m17n.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com. (Tue, 13 Jan 2009 02:40:04 GMT) Full text and rfc822 format available.

Message #175 received at 870 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Kenichi Handa <handa <at> m17n.org>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 870 <at> debbugs.gnu.org
Subject: Re: bug#870: Repeatable instance of bug#870
Date: Tue, 13 Jan 2009 11:30:16 +0900
In article <4964CB64.2090506 <at> gmx.at>, martin rudalics <rudalics <at> gmx.at> writes:

> Thanks for taking care of this.  Your fix solves the problem for me
> though I'm not sure whether it fixes the issue raised by Peter:

> That patch fixes the bug I reported, but it creates a new one: if you
> change the EOL convention outside of emacs, revert-buffer no longer
> detects this. To reproduce:
> printf "hello\r\nworld\r\n" > hello
> emacs -Q hello &
> printf "hello\rworld\r" > hello
> M-x revert-buffer
> # emacs still sees DOS newlines

As I can't reproduce the above problem, I think the bug is fixed.

> In particular, when I visit a file, (1) save it with a different line
> ending, (2) change the line ending outside this instance of Emacs, and
> (3) revert the buffer, its line ending is the one saved in (1) and not
> the one from (2).  But IIUC Emacs 22 didn't handle this either.

By (1), the variable buffer-file-coding-system-explicit is
set to XXX, and, in such a case, revert-buffer binds
coding-system-for-read to XXX to respect your decision made
by (1).

I'm not sure this behavior is a bug.

---
Kenichi Handa
handa <at> m17n.org




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com:
bug#870; Package emacs,w32. (Tue, 13 Jan 2009 04:15:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Eli Zaretskii <eliz <at> gnu.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com. (Tue, 13 Jan 2009 04:15:03 GMT) Full text and rfc822 format available.

Message #180 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Kenichi Handa <handa <at> m17n.org>, 870 <at> debbugs.gnu.org
Cc: rudalics <at> gmx.at, bug-gnu-emacs <at> gnu.org
Subject: Re: bug#870: Repeatable instance of bug#870
Date: Tue, 13 Jan 2009 06:06:04 +0200
> From: Kenichi Handa <handa <at> m17n.org>
> Date: Tue, 13 Jan 2009 11:30:16 +0900
> Cc: 870 <at> emacsbugs.donarmstrong.com
> 
> > In particular, when I visit a file, (1) save it with a different line
> > ending, (2) change the line ending outside this instance of Emacs, and
> > (3) revert the buffer, its line ending is the one saved in (1) and not
> > the one from (2).  But IIUC Emacs 22 didn't handle this either.
> 
> By (1), the variable buffer-file-coding-system-explicit is
> set to XXX, and, in such a case, revert-buffer binds
> coding-system-for-read to XXX to respect your decision made
> by (1).
> 
> I'm not sure this behavior is a bug.

It isn't.





Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com:
bug#870; Package emacs,w32. (Tue, 13 Jan 2009 04:15:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Eli Zaretskii <eliz <at> gnu.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com. (Tue, 13 Jan 2009 04:15:04 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> emacsbugs.donarmstrong.com. (Tue, 10 Feb 2009 15:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 16 years and 128 days ago.

Previous Next


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