unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* remove leim/leim-list.el for make bootstrap?
@ 2009-03-20  5:00 Miles Bader
  2009-03-20 10:41 ` Eli Zaretskii
  2009-03-20 21:43 ` Stefan Monnier
  0 siblings, 2 replies; 26+ messages in thread
From: Miles Bader @ 2009-03-20  5:00 UTC (permalink / raw)
  To: emacs-devel

I had a problem building emacs because leim/leim-list.el was corrupted
somehow.  It took me a fair bit of time to realize the problem, and
"make bootstrap" didn't help.  The solution I eventually found was
simply to remove the file.  So I wonder, should make bootstrap remove
that file?

Thanks,

-Miles

-- 
Congratulation, n. The civility of envy.





^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remove leim/leim-list.el for make bootstrap?
  2009-03-20  5:00 remove leim/leim-list.el for make bootstrap? Miles Bader
@ 2009-03-20 10:41 ` Eli Zaretskii
  2009-03-20 11:39   ` Andreas Schwab
  2009-03-20 21:43 ` Stefan Monnier
  1 sibling, 1 reply; 26+ messages in thread
From: Eli Zaretskii @ 2009-03-20 10:41 UTC (permalink / raw)
  To: Miles Bader; +Cc: emacs-devel

> From: Miles Bader <miles@gnu.org>
> Date: Fri, 20 Mar 2009 14:00:58 +0900
> 
> I had a problem building emacs because leim/leim-list.el was corrupted
> somehow.  It took me a fair bit of time to realize the problem, and
> "make bootstrap" didn't help.  The solution I eventually found was
> simply to remove the file.

I had the same problem yesterday, but since the build was running
unattended, I thought it was due to some snafu during generation of
leim-list.el.  Sounds like the reason is deeper than that.  I solved
the problem by removing the file, just as you did.

> So I wonder, should make bootstrap remove that file?

In my case, I didn't need a  bootstrap after removing the file, just
to run "make".  So I'd like to understand the reason for the problem
before we decide how to solve it.  If you managed to figure out the
reason for corruption, could you please explain it?




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remove leim/leim-list.el for make bootstrap?
  2009-03-20 10:41 ` Eli Zaretskii
@ 2009-03-20 11:39   ` Andreas Schwab
  2009-03-20 12:36     ` Eli Zaretskii
  0 siblings, 1 reply; 26+ messages in thread
From: Andreas Schwab @ 2009-03-20 11:39 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel, Miles Bader

Eli Zaretskii <eliz@gnu.org> writes:

> If you managed to figure out the reason for corruption, could you
> please explain it?

The coding has changed from iso-2022-7bit to utf-8, but existing
contents were not converted.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remove leim/leim-list.el for make bootstrap?
  2009-03-20 11:39   ` Andreas Schwab
@ 2009-03-20 12:36     ` Eli Zaretskii
  2009-03-20 12:50       ` Eli Zaretskii
  2009-03-20 13:14       ` Andreas Schwab
  0 siblings, 2 replies; 26+ messages in thread
From: Eli Zaretskii @ 2009-03-20 12:36 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: emacs-devel, miles

> From: Andreas Schwab <schwab@linux-m68k.org>
> Cc: Miles Bader <miles@gnu.org>,  emacs-devel@gnu.org
> Date: Fri, 20 Mar 2009 12:39:47 +0100
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > If you managed to figure out the reason for corruption, could you
> > please explain it?
> 
> The coding has changed from iso-2022-7bit to utf-8, but existing
> contents were not converted.

Thanks, but there's still something strange here.  First,
leim/Makefile.in removes leim-list.el and then rebuilds it:

    leim-list.el: ${SUBDIRS} ${TIT-MISC} changed.tit changed.misc ${srcdir}/leim-ext.el
	    rm -rf leim-list.el
	    ${RUN-EMACS}  -l ${buildlisppath}/international/quail \
	      -f batch-byte-compile-if-not-done ${TIT-MISC:.elc=.el}
	    if [ x`(cd ${srcdir} && /bin/pwd)` = x`(/bin/pwd)` ] ; then \
	      ${RUN-EMACS} -l ${buildlisppath}/international/quail \
		--eval "(update-leim-list-file \".\")" ; \
	    else \
	      ${RUN-EMACS} -l ${buildlisppath}/international/quail \
		--eval "(update-leim-list-file \".\" \"${srcdir}\")" ; \
	    fi
	    sed -n '/^[^;]/ p' < ${srcdir}/leim-ext.el >> $@

