all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: 1853@emacsbugs.donarmstrong.com
Cc: lekktu@gmail.com, emacs-devel@gnu.org
Subject: bug#1853: Trouble with gzipped info files on Windows
Date: Sat, 17 Jan 2009 16:05:36 +0200	[thread overview]
Message-ID: <uskni2fkf.fsf__1322.55087742141$1232202346$gmane$org@gnu.org> (raw)
In-Reply-To: <utz7y2i31.fsf@gnu.org>

> Date: Sat, 17 Jan 2009 15:11:14 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: emacs-devel@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)






  parent reply	other threads:[~2009-01-17 14:05 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <uab9gu30o.fsf@gnu.org>
2009-01-10 21:49 ` bug#1853: Trouble with gzipped info files on Windows Juanma Barranquero
2009-01-17 12:59   ` set-language-environment sets default EOL type to -unix Eli Zaretskii
2009-01-17 14:36     ` Stefan Monnier
2009-01-17 15:23       ` Eli Zaretskii
2009-01-17 15:40         ` Juanma Barranquero
2009-01-17 16:36           ` Eli Zaretskii
2009-01-17 16:59             ` Juanma Barranquero
2009-01-18  1:45         ` Stefan Monnier
2009-01-17 13:11   ` bug#1853: Trouble with gzipped info files on Windows Eli Zaretskii
2009-01-17 14:05     ` Eli Zaretskii
2009-01-17 14:15       ` Eli Zaretskii
2009-01-17 14:15       ` Eli Zaretskii
2009-01-18 21:01         ` Stefan Monnier
2009-01-18 21:01         ` Stefan Monnier
2009-01-19  4:11           ` Eli Zaretskii
2009-01-19  4:11           ` Eli Zaretskii
2009-01-20  5:10             ` Stefan Monnier
2009-01-24 15:34               ` Eli Zaretskii
2009-01-24 15:34               ` Eli Zaretskii
2009-01-20  5:10             ` Stefan Monnier
2009-01-17 14:05     ` Eli Zaretskii [this message]
2009-01-17 13:20   ` bug#1853: marked as done (Trouble with gzipped info files on Windows) Emacs bug Tracking System
2009-01-24 15:45   ` Emacs bug Tracking System

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='uskni2fkf.fsf__1322.55087742141$1232202346$gmane$org@gnu.org' \
    --to=eliz@gnu.org \
    --cc=1853@emacsbugs.donarmstrong.com \
    --cc=emacs-devel@gnu.org \
    --cc=lekktu@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.