From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#14652: 24.3; ZIP files corrupted when saved via tramp Date: Thu, 20 Jun 2013 14:02:10 +0200 Message-ID: <87k3lpyoql.fsf@gmx.de> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1371729796 12128 80.91.229.3 (20 Jun 2013 12:03:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 20 Jun 2013 12:03:16 +0000 (UTC) Cc: 14652@debbugs.gnu.org To: JuanLeon Lahoz Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 20 14:03:14 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Upda1-0001Mi-Q6 for geb-bug-gnu-emacs@m.gmane.org; Thu, 20 Jun 2013 14:03:10 +0200 Original-Received: from localhost ([::1]:47076 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Upda1-0002UG-EO for geb-bug-gnu-emacs@m.gmane.org; Thu, 20 Jun 2013 08:03:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46808) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UpdZw-0002QR-8y for bug-gnu-emacs@gnu.org; Thu, 20 Jun 2013 08:03:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UpdZu-0001gE-QY for bug-gnu-emacs@gnu.org; Thu, 20 Jun 2013 08:03:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35380) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UpdZu-0001gA-O2 for bug-gnu-emacs@gnu.org; Thu, 20 Jun 2013 08:03:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1UpdZu-0003w7-E6 for bug-gnu-emacs@gnu.org; Thu, 20 Jun 2013 08:03:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Jun 2013 12:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14652 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 14652-submit@debbugs.gnu.org id=B14652.137172974715013 (code B ref 14652); Thu, 20 Jun 2013 12:03:02 +0000 Original-Received: (at 14652) by debbugs.gnu.org; 20 Jun 2013 12:02:27 +0000 Original-Received: from localhost ([127.0.0.1]:57929 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UpdZK-0003u4-LF for submit@debbugs.gnu.org; Thu, 20 Jun 2013 08:02:26 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:49436) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UpdZI-0003tp-HG for 14652@debbugs.gnu.org; Thu, 20 Jun 2013 08:02:25 -0400 Original-Received: from mailout-de.gmx.net ([10.1.76.27]) by mrigmx.server.lan (mrigmx001) with ESMTP (Nemesis) id 0MEHTC-1V50iX44ka-00FPou for <14652@debbugs.gnu.org>; Thu, 20 Jun 2013 14:02:18 +0200 Original-Received: (qmail invoked by alias); 20 Jun 2013 12:02:17 -0000 Original-Received: from p5B298A7C.dip0.t-ipconnect.de (EHLO detlef.gmx.de) [91.41.138.124] by mail.gmx.net (mp027) with SMTP; 20 Jun 2013 14:02:17 +0200 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX1810OsFfPI19Fk6mCiMu+jEb6q7wT/txQ/HQWgkGv qT/03ZzqfCGtDf In-Reply-To: (JuanLeon Lahoz's message of "Tue, 18 Jun 2013 13:49:51 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:75391 Archived-At: JuanLeon Lahoz writes: > Dear Emacs maintainers, Hi, > The funny thing is that when I modify the zip file locally, it works > fine and emacs does not remind me I need to save the zip file (emacs > reminds me to do it with the tgz file), but remotely emacs reminds me > to save the zip file. When I do, it gets corrupted. > > I was not sure if the problem lies within tramp or in the emacs code > that deals with zip files, so I filed a bug report to tramp. Here is > their answer: > > I would say it is due to arc-mode.el. I've checked the code shortly; > it uses `call-process' internally, which is not prepared for remote > files. Replacing all such calls by `process-file' was not reasonable, > at least handling of temporary files must be improved as well. I have checked arc-mode.el in detail; the usage of `call-process' is not a problem, because it is applied on local copies of the archive. Archives could be marked as "remote". In that case, the archive is not saved by intention when it is modified, but the message mentioned above appears. However, the following patch I have committed to the trunk allows to save the archive by "C-x C-s" (this is `save-buffer'), without corrupting the archive: --8<---------------cut here---------------start------------->8--- *** ~/src/emacs/lisp/arc-mode.el.~113092~ 2013-06-20 13:56:09.298495645 +0200 --- ~/src/emacs/lisp/arc-mode.el 2013-06-20 13:40:03.496925664 +0200 *************** *** 689,697 **** (setq revert-buffer-function 'archive-mode-revert) (auto-save-mode 0) ! ;; Remote archives are not written by a hook. ! (if archive-remote nil ! (add-hook 'write-contents-functions 'archive-write-file nil t)) (make-local-variable 'require-final-newline) (setq require-final-newline nil) --- 689,695 ---- (setq revert-buffer-function 'archive-mode-revert) (auto-save-mode 0) ! (add-hook 'write-contents-functions 'archive-write-file nil t) (make-local-variable 'require-final-newline) (setq require-final-newline nil) --8<---------------cut here---------------end--------------->8--- > (I would appreciate very much a way to get a patch for fixing this, > if/when available) Could you, please, check whether the patch works for you? Best regards, Michael.