From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#1853: Trouble with gzipped info files on Windows Date: Sat, 17 Jan 2009 16:05:36 +0200 Message-ID: References: Reply-To: Eli Zaretskii , 1853@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1232202267 2673 80.91.229.12 (17 Jan 2009 14:24:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 17 Jan 2009 14:24:27 +0000 (UTC) Cc: lekktu@gmail.com, emacs-devel@gnu.org To: 1853@emacsbugs.donarmstrong.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 17 15:25:39 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LOC7H-00018f-1J for geb-bug-gnu-emacs@m.gmane.org; Sat, 17 Jan 2009 15:25:39 +0100 Original-Received: from localhost ([127.0.0.1]:36744 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LOC60-0000eD-8S for geb-bug-gnu-emacs@m.gmane.org; Sat, 17 Jan 2009 09:24:20 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LOC5C-00005H-Nv for bug-gnu-emacs@gnu.org; Sat, 17 Jan 2009 09:23:30 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LOC5B-0008Vs-Jf for bug-gnu-emacs@gnu.org; Sat, 17 Jan 2009 09:23:29 -0500 Original-Received: from [199.232.76.173] (port=44884 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LOC5B-0008Vd-CW for bug-gnu-emacs@gnu.org; Sat, 17 Jan 2009 09:23:29 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:34651) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LOC5A-00032M-Ex for bug-gnu-emacs@gnu.org; Sat, 17 Jan 2009 09:23:28 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0HENQNq006553; Sat, 17 Jan 2009 06:23:27 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n0HEF2P8004157; Sat, 17 Jan 2009 06:15:02 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Eli Zaretskii Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs , owner@emacsbugs.donarmstrong.com Resent-Date: Sat, 17 Jan 2009 14:15:02 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 1853 X-Emacs-PR-Package: emacs,w32 X-Emacs-PR-Keywords: Original-Received: via spool by 1853-submit@emacsbugs.donarmstrong.com id=B1853.12322011462873 (code B ref 1853); Sat, 17 Jan 2009 14:15:02 +0000 Original-Received: (at 1853) by emacsbugs.donarmstrong.com; 17 Jan 2009 14:05:46 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mtaout2.012.net.il (mtaout2.012.net.il [84.95.2.4]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0HE5gIK002867 for <1853@emacsbugs.donarmstrong.com>; Sat, 17 Jan 2009 06:05:44 -0800 Original-Received: from conversion-daemon.i_mtaout2.012.net.il by i_mtaout2.012.net.il (HyperSendmail v2004.12) id <0KDM00800C5X6E00@i_mtaout2.012.net.il> for 1853@emacsbugs.donarmstrong.com; Sat, 17 Jan 2009 16:05:47 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([77.126.42.36]) by i_mtaout2.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0KDM00IT4CHLHB81@i_mtaout2.012.net.il>; Sat, 17 Jan 2009 16:05:46 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Sat, 17 Jan 2009 09:23:29 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:24231 Archived-At: > Date: Sat, 17 Jan 2009 15:11:14 +0200 > From: Eli Zaretskii > 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)