So any existing contents should be gone.

Second, even if leim-list.el would somehow survive from the previous
build, and some of its previous contents would have been left behind
after the following fragment from quail.el removes all of its entries
that have 'quail-use-package in the register-input-method form:

	;; Remove all entries for Quail.
	(while (re-search-forward leim-list-entry-regexp nil 'move)
	  (goto-char (match-beginning 0))
	  (setq pos (point))
	  (condition-case nil
	      (let ((form (read list-buf)))
		(when (equal (nth 3 form) ''quail-use-package)
		  (if (eolp) (forward-line 1))
		  (delete-region pos (point))))

still, writing out of the file, viz.:

    ;; At last, write out LEIM list file.
    (with-current-buffer list-buf
      (let ((coding-system-for-write 'utf-8))
	(save-buffer 0)))

should have encoded anything left in UTF-8, since
quail-update-leim-list-file works on decoded text, not on the original
encoded text as it resides on disk, right?

And the Sed command that appends leim-ext.el to the just-produced
leim-list.el could not be the source of the problem, either, because
Handa-san converted leim-ext.el to UTF-8.

What am I missing?




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remove leim/leim-list.el for make bootstrap?
  2009-03-20 12:36     ` Eli Zaretskii
@ 2009-03-20 12:50       ` Eli Zaretskii
  2009-03-20 13:15         ` Stefan Monnier
  2009-03-20 13:14       ` Andreas Schwab
  1 sibling, 1 reply; 26+ messages in thread
From: Eli Zaretskii @ 2009-03-20 12:50 UTC (permalink / raw)
  To: schwab, emacs-devel, miles

> Date: Fri, 20 Mar 2009 14:36:09 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: emacs-devel@gnu.org, miles@gnu.org
> 
> What am I missing?

Looks like some bug in `insert', which happens when the buffer from
which the quail-define-package form was read is in iso-2022-7bit and
the buffer into which the text is inserted is also iso-2022-7bit:
could it be that the inserted text is not decoded into the internal
representation, so that encoding it in utf-8 still leaves behind
ISO-2022 escapes?




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remove leim/leim-list.el for make bootstrap?
  2009-03-20 12:36     ` Eli Zaretskii
  2009-03-20 12:50       ` Eli Zaretskii
@ 2009-03-20 13:14       ` Andreas Schwab
  2009-03-20 15:13         ` Eli Zaretskii
  2009-03-20 16:13         ` Stefan Monnier
  1 sibling, 2 replies; 26+ messages in thread
From: Andreas Schwab @ 2009-03-20 13:14 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel, miles

Eli Zaretskii <eliz@gnu.org> writes:

> still, writing out of the file, viz.:
>
>     ;; At last, write out LEIM list file.
>     (with-current-buffer list-buf
>       (let ((coding-system-for-write 'utf-8))
> 	(save-buffer 0)))
>
> should have encoded anything left in UTF-8, since
> quail-update-leim-list-file works on decoded text, not on the original
> encoded text as it resides on disk, right?
>
> And the Sed command that appends leim-ext.el to the just-produced
> leim-list.el could not be the source of the problem, either, because
> Handa-san converted leim-ext.el to UTF-8.
>
> What am I missing?

I think it can happen that the Emacs that wrote leim-list.el used an
outdated version of international/quail.elc, so the contents were forced
to be written in iso-2022-7bit, although the coding tag already says
utf-8.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remove leim/leim-list.el for make bootstrap?
  2009-03-20 12:50       ` Eli Zaretskii
@ 2009-03-20 13:15         ` Stefan Monnier
  2009-03-20 15:20           ` Eli Zaretskii
  0 siblings, 1 reply; 26+ messages in thread
From: Stefan Monnier @ 2009-03-20 13:15 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: miles, schwab, emacs-devel

>> What am I missing?
> Looks like some bug in `insert', which happens when the buffer from
> which the quail-define-package form was read is in iso-2022-7bit and
> the buffer into which the text is inserted is also iso-2022-7bit:
> could it be that the inserted text is not decoded into the internal
> representation, so that encoding it in utf-8 still leaves behind
> ISO-2022 escapes?

Indeed, the problem I saw was that the generated file was marked as
"utf-8" but contained iso-2022 encoded text, so there might be something
like that going on.  But `insert' doesn't decode/encode.  OTOH maybe
it's linked to the `charset' text-property we keep on such text to partly
de-unify the CJK chars, so they can be saved back.

OTOH, trying to do such copying (e.g. from lisp/language/chinese.el to
a utf-8 file) doesn't seem to be able to reproduce the bug.


        Stefan




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remove leim/leim-list.el for make bootstrap?
  2009-03-20 13:14       ` Andreas Schwab
@ 2009-03-20 15:13         ` Eli Zaretskii
  2009-03-20 15:46           ` Andreas Schwab
  2009-03-20 16:13         ` Stefan Monnier
  1 sibling, 1 reply; 26+ messages in thread
From: Eli Zaretskii @ 2009-03-20 15:13 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: emacs-devel, miles

> From: Andreas Schwab <schwab@linux-m68k.org>
> Cc: miles@gnu.org,  emacs-devel@gnu.org
> Date: Fri, 20 Mar 2009 14:14:27 +0100
> 
> I think it can happen that the Emacs that wrote leim-list.el used an
> outdated version of international/quail.elc, so the contents were forced
> to be written in iso-2022-7bit, although the coding tag already says
> utf-8.

Well, quail.el didn't (and doesn't) explicitly modify the coding tag,
so it was rewritten only when the buffer is saved.  But I think you
are right in pointing out the root cause: a stale quail.elc.  What it
caused is that leim-list.el was written out as iso-2022-7bit, but then
portions of leim-ext.el, which was already in UTF-8, were appended to
it, which made the file inconsistently encoded (since Sed just copies
raw bytes).




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remove leim/leim-list.el for make bootstrap?
  2009-03-20 13:15         ` Stefan Monnier
@ 2009-03-20 15:20           ` Eli Zaretskii
  2009-03-20 20:22             ` Stefan Monnier
  2009-03-23  3:56             ` Kenichi Handa
  0 siblings, 2 replies; 26+ messages in thread
From: Eli Zaretskii @ 2009-03-20 15:20 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: miles, schwab, emacs-devel

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: schwab@linux-m68k.org,  emacs-devel@gnu.org,  miles@gnu.org
> Date: Fri, 20 Mar 2009 09:15:58 -0400
> 
> >> What am I missing?
> > Looks like some bug in `insert', which happens when the buffer from
> > which the quail-define-package form was read is in iso-2022-7bit and
> > the buffer into which the text is inserted is also iso-2022-7bit:
> > could it be that the inserted text is not decoded into the internal
> > representation, so that encoding it in utf-8 still leaves behind
> > ISO-2022 escapes?
> 
> Indeed, the problem I saw was that the generated file was marked as
> "utf-8" but contained iso-2022 encoded text

Actually, I think it was the other way around: the generated file had
the iso-2022-7bit coding tag, but included a UTF-8 encoded text from
leim-ext.el.

> But `insert' doesn't decode/encode.

I don't have any real evidence, I was just desperate to provide some
explanation.  I think Andreas found the _real_ reason: a stale
quail.elc.  Although, since Miles said even a bootstrap didn't help,
perhaps there's something else at work here.

Btw, since we remove leim-list.el before updating it, why does
quail-update-leim-list-file works so hard to remove some parts of it,
identify garbled lines, etc.?  Isn't all that just a waste of cycles?




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remove leim/leim-list.el for make bootstrap?
  2009-03-20 15:13         ` Eli Zaretskii
@ 2009-03-20 15:46           ` Andreas Schwab
  2009-03-20 18:08             ` Eli Zaretskii
  0 siblings, 1 reply; 26+ messages in thread
From: Andreas Schwab @ 2009-03-20 15:46 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel, miles

Eli Zaretskii <eliz@gnu.org> writes:

> Well, quail.el didn't (and doesn't) explicitly modify the coding tag,

The coding tag is included in leim-list-header defined in
international/mule-cmds.el, which is preloaded, thus always up-to-date.

> but then portions of leim-ext.el, which was already in UTF-8, were
> appended to it, which made the file inconsistently encoded (since Sed
> just copies raw bytes).

This is irrelevant, since the damage has already happend.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remove leim/leim-list.el for make bootstrap?
  2009-03-20 13:14       ` Andreas Schwab
  2009-03-20 15:13         ` Eli Zaretskii
@ 2009-03-20 16:13         ` Stefan Monnier
  2009-03-23  2:47           ` Kenichi Handa
  1 sibling, 1 reply; 26+ messages in thread
From: Stefan Monnier @ 2009-03-20 16:13 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Eli Zaretskii, miles, emacs-devel

> I think it can happen that the Emacs that wrote leim-list.el used an
> outdated version of international/quail.elc, so the contents were forced
> to be written in iso-2022-7bit, although the coding tag already says
> utf-8.

I think you found the culprit.


        Stefan




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remove leim/leim-list.el for make bootstrap?
  2009-03-20 15:46           ` Andreas Schwab
@ 2009-03-20 18:08             ` Eli Zaretskii
  2009-03-20 18:47               ` Andreas Schwab
  2009-03-23  2:51               ` Kenichi Handa
  0 siblings, 2 replies; 26+ messages in thread
From: Eli Zaretskii @ 2009-03-20 18:08 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: emacs-devel, miles

> From: Andreas Schwab <schwab@linux-m68k.org>
> Cc: miles@gnu.org,  emacs-devel@gnu.org
> Date: Fri, 20 Mar 2009 16:46:21 +0100
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > Well, quail.el didn't (and doesn't) explicitly modify the coding tag,
> 
> The coding tag is included in leim-list-header defined in
> international/mule-cmds.el, which is preloaded, thus always up-to-date.

You are right.  But then Emacs should have complained, as it always
does when you try to save a buffer with encoding that goes against the
coding tag.  Why didn't it?




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remove leim/leim-list.el for make bootstrap?
  2009-03-20 18:08             ` Eli Zaretskii
@ 2009-03-20 18:47               ` Andreas Schwab
  2009-03-20 21:05                 ` Eli Zaretskii
  2009-03-23  2:51               ` Kenichi Handa
  1 sibling, 1 reply; 26+ messages in thread
From: Andreas Schwab @ 2009-03-20 18:47 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel, miles

Eli Zaretskii <eliz@gnu.org> writes:

> But then Emacs should have complained, as it always does when you try
> to save a buffer with encoding that goes against the coding tag.

Where does it do that?

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remove leim/leim-list.el for make bootstrap?
  2009-03-20 15:20           ` Eli Zaretskii
@ 2009-03-20 20:22             ` Stefan Monnier
  2009-03-23  3:56             ` Kenichi Handa
  1 sibling, 0 replies; 26+ messages in thread
From: Stefan Monnier @ 2009-03-20 20:22 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: miles, schwab, emacs-devel

>> Indeed, the problem I saw was that the generated file was marked as
>> "utf-8" but contained iso-2022 encoded text
> Actually, I think it was the other way around: the generated file had
> the iso-2022-7bit coding tag, but included a UTF-8 encoded text from
> leim-ext.el.

Maybe there were several ways for this transition to wreak havoc:
my broken file clearly had a utf-8 coding tag at the top.


        Stefan




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remove leim/leim-list.el for make bootstrap?
  2009-03-20 18:47               ` Andreas Schwab
@ 2009-03-20 21:05                 ` Eli Zaretskii
  0 siblings, 0 replies; 26+ messages in thread
From: Eli Zaretskii @ 2009-03-20 21:05 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: emacs-devel, miles

> From: Andreas Schwab <schwab@linux-m68k.org>
> Cc: miles@gnu.org,  emacs-devel@gnu.org
> Date: Fri, 20 Mar 2009 19:47:48 +0100
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > But then Emacs should have complained, as it always does when you try
> > to save a buffer with encoding that goes against the coding tag.
> 
> Where does it do that?

In `select-safe-coding-system'.




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remove leim/leim-list.el for make bootstrap?
  2009-03-20  5:00 remove leim/leim-list.el for make bootstrap? Miles Bader
  2009-03-20 10:41 ` Eli Zaretskii
@ 2009-03-20 21:43 ` Stefan Monnier
  1 sibling, 0 replies; 26+ messages in thread
From: Stefan Monnier @ 2009-03-20 21:43 UTC (permalink / raw)
  To: Miles Bader; +Cc: emacs-devel

> I had a problem building emacs because leim/leim-list.el was corrupted
> somehow.  It took me a fair bit of time to realize the problem, and
> "make bootstrap" didn't help.  The solution I eventually found was
> simply to remove the file.  So I wonder, should make bootstrap remove
> that file?

"make bootstrap" worked for me.  And it seems that this only depends on
emacs/Makefile.in and emacs/leim/Makefile.in (together they cause "make
bootstrap" to remove leim/leim-list.el) neither of which have been
changed recently.


        Stefan





^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remove leim/leim-list.el for make bootstrap?
  2009-03-20 16:13         ` Stefan Monnier
@ 2009-03-23  2:47           ` Kenichi Handa
  2009-03-23  3:12             ` Miles Bader
  2009-03-23  4:16             ` Eli Zaretskii
  0 siblings, 2 replies; 26+ messages in thread
From: Kenichi Handa @ 2009-03-23  2:47 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: eliz, emacs-devel, schwab, miles

In article <jwv63i49nrh.fsf-monnier+emacs@gnu.org>, Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

> > I think it can happen that the Emacs that wrote leim-list.el used an
> > outdated version of international/quail.elc, so the contents were forced
> > to be written in iso-2022-7bit, although the coding tag already says
> > utf-8.

> I think you found the culprit.

I can't reproduce that problem.  To confirm what is wrong, I
did this:

% mkdir tmp
% cd tmp
## Checkout the version before I changed encoding of leim-list.el.
% cvs co -D 2009-03-18 emacs
% cd emacs
% configure
% make
## At this time, leim-list.el is in iso-2022-7bit
## Now update the working directory to the latest version.
% cvs update -AdP
% make
## Now leim-list.el is correctly build with utf-8 encoding.

So, I see no problem?!?

---
Kenichi Handa
handa@m17n.org




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remove leim/leim-list.el for make bootstrap?
  2009-03-20 18:08             ` Eli Zaretskii
  2009-03-20 18:47               ` Andreas Schwab
@ 2009-03-23  2:51               ` Kenichi Handa
  2009-03-23  4:18                 ` Eli Zaretskii
  1 sibling, 1 reply; 26+ messages in thread
From: Kenichi Handa @ 2009-03-23  2:51 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: miles, schwab, emacs-devel

In article <umybgoyn2.fsf@gnu.org>, Eli Zaretskii <eliz@gnu.org> writes:

> > From: Andreas Schwab <schwab@linux-m68k.org>
> > Cc: miles@gnu.org,  emacs-devel@gnu.org
> > Date: Fri, 20 Mar 2009 16:46:21 +0100
> > 
> > Eli Zaretskii <eliz@gnu.org> writes:
> > 
> > > Well, quail.el didn't (and doesn't) explicitly modify the coding tag,
> > 
> > The coding tag is included in leim-list-header defined in
> > international/mule-cmds.el, which is preloaded, thus always up-to-date.

> You are right.  But then Emacs should have complained, as it always
> does when you try to save a buffer with encoding that goes against the
> coding tag.  Why didn't it?

quail-update-leim-list-file (quail.el) does modify the
coding tag as this:

      ;; Insert the correct header.
      (if (looking-at (regexp-quote leim-list-header))
	  (goto-char (match-end 0))
	(insert leim-list-header))

Here, leim-list-header is defined in mule-cmds.el, and was
changed to contain utf-8 coding tag.

---
Kenichi Handa
handa@m17n.org




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remove leim/leim-list.el for make bootstrap?
  2009-03-23  2:47           ` Kenichi Handa
@ 2009-03-23  3:12             ` Miles Bader
  2009-03-23  4:19               ` Eli Zaretskii
  2009-03-23  4:16             ` Eli Zaretskii
  1 sibling, 1 reply; 26+ messages in thread
From: Miles Bader @ 2009-03-23  3:12 UTC (permalink / raw)
  To: Kenichi Handa; +Cc: eliz, schwab, Stefan Monnier, emacs-devel

Kenichi Handa <handa@m17n.org> writes:
> ## Now leim-list.el is correctly build with utf-8 encoding.
>
> So, I see no problem?!?

FWIW, I use a separate build-dir.
[I don't know why that would make a difference, but ...]

-Miles

-- 
Discriminate, v.i. To note the particulars in which one person or thing is,
if possible, more objectionable than another.




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remove leim/leim-list.el for make bootstrap?
  2009-03-20 15:20           ` Eli Zaretskii
  2009-03-20 20:22             ` Stefan Monnier
@ 2009-03-23  3:56             ` Kenichi Handa
  1 sibling, 0 replies; 26+ messages in thread
From: Kenichi Handa @ 2009-03-23  3:56 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel, schwab, monnier, miles

In article <uprgcp6f1.fsf@gnu.org>, Eli Zaretskii <eliz@gnu.org> writes:

> Btw, since we remove leim-list.el before updating it, why does
> quail-update-leim-list-file works so hard to remove some parts of it,
> identify garbled lines, etc.?  Isn't all that just a waste of cycles?

Because quail-update-leim-list-file is designed to be used
even for a non-empty leim-list.el.  That's why its name
contains "update" instead of "create".

---
Kenichi Handa
handa@m17n.org




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remove leim/leim-list.el for make bootstrap?
  2009-03-23  2:47           ` Kenichi Handa
  2009-03-23  3:12             ` Miles Bader
@ 2009-03-23  4:16             ` Eli Zaretskii
  2009-03-27  7:02               ` Kenichi Handa
  1 sibling, 1 reply; 26+ messages in thread
From: Eli Zaretskii @ 2009-03-23  4:16 UTC (permalink / raw)
  To: Kenichi Handa; +Cc: emacs-devel, schwab, monnier, miles

> From: Kenichi Handa <handa@m17n.org>
> CC: schwab@linux-m68k.org, eliz@gnu.org, miles@gnu.org, emacs-devel@gnu.org
> Date: Mon, 23 Mar 2009 11:47:30 +0900
> 
> % mkdir tmp
> % cd tmp
> ## Checkout the version before I changed encoding of leim-list.el.
> % cvs co -D 2009-03-18 emacs
> % cd emacs
> % configure
> % make
> ## At this time, leim-list.el is in iso-2022-7bit
> ## Now update the working directory to the latest version.
> % cvs update -AdP
> % make
> ## Now leim-list.el is correctly build with utf-8 encoding.
> 
> So, I see no problem?!?

Check the time stamps of quail.el and quail.elc against the time when
leim-list.el was built.  The situation in which the problem happens
should use an old quail.elc that still uses iso-2022, but new
leim-ext.el and mule-cmds.el which are already switched to utf-8.




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remove leim/leim-list.el for make bootstrap?
  2009-03-23  2:51               ` Kenichi Handa
@ 2009-03-23  4:18                 ` Eli Zaretskii
  2009-03-23  6:07                   ` Kenichi Handa
  0 siblings, 1 reply; 26+ messages in thread
From: Eli Zaretskii @ 2009-03-23  4:18 UTC (permalink / raw)
  To: Kenichi Handa; +Cc: miles, schwab, emacs-devel

> From: Kenichi Handa <handa@m17n.org>
> CC: schwab@linux-m68k.org, emacs-devel@gnu.org, miles@gnu.org
> Date: Mon, 23 Mar 2009 11:51:09 +0900
> 
> In article <umybgoyn2.fsf@gnu.org>, Eli Zaretskii <eliz@gnu.org> writes:
> 
> > > From: Andreas Schwab <schwab@linux-m68k.org>
> > > Cc: miles@gnu.org,  emacs-devel@gnu.org
> > > Date: Fri, 20 Mar 2009 16:46:21 +0100
> > > 
> > > Eli Zaretskii <eliz@gnu.org> writes:
> > > 
> > > > Well, quail.el didn't (and doesn't) explicitly modify the coding tag,
> > > 
> > > The coding tag is included in leim-list-header defined in
> > > international/mule-cmds.el, which is preloaded, thus always up-to-date.
> 
> > You are right.  But then Emacs should have complained, as it always
> > does when you try to save a buffer with encoding that goes against the
> > coding tag.  Why didn't it?
> 
> quail-update-leim-list-file (quail.el) does modify the
> coding tag as this:
> 
>       ;; Insert the correct header.
>       (if (looking-at (regexp-quote leim-list-header))
> 	  (goto-char (match-end 0))
> 	(insert leim-list-header))
> 
> Here, leim-list-header is defined in mule-cmds.el, and was
> changed to contain utf-8 coding tag.

Yes, but if quail.elc is from an old quail.el, then it also did this:

    (with-current-buffer list-buf
      (setq buffer-file-coding-system 'iso-2022-7bit)
      (save-buffer 0))

And if the coding tag says utf-8, I'd expect this to produce a warning
due to mismatch.




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remove leim/leim-list.el for make bootstrap?
  2009-03-23  3:12             ` Miles Bader
@ 2009-03-23  4:19               ` Eli Zaretskii
  0 siblings, 0 replies; 26+ messages in thread
From: Eli Zaretskii @ 2009-03-23  4:19 UTC (permalink / raw)
  To: Miles Bader; +Cc: emacs-devel, schwab, monnier, handa

> From: Miles Bader <miles@gnu.org>
> Date: Mon, 23 Mar 2009 12:12:58 +0900
> Cc: eliz@gnu.org, schwab@linux-m68k.org,
> 	Stefan Monnier <monnier@IRO.UMontreal.CA>, emacs-devel@gnu.org
> 
> Kenichi Handa <handa@m17n.org> writes:
> > ## Now leim-list.el is correctly build with utf-8 encoding.
> >
> > So, I see no problem?!?
> 
> FWIW, I use a separate build-dir.
> [I don't know why that would make a difference, but ...]

This couldn't be the reason, because I do NOT use a separate build
directory, and I still saw the problem.




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remove leim/leim-list.el for make bootstrap?
  2009-03-23  4:18                 ` Eli Zaretskii
@ 2009-03-23  6:07                   ` Kenichi Handa
  0 siblings, 0 replies; 26+ messages in thread
From: Kenichi Handa @ 2009-03-23  6:07 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: miles, schwab, emacs-devel

In article <ur60ooorc.fsf@gnu.org>, Eli Zaretskii <eliz@gnu.org> writes:

> Yes, but if quail.elc is from an old quail.el, then it also did this:

>     (with-current-buffer list-buf
>       (setq buffer-file-coding-system 'iso-2022-7bit)
>       (save-buffer 0))

> And if the coding tag says utf-8, I'd expect this to produce a warning
> due to mismatch.

In such a case, the buffer is saved by utf-8 without
warning.  There were discussions about what to do in such a
case, and I think the conclusion was the current behavior
(perhaps to issue warning only when a coding system in
coding-tag can't encode the buffer and some other coding
system is selected).

---
Kenichi Handa
handa@m17n.org




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remove leim/leim-list.el for make bootstrap?
  2009-03-23  4:16             ` Eli Zaretskii
@ 2009-03-27  7:02               ` Kenichi Handa
  2009-03-27  8:42                 ` Eli Zaretskii
  0 siblings, 1 reply; 26+ messages in thread
From: Kenichi Handa @ 2009-03-27  7:02 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: miles, schwab, monnier, emacs-devel

In article <uskl4oovp.fsf@gnu.org>, Eli Zaretskii <eliz@gnu.org> writes:

> > From: Kenichi Handa <handa@m17n.org>
> > CC: schwab@linux-m68k.org, eliz@gnu.org, miles@gnu.org, emacs-devel@gnu.org
> > Date: Mon, 23 Mar 2009 11:47:30 +0900
> > 
> > % mkdir tmp
> > % cd tmp
> > ## Checkout the version before I changed encoding of leim-list.el.
> > % cvs co -D 2009-03-18 emacs
> > % cd emacs
> > % configure
> > % make
> > ## At this time, leim-list.el is in iso-2022-7bit
> > ## Now update the working directory to the latest version.
> > % cvs update -AdP
> > % make
> > ## Now leim-list.el is correctly build with utf-8 encoding.
> > 
> > So, I see no problem?!?

> Check the time stamps of quail.el and quail.elc against the time when
> leim-list.el was built.

Ok, here's another try.

% mkdir tmp
% cd tmp
## Checkout the version before I changed encoding of leim-list.el.
% cvs co -D 2009-03-18 emacs
% cd emacs
% configure
% make
## At this time, leim-list.el is in iso-2022-7bit
% ls -ltgo lisp/international/quail.el* lisp/international/mule-cmds.el* leim/leim-*.el
-rw-rw-r-- 1  27778 2009-03-23 17:10 leim/leim-list.el
-rw-rw-r-- 1  81172 2009-03-23 16:59 lisp/international/quail.elc
-rw-rw-r-- 1  86574 2009-03-23 16:46 lisp/international/mule-cmds.elc
-rw-rw-r-- 1 116878 2009-03-03 10:57 lisp/international/mule-cmds.el
-rw-rw-r-- 1 115090 2009-02-14 18:05 lisp/international/quail.el
-rw-rw-r-- 1   3113 2009-01-08 13:02 leim/leim-ext.el

## Now update the working directory to the latest version.
% cvs update -AdP
% ls -ltgo lisp/international/quail.el* lisp/international/mule-cmds.el* leim/leim-*.el
-rw-rw-r-- 1 116870 2009-03-23 20:03 lisp/international/mule-cmds.el
-rw-rw-r-- 1 115082 2009-03-23 20:03 lisp/international/quail.el
-rw-rw-r-- 1   3040 2009-03-23 20:03 leim/leim-ext.el
-rw-rw-r-- 1  27778 2009-03-23 17:10 leim/leim-list.el
-rw-rw-r-- 1  81172 2009-03-23 16:59 lisp/international/quail.elc
-rw-rw-r-- 1  86574 2009-03-23 16:46 lisp/international/mule-cmds.elc

% make
## Now leim-list.el is correctly build with utf-8 encoding.
% ls -ltgo lisp/international/quail.el* lisp/international/mule-cmds.el* leim/leim-*.el
-rw-rw-r-- 1  26904 2009-03-23 20:08 leim/leim-list.el
-rw-rw-r-- 1  81164 2009-03-23 20:07 lisp/international/quail.elc
-rw-rw-r-- 1  86291 2009-03-23 20:06 lisp/international/mule-cmds.elc
-rw-rw-r-- 1 116870 2009-03-23 20:03 lisp/international/mule-cmds.el
-rw-rw-r-- 1 115082 2009-03-23 20:03 lisp/international/quail.el
-rw-rw-r-- 1   3040 2009-03-23 20:03 leim/leim-ext.el

> The situation in which the problem happens
> should use an old quail.elc that still uses iso-2022, but new
> leim-ext.el and mule-cmds.el which are already switched to utf-8.

It seems that such a situation doesn't happen with the
normal building sequence as above.

---
Kenichi Handa
handa@m17n.org




^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: remove leim/leim-list.el for make bootstrap?
  2009-03-27  7:02               ` Kenichi Handa
@ 2009-03-27  8:42                 ` Eli Zaretskii
  0 siblings, 0 replies; 26+ messages in thread
From: Eli Zaretskii @ 2009-03-27  8:42 UTC (permalink / raw)
  To: Kenichi Handa; +Cc: miles, schwab, monnier, emacs-devel

> From: Kenichi Handa <handa@m17n.org>
> CC: emacs-devel@gnu.org, schwab@linux-m68k.org, monnier@IRO.UMontreal.CA,
>         miles@gnu.org
> Date: Fri, 27 Mar 2009 16:02:59 +0900
> 
> % make
> ## Now leim-list.el is correctly build with utf-8 encoding.
> % ls -ltgo lisp/international/quail.el* lisp/international/mule-cmds.el* leim/leim-*.el
> -rw-rw-r-- 1  26904 2009-03-23 20:08 leim/leim-list.el
> -rw-rw-r-- 1  81164 2009-03-23 20:07 lisp/international/quail.elc
> -rw-rw-r-- 1  86291 2009-03-23 20:06 lisp/international/mule-cmds.elc
> -rw-rw-r-- 1 116870 2009-03-23 20:03 lisp/international/mule-cmds.el
> -rw-rw-r-- 1 115082 2009-03-23 20:03 lisp/international/quail.el
> -rw-rw-r-- 1   3040 2009-03-23 20:03 leim/leim-ext.el
> 
> > The situation in which the problem happens
> > should use an old quail.elc that still uses iso-2022, but new
> > leim-ext.el and mule-cmds.el which are already switched to utf-8.
> 
> It seems that such a situation doesn't happen with the
> normal building sequence as above.

<Shrug> I guess we can close the issue, then.




^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2009-03-27  8:42 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-20  5:00 remove leim/leim-list.el for make bootstrap? Miles Bader
2009-03-20 10:41 ` Eli Zaretskii
2009-03-20 11:39   ` Andreas Schwab
2009-03-20 12:36     ` Eli Zaretskii
2009-03-20 12:50       ` Eli Zaretskii
2009-03-20 13:15         ` Stefan Monnier
2009-03-20 15:20           ` Eli Zaretskii
2009-03-20 20:22             ` Stefan Monnier
2009-03-23  3:56             ` Kenichi Handa
2009-03-20 13:14       ` Andreas Schwab
2009-03-20 15:13         ` Eli Zaretskii
2009-03-20 15:46           ` Andreas Schwab
2009-03-20 18:08             ` Eli Zaretskii
2009-03-20 18:47               ` Andreas Schwab
2009-03-20 21:05                 ` Eli Zaretskii
2009-03-23  2:51               ` Kenichi Handa
2009-03-23  4:18                 ` Eli Zaretskii
2009-03-23  6:07                   ` Kenichi Handa
2009-03-20 16:13         ` Stefan Monnier
2009-03-23  2:47           ` Kenichi Handa
2009-03-23  3:12             ` Miles Bader
2009-03-23  4:19               ` Eli Zaretskii
2009-03-23  4:16             ` Eli Zaretskii
2009-03-27  7:02               ` Kenichi Handa
2009-03-27  8:42                 ` Eli Zaretskii
2009-03-20 21:43 ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).