Glenn Morris <rgm@HIDDEN>
to control <at> debbugs.gnu.org
.
Full text available.Received: (at 13006) by debbugs.gnu.org; 28 Nov 2012 08:41:09 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 28 03:41:09 2012 Received: from localhost ([127.0.0.1]:42565 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1TddCf-0002Og-AJ for submit <at> debbugs.gnu.org; Wed, 28 Nov 2012 03:41:09 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:55024) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <rgm@HIDDEN>) id 1TddCc-0002OV-0F for 13006 <at> debbugs.gnu.org; Wed, 28 Nov 2012 03:41:08 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from <rgm@HIDDEN>) id 1TddAl-0001BI-9s; Wed, 28 Nov 2012 03:39:11 -0500 From: Glenn Morris <rgm@HIDDEN> To: 13006 <at> debbugs.gnu.org Subject: Re: bug#13006: recognizing compressed files with arbitrary names References: <201211270131.qAR1VpBY005753@HIDDEN> <mvmsj7vfmzs.fsf@HIDDEN> <i9wqx6lwhk.fsf@HIDDEN> X-Spook: PET airframe Rule Psix Lon Horiuchi Ermes World Trade X-Ran: wyyYD1z7_;v}Hen"_LqY=rbv@U]h@yVvvpJ!5!|:*UDlmscZ/Eu@9#9T-*I6^[t}b]hc?8 X-Hue: green X-Debbugs-No-Ack: yes X-Attribution: GM Date: Wed, 28 Nov 2012 03:39:11 -0500 In-Reply-To: <i9wqx6lwhk.fsf@HIDDEN> (Glenn Morris's message of "Tue, 27 Nov 2012 13:41:11 -0500") Message-ID: <il624qktow.fsf@HIDDEN> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -4.6 (----) X-Debbugs-Envelope-To: 13006 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -5.4 (-----) Glenn Morris wrote: > + (setq filename (file-name-sans-versions filename)) Applied for 24.2.91. Leaving this open as a wishlist for: a) detecting compressed files by magic bytes b) explicit command to open a file using a given compression
bug-gnu-emacs@HIDDEN
:bug#13006
; Package emacs
.
Full text available.Received: (at 13006) by debbugs.gnu.org; 27 Nov 2012 23:06:34 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 27 18:06:33 2012 Received: from localhost ([127.0.0.1]:42301 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1TdUEX-0002o1-2l for submit <at> debbugs.gnu.org; Tue, 27 Nov 2012 18:06:33 -0500 Received: from frenzy.freefriends.org ([66.54.153.139]:52579 helo=freefriends.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <karl@HIDDEN>) id 1TdUEV-0002nu-1x for 13006 <at> debbugs.gnu.org; Tue, 27 Nov 2012 18:06:27 -0500 X-Envelope-From: karl@HIDDEN Received: from freefriends.org (localhost [127.0.0.1]) by freefriends.org (8.14.5/8.14.5) with ESMTP id qARN4ZTd002351; Tue, 27 Nov 2012 16:04:35 -0700 Received: (from nobody@localhost) by freefriends.org (8.14.5/8.14.5/submit) id qARN4Yok002350; Tue, 27 Nov 2012 23:04:34 GMT Date: Tue, 27 Nov 2012 23:04:34 GMT Message-Id: <201211272304.qARN4Yok002350@HIDDEN> X-Authentication-Warning: frenzy.freefriends.org: nobody set sender to karl@HIDDEN using -f From: karl@HIDDEN (Karl Berry) To: rgm@HIDDEN Subject: Re: bug#13006: recognizing compressed files with arbitrary names In-Reply-To: <i9wqx6lwhk.fsf@HIDDEN> X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 13006 Cc: 13006 <at> debbugs.gnu.org, schwab@HIDDEN X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: 0.4 (/) + (setq filename (file-name-sans-versions filename)) Thanks. There's a separate question of handling arbitrarily named compressed files via magic-fallback-mode-alist or somesuch. Right. The backup versions was just an example of problematic names. Though it's certainly good to have that fixed. There's also the (potentially related) question of making it possible for users to tell Emacs "this is a compressed file". Regardless of the method(s) used to detect compression, this seems like it would be useful. I have plenty of times been forced to decompress files outside of Emacs and then visit the plain file. Clearly it's not the end of the world to do that, but ... If you want me to send separate reports for either or both of those things, let me know. Thanks, k
bug-gnu-emacs@HIDDEN
:bug#13006
; Package emacs
.
Full text available.Received: (at 13006) by debbugs.gnu.org; 27 Nov 2012 18:43:05 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 27 13:43:05 2012 Received: from localhost ([127.0.0.1]:42084 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1TdQ7c-0003Jl-Na for submit <at> debbugs.gnu.org; Tue, 27 Nov 2012 13:43:04 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:38954) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <rgm@HIDDEN>) id 1TdQ7a-0003Je-GI for 13006 <at> debbugs.gnu.org; Tue, 27 Nov 2012 13:43:03 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from <rgm@HIDDEN>) id 1TdQ5n-0006Re-5v; Tue, 27 Nov 2012 13:41:11 -0500 From: Glenn Morris <rgm@HIDDEN> To: Andreas Schwab <schwab@HIDDEN> Subject: Re: bug#13006: recognizing compressed files with arbitrary names References: <201211270131.qAR1VpBY005753@HIDDEN> <mvmsj7vfmzs.fsf@HIDDEN> X-Spook: INSCOM BROMURE Jyllandsposten Yukon FBI radar freedom ISEC X-Ran: LU5WKHkLR`\$B{#_[)a*Fx>vxcbP?5{o*HXw%284bg^Id?R9)F3`1Z{Ye%ZB,!p:yZ~E.W X-Hue: blue X-Debbugs-No-Ack: yes X-Attribution: GM Date: Tue, 27 Nov 2012 13:41:11 -0500 In-Reply-To: <mvmsj7vfmzs.fsf@HIDDEN> (Andreas Schwab's message of "Tue, 27 Nov 2012 09:50:31 +0100") Message-ID: <i9wqx6lwhk.fsf@HIDDEN> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -3.3 (---) X-Debbugs-Envelope-To: 13006 Cc: 13006 <at> debbugs.gnu.org, Karl Berry <karl@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -4.1 (----) Andreas Schwab wrote: > This is a regression from Emacs 23. It should disregard the backup > suffix when matching the extension. Presumably the 2010-12-08 change to jka-compr-compression-info-list. (There is a comment above jka-compr-compression-info-list which was ignored and no longer applies. Also the :version was not bumped.) Anyway, this seems to fix the immediate problem: *** lisp/jka-cmpr-hook.el 2012-01-29 17:41:43 +0000 --- lisp/jka-cmpr-hook.el 2012-11-27 18:35:37 +0000 *************** *** 109,114 **** --- 109,115 ---- "Return information about the compression scheme of FILENAME. The determination as to which compression scheme, if any, to use is based on the filename itself and `jka-compr-compression-info-list'." + (setq filename (file-name-sans-versions filename)) (catch 'compression-info (let ((case-fold-search nil)) (dolist (x jka-compr-compression-info-list) There's a separate question of handling arbitrarily named compressed files via magic-fallback-mode-alist or somesuch.
bug-gnu-emacs@HIDDEN
:bug#13006
; Package emacs
.
Full text available.Chong Yidong <cyd@HIDDEN>
to control <at> debbugs.gnu.org
.
Full text available.Received: (at 13006) by debbugs.gnu.org; 27 Nov 2012 08:52:25 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 27 03:52:25 2012 Received: from localhost ([127.0.0.1]:41012 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1TdGu0-0001k4-CS for submit <at> debbugs.gnu.org; Tue, 27 Nov 2012 03:52:25 -0500 Received: from mail-out.m-online.net ([212.18.0.10]:54493) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <whitebox@HIDDEN>) id 1TdGtx-0001ju-Mn for 13006 <at> debbugs.gnu.org; Tue, 27 Nov 2012 03:52:22 -0500 Received: from frontend1.mail.m-online.net (frontend1.mail.intern.m-online.net [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 3Y9dxN6WF1z3hhjW; Tue, 27 Nov 2012 09:50:32 +0100 (CET) X-Auth-Info: fheJj8DisTKMR6ntZTCopexeLZdOifJIxyzafHvMEX4= Received: from g208.suse.de (charybdis-ext.suse.de [195.135.221.2]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA id 3Y9dxM6sGXzbbkq; Tue, 27 Nov 2012 09:50:31 +0100 (CET) From: Andreas Schwab <schwab@HIDDEN> To: karl@HIDDEN (Karl Berry) Subject: Re: bug#13006: recognizing compressed files with arbitrary names References: <201211270131.qAR1VpBY005753@HIDDEN> X-Yow: ...I think I'm having an overnight sensation right now!! Date: Tue, 27 Nov 2012 09:50:31 +0100 In-Reply-To: <201211270131.qAR1VpBY005753@HIDDEN> (Karl Berry's message of "Tue, 27 Nov 2012 01:31:51 GMT") Message-ID: <mvmsj7vfmzs.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.5 (/) X-Debbugs-Envelope-To: 13006 Cc: 13006 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -1.9 (-) karl@HIDDEN (Karl Berry) writes: > $ echo foo | gzip >/tmp/foo.gz.~1~ > $ emacs --no-site-file --no-init /tmp/foo.gz.~1~ > > And observe binary junk instead of text. (This is with 24.2.) This is a regression from Emacs 23. It should disregard the backup suffix when matching the extension. Andreas. -- Andreas Schwab, schwab@HIDDEN GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."
bug-gnu-emacs@HIDDEN
:bug#13006
; Package emacs
.
Full text available.Received: (at submit) by debbugs.gnu.org; 27 Nov 2012 01:33:46 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 26 20:33:46 2012 Received: from localhost ([127.0.0.1]:40744 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1TdA3V-0005ob-SH for submit <at> debbugs.gnu.org; Mon, 26 Nov 2012 20:33:46 -0500 Received: from eggs.gnu.org ([208.118.235.92]:43164) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <karl@HIDDEN>) id 1TdA3U-0005oU-5u for submit <at> debbugs.gnu.org; Mon, 26 Nov 2012 20:33:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <karl@HIDDEN>) id 1TdA1l-0000XT-LZ for submit <at> debbugs.gnu.org; Mon, 26 Nov 2012 20:31:58 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:53330) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <karl@HIDDEN>) id 1TdA1l-0000XP-IU for submit <at> debbugs.gnu.org; Mon, 26 Nov 2012 20:31:57 -0500 Received: from eggs.gnu.org ([208.118.235.92]:43776) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <karl@HIDDEN>) id 1TdA1k-0006bN-NV for bug-gnu-emacs@HIDDEN; Mon, 26 Nov 2012 20:31:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <karl@HIDDEN>) id 1TdA1j-0000Wp-Fr for bug-gnu-emacs@HIDDEN; Mon, 26 Nov 2012 20:31:56 -0500 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43215) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <karl@HIDDEN>) id 1TdA1j-0000Wl-Cy for bug-gnu-emacs@HIDDEN; Mon, 26 Nov 2012 20:31:55 -0500 Received: from [2001:4830:134:3::10] (port=60760 helo=eggs.gnu.org) by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <karl@HIDDEN>) id 1TdA1i-0002sh-W0 for bug-emacs@HIDDEN; Mon, 26 Nov 2012 20:31:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <karl@HIDDEN>) id 1TdA1h-0000WQ-Jx for bug-emacs@HIDDEN; Mon, 26 Nov 2012 20:31:54 -0500 Received: from frenzy.freefriends.org ([66.54.153.139]:54689 helo=freefriends.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <karl@HIDDEN>) id 1TdA1h-0000WG-Di for bug-emacs@HIDDEN; Mon, 26 Nov 2012 20:31:53 -0500 X-Envelope-From: karl@HIDDEN X-Envelope-To: <bug-emacs@HIDDEN> Received: from freefriends.org (localhost [127.0.0.1]) by freefriends.org (8.14.5/8.14.5) with ESMTP id qAR1VqK3005755 for <bug-emacs@HIDDEN>; Mon, 26 Nov 2012 18:31:52 -0700 Received: (from nobody@localhost) by freefriends.org (8.14.5/8.14.5/submit) id qAR1VpBY005753; Tue, 27 Nov 2012 01:31:51 GMT Date: Tue, 27 Nov 2012 01:31:51 GMT Message-Id: <201211270131.qAR1VpBY005753@HIDDEN> X-Authentication-Warning: frenzy.freefriends.org: nobody set sender to karl@HIDDEN using -f From: karl@HIDDEN (Karl Berry) To: bug-emacs@HIDDEN Subject: recognizing compressed files with arbitrary names X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -4.2 (----) As the documentation says (http://www.gnu.org/software/emacs/manual/html_node/emacs/Compressed-Files.html) "Emacs recognizes compressed files by their file names." But compressed files don't always have the expected names. For instance, using the autobackup feature of Emacs or many other programs will result in names ending in, say, .~1~ ... Example for concreteness: $ echo foo | gzip >/tmp/foo.gz.~1~ $ emacs --no-site-file --no-init /tmp/foo.gz.~1~ And observe binary junk instead of text. (This is with 24.2.) Another implication is problems using M-x grep on such files. After changing the program to zgrep from grep, matches in the *grep* buffer are displayed as usual, but then when one visits the file in Emacs, it's junk. It would be nice to at least have an easy way to manually tell Emacs "this is a compressed file, despite its weird name". If there's a way to do that now, I'd like to know (and it should presumably be in the manual). I looked at jka-compr.el but could not find it. Of course, a more robust solution would be to use magic numbers instead of filenames to recognize file types. I see there was a long thread about that several years ago, starting at http://lists.gnu.org/archive/html/emacs-devel/2009-08/msg01023.html. I know it's been discussed at other times, too, but I can't see any way to accomplish it (short of using crypt++, which doesn't work well with Emacs 23 or later, which is why I stopped using it ... anyway). Thanks, karl
karl@HIDDEN (Karl Berry)
:bug-gnu-emacs@HIDDEN
.
Full text available.bug-gnu-emacs@HIDDEN
:bug#13006
; Package emacs
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.