GNU bug report logs -
#1853
Trouble with gzipped info files on Windows
Previous Next
Reported by: "Juanma Barranquero" <lekktu <at> gmail.com>
Date: Sat, 10 Jan 2009 21:55:03 UTC
Severity: normal
Found in version 23.0.60
Done: Eli Zaretskii <eliz <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 1853 in the body.
You can then email your comments to 1853 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com
:
bug#1853
; Package
emacs,w32
.
(Sat, 10 Jan 2009 21:55:03 GMT)
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>, owner <at> emacsbugs.donarmstrong.com
.
(Sat, 10 Jan 2009 21:55:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
Package: emacs,w32
Version: 23.0.60
Gzipping normal CRLF info files on Windows, there's currently two problems:
1.- For all info files:
cd info
gzip efaq
emacs -Q --eval "(progn (set-language-environment \"UTF-8\") (info
\"(efaq)\")"
The info pages are decoded with a -unix coding system, so lines
contain spurious ^M characters.
It does depend on setting the language environment (on the command
line or .emacs). For example, with my default "Spanish" environment,
it does not happen; but if I pass "Spanish" in the command above, the
info pages are erroneously decoded as info-latin-1-unix.
The presence of NUL characters (see fixed bug#876) is irrelevant.
efaq does contain NUL, but the same bug happens with gnus, which does
not.
2.- Additionally, for info nodes that do NOT contain a Top node:
cd info
emacs -Q --eval "(progn (set-language-environment \"UTF-8\") (info
\"(ccmode)\")"
;; works OK.
gzip ccmode*
emacs -Q --eval "(progn (set-language-environment \"UTF-8\") (info
\"(ccmode)\")"
;; "No such node or anchor: Top"
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Sat, 17 Jan 2009 13:20:03 GMT)
Full text and
rfc822 format available.
Notification sent
to
"Juanma Barranquero" <lekktu <at> gmail.com>
:
bug acknowledged by developer.
(Sat, 17 Jan 2009 13:20:03 GMT)
Full text and
rfc822 format available.
Message #10 received at 1853-done <at> emacsbugs.donarmstrong.com (full text, mbox):
> Date: Sat, 10 Jan 2009 22:49:05 +0100
> From: "Juanma Barranquero" <lekktu <at> gmail.com>
> Cc:
>
> Gzipping normal CRLF info files on Windows, there's currently two problems:
>
> 1.- For all info files:
>
> cd info
> gzip efaq
> emacs -Q --eval "(progn (set-language-environment \"UTF-8\") (info \"(efaq)\"))"
>
> The info pages are decoded with a -unix coding system, so lines
> contain spurious ^M characters.
>
> It does depend on setting the language environment (on the command
> line or .emacs). For example, with my default "Spanish" environment,
> it does not happen; but if I pass "Spanish" in the command above, the
> info pages are erroneously decoded as info-latin-1-unix.
This happened because, on DOS and Windows, file-coding-system-alist
includes the association `("" . find-buffer-file-type-coding-system)',
and find-buffer-file-type-coding-system was not ready to see an
argument whose `car' does not appear to exist because jka-compr
removed the .gz extension from its name.
I fixed find-buffer-file-type-coding-system to work correctly in this
case.
> 2.- Additionally, for info nodes that do NOT contain a Top node:
>
> cd info
> emacs -Q --eval "(progn (set-language-environment \"UTF-8\") (info
> \"(ccmode)\")"
> ;; works OK.
>
> gzip ccmode*
> emacs -Q --eval "(progn (set-language-environment \"UTF-8\") (info
> \"(ccmode)\")"
> ;; "No such node or anchor: Top"
This is yet another separate bug: set-language-environment always sets
default-buffer-file-coding-system to *-unix. See my other message a
few minutes ago.
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com
:
bug#1853
; Package
emacs,w32
.
(Sat, 17 Jan 2009 14:15:02 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
.
(Sat, 17 Jan 2009 14:15:02 GMT)
Full text and
rfc822 format available.
Message #15 received at 1853 <at> emacsbugs.donarmstrong.com (full text, mbox):
> Date: Sat, 17 Jan 2009 15:11:14 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: emacs-devel <at> gnu.org
>
> This happened because, on DOS and Windows, file-coding-system-alist
> includes the association `("" . find-buffer-file-type-coding-system)',
> and find-buffer-file-type-coding-system was not ready to see an
> argument whose `car' does not appear to exist because jka-compr
> removed the .gz extension from its name.
Actually, this explains why _visiting_ compressed files might produce
a buffer with ^M characters in it. The change I made cannot help with
Info files because the buffer name is "*info*" in that case, not
FOO.gz.
After the change, visiting, e.g., emacs-1.gz produces a buffer whose
buffer-file-coding-system is -dos, and there are no ^M characters in
it. Visiting ccmode-1.gz still produces ^M's (because ccmode-1
includes null characters in the Index node).
> > 2.- Additionally, for info nodes that do NOT contain a Top node:
> >
> > cd info
> > emacs -Q --eval "(progn (set-language-environment \"UTF-8\") (info
> > \"(ccmode)\")"
> > ;; works OK.
> >
> > gzip ccmode*
> > emacs -Q --eval "(progn (set-language-environment \"UTF-8\") (info
> > \"(ccmode)\")"
> > ;; "No such node or anchor: Top"
>
> This is yet another separate bug: set-language-environment always sets
> default-buffer-file-coding-system to *-unix. See my other message a
> few minutes ago.
Specifically, I propose the change below for this latter problem.
After that change, visiting compressed files, both regular and Info
files, work correctly for me, both before or after setting a
non-default language environment.
Index: lisp/international/mule-cmds.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/international/mule-cmds.el,v
retrieving revision 1.353
diff -u -r1.353 mule-cmds.el
--- lisp/international/mule-cmds.el 9 Jan 2009 05:01:02 -0000 1.353
+++ lisp/international/mule-cmds.el 17 Jan 2009 14:01:33 -0000
@@ -1936,7 +1936,11 @@
(eol-type (coding-system-eol-type default-buffer-file-coding-system)))
(when priority
(set-default-coding-systems
- (if (memq eol-type '(0 1 2 unix dos mac))
+ ;; Don't use eol-type if default-buffer-file-coding-system is
+ ;; nil, because coding-system-eol-type treats nil as
+ ;; `no-conversion'.
+ (if (and default-buffer-file-coding-system
+ (memq eol-type '(0 1 2 unix dos mac)))
(coding-system-change-eol-conversion default-coding eol-type)
default-coding))
(setq default-sendmail-coding-system default-coding)
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com
:
bug#1853
; Package
emacs,w32
.
(Sat, 17 Jan 2009 14:25:05 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
.
(Sat, 17 Jan 2009 14:25:05 GMT)
Full text and
rfc822 format available.
Message #20 received at 1853 <at> emacsbugs.donarmstrong.com (full text, mbox):
> Date: Sat, 17 Jan 2009 16:05:36 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: lekktu <at> gmail.com, emacs-devel <at> gnu.org
>
> --- lisp/international/mule-cmds.el 9 Jan 2009 05:01:02 -0000 1.353
> +++ lisp/international/mule-cmds.el 17 Jan 2009 14:01:33 -0000
> @@ -1936,7 +1936,11 @@
> (eol-type (coding-system-eol-type default-buffer-file-coding-system)))
> (when priority
> (set-default-coding-systems
> - (if (memq eol-type '(0 1 2 unix dos mac))
> + ;; Don't use eol-type if default-buffer-file-coding-system is
> + ;; nil, because coding-system-eol-type treats nil as
> + ;; `no-conversion'.
> + (if (and default-buffer-file-coding-system
> + (memq eol-type '(0 1 2 unix dos mac)))
> (coding-system-change-eol-conversion default-coding eol-type)
> default-coding))
> (setq default-sendmail-coding-system default-coding)
Upon further thought, perhaps we want the default coding-systems to
have an explicit -dos EOL type on DOS and Windows, for consistency
with how we set up things on startup. This would involve explicitly
changing eol-type of default-coding before the last line above.
WDYT?
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com
:
bug#1853
; Package
emacs,w32
.
(Sun, 18 Jan 2009 21:05:09 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Stefan Monnier <monnier <at> iro.umontreal.ca>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com
.
(Sun, 18 Jan 2009 21:05:10 GMT)
Full text and
rfc822 format available.
Message #25 received at 1853 <at> emacsbugs.donarmstrong.com (full text, mbox):
> Upon further thought, perhaps we want the default coding-systems to
> have an explicit -dos EOL type on DOS and Windows, for consistency
> with how we set up things on startup. This would involve explicitly
> changing eol-type of default-coding before the last line above.
Ideally, it should not only do the same as done on startup, but also do
it by running the same code.
Stefan
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com
:
bug#1853
; Package
emacs,w32
.
(Mon, 19 Jan 2009 04:20:02 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
.
(Mon, 19 Jan 2009 04:20:03 GMT)
Full text and
rfc822 format available.
Message #30 received at 1853 <at> emacsbugs.donarmstrong.com (full text, mbox):
> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Cc: 1853 <at> emacsbugs.donarmstrong.com, handa <at> m17n.org, lekktu <at> gmail.com, emacs-devel <at> gnu.org
> Date: Sun, 18 Jan 2009 16:01:40 -0500
>
> > Upon further thought, perhaps we want the default coding-systems to
> > have an explicit -dos EOL type on DOS and Windows, for consistency
> > with how we set up things on startup. This would involve explicitly
> > changing eol-type of default-coding before the last line above.
>
> Ideally, it should not only do the same as done on startup, but also do
> it by running the same code.
Right, I had that in mind, too. The problem is, it's not trivial.
The way it works on startup now is a bit kludgey: dos-w32.el says
(setq-default buffer-file-coding-system 'undecided-dos)
and then set-language-environment-coding-systems does
(let* ((priority (get-language-info language-name 'coding-priority))
(default-coding (car priority))
(eol-type (coding-system-eol-type default-buffer-file-coding-system)))
...
(if (memq eol-type '(0 1 2 unix dos mac))
(coding-system-change-eol-conversion default-coding eol-type)))
the kludge being that this only works because of the specific order
files are loaded at dump time and the order of function invocation
during startup. Are we okay with making non-trivial changes in that
at this time?
bug reopened, originator not changed.
Request was from
Juanma Barranquero <lekktu <at> gmail.com>
to
control <at> emacsbugs.donarmstrong.com
.
(Tue, 20 Jan 2009 02:20:03 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com
:
bug#1853
; Package
emacs,w32
.
(Tue, 20 Jan 2009 05:15:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Stefan Monnier <monnier <at> IRO.UMontreal.CA>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com
.
(Tue, 20 Jan 2009 05:15:03 GMT)
Full text and
rfc822 format available.
Message #37 received at 1853 <at> emacsbugs.donarmstrong.com (full text, mbox):
> the kludge being that this only works because of the specific order
> files are loaded at dump time and the order of function invocation
> during startup. Are we okay with making non-trivial changes in that
> at this time?
I guess it's better to make a simpler local change, and add a big fat
comment about what should be done instead.
Stefan
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com
:
bug#1853
; Package
emacs,w32
.
(Sat, 24 Jan 2009 15:40: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
.
(Sat, 24 Jan 2009 15:40:03 GMT)
Full text and
rfc822 format available.
Message #42 received at 1853 <at> emacsbugs.donarmstrong.com (full text, mbox):
> From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
> Cc: 1853 <at> emacsbugs.donarmstrong.com, handa <at> m17n.org, lekktu <at> gmail.com,
> emacs-devel <at> gnu.org
> Date: Tue, 20 Jan 2009 00:10:04 -0500
>
> > the kludge being that this only works because of the specific order
> > files are loaded at dump time and the order of function invocation
> > during startup. Are we okay with making non-trivial changes in that
> > at this time?
>
> I guess it's better to make a simpler local change, and add a big fat
> comment about what should be done instead.
Done, with the following change:
Index: lisp/international/mule-cmds.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/international/mule-cmds.el,v
retrieving revision 1.353
retrieving revision 1.354
diff -u -r1.353 -r1.354
--- lisp/international/mule-cmds.el 9 Jan 2009 05:01:02 -0000 1.353
+++ lisp/international/mule-cmds.el 24 Jan 2009 15:31:09 -0000 1.354
@@ -1933,7 +1933,25 @@
"Do various coding system setups for language environment LANGUAGE-NAME."
(let* ((priority (get-language-info language-name 'coding-priority))
(default-coding (car priority))
- (eol-type (coding-system-eol-type default-buffer-file-coding-system)))
+ ;; If default-buffer-file-coding-system is nil, don't use
+ ;; coding-system-eol-type, because it treats nil as
+ ;; `no-conversion'. default-buffer-file-coding-system is set
+ ;; to nil by reset-language-environment, and in that case we
+ ;; want to have here the native EOL type for each platform.
+ ;; FIXME: there should be a common code that runs both on
+ ;; startup and here to set the default EOL type correctly.
+ ;; Right now, DOS/Windows platforms set this on dos-w32.el,
+ ;; which works only as long as the order of loading files at
+ ;; dump time and calling functions at startup is not modified
+ ;; significantly, i.e. as long as this function is called
+ ;; _after_ default-buffer-file-coding-system was set by
+ ;; dos-w32.el.
+ (eol-type
+ (if (null default-buffer-file-coding-system)
+ (cond ((memq system-type '(windows-nt ms-dos)) 1)
+ ((eq system-type 'macos) 2)
+ (t 0))
+ (coding-system-eol-type default-buffer-file-coding-system))))
(when priority
(set-default-coding-systems
(if (memq eol-type '(0 1 2 unix dos mac))
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Sat, 24 Jan 2009 15:45:03 GMT)
Full text and
rfc822 format available.
Notification sent
to
"Juanma Barranquero" <lekktu <at> gmail.com>
:
bug acknowledged by developer.
(Sat, 24 Jan 2009 15:45:04 GMT)
Full text and
rfc822 format available.
Message #47 received at 1853-done <at> emacsbugs.donarmstrong.com (full text, mbox):
Fixed with the change in my latest message on this subject.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> emacsbugs.donarmstrong.com
.
(Sun, 22 Feb 2009 15:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 16 years and 179 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.