From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: 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 NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1232201164 32114 80.91.229.12 (17 Jan 2009 14:06:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 17 Jan 2009 14:06:04 +0000 (UTC) Cc: lekktu@gmail.com, emacs-devel@gnu.org To: 1853@emacsbugs.donarmstrong.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 17 15:07:16 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LOBpI-0003yk-SZ for ged-emacs-devel@m.gmane.org; Sat, 17 Jan 2009 15:07:05 +0100 Original-Received: from localhost ([127.0.0.1]:45773 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LOBo1-0001Ao-Mn for ged-emacs-devel@m.gmane.org; Sat, 17 Jan 2009 09:05:45 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LOBnv-000181-Gn for emacs-devel@gnu.org; Sat, 17 Jan 2009 09:05:39 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LOBnu-00016U-DC for emacs-devel@gnu.org; Sat, 17 Jan 2009 09:05:38 -0500 Original-Received: from [199.232.76.173] (port=54439 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LOBnu-00016M-7v for emacs-devel@gnu.org; Sat, 17 Jan 2009 09:05:38 -0500 Original-Received: from mtaout2.012.net.il ([84.95.2.4]:23867) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LOBnt-0000M2-Lq for emacs-devel@gnu.org; Sat, 17 Jan 2009 09:05:37 -0500 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 emacs-devel@gnu.org; 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: Solaris 9.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:107926 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)