From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#17522: diff-mode frustrates attempt to correct corrupted diff file. Date: Fri, 23 May 2014 20:43:11 +0000 Message-ID: <20140523204311.GA4111@acm.acm> References: <20140518105055.GA3727@acm.acm> <20140521215636.GA3908@acm.acm> <20140522211407.GA3648@acm.acm> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1400878109 10211 80.91.229.3 (23 May 2014 20:48:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 23 May 2014 20:48:29 +0000 (UTC) Cc: 17522@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri May 23 22:48:22 2014 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 1WnwO4-0002S5-JN for geb-bug-gnu-emacs@m.gmane.org; Fri, 23 May 2014 22:48:20 +0200 Original-Received: from localhost ([::1]:45599 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnwO4-0001X1-27 for geb-bug-gnu-emacs@m.gmane.org; Fri, 23 May 2014 16:48:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46030) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnwNu-0001Wl-2a for bug-gnu-emacs@gnu.org; Fri, 23 May 2014 16:48:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WnwNm-0003RW-Iq for bug-gnu-emacs@gnu.org; Fri, 23 May 2014 16:48:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59379) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WnwNm-0003RS-Fz for bug-gnu-emacs@gnu.org; Fri, 23 May 2014 16:48:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WnwNl-0004Gn-TV for bug-gnu-emacs@gnu.org; Fri, 23 May 2014 16:48:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 May 2014 20:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17522 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17522-submit@debbugs.gnu.org id=B17522.140087805316363 (code B ref 17522); Fri, 23 May 2014 20:48:01 +0000 Original-Received: (at 17522) by debbugs.gnu.org; 23 May 2014 20:47:33 +0000 Original-Received: from localhost ([127.0.0.1]:58256 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WnwNI-0004Fr-RL for submit@debbugs.gnu.org; Fri, 23 May 2014 16:47:33 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:51741 helo=mail.muc.de) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WnwNE-0004Fe-BX for 17522@debbugs.gnu.org; Fri, 23 May 2014 16:47:29 -0400 Original-Received: (qmail 30645 invoked by uid 3782); 23 May 2014 20:47:26 -0000 Original-Received: from acm.muc.de (pD951B7C5.dip0.t-ipconnect.de [217.81.183.197]) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 23 May 2014 22:47:26 +0200 Original-Received: (qmail 4194 invoked by uid 1000); 23 May 2014 20:43:12 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de 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:89420 Archived-At: Hi, Stefan. On Thu, May 22, 2014 at 10:07:17PM -0400, Stefan Monnier wrote: > > So why can't we have a `y-or-n-p' or a `message' when diff-mode is about > > to change a hunk header, possibly fouling it up? > Because we don't agree on UI issues. Pardon? What has our alleged disagreement about some UI issues (which ones, by the way?) got to do with solving this bug? To restore some context, what happened was that whilst editing a patch file (which had become corrupted by email software) in Diff Mode, Diff Mode, without seeking permission from or even informing the user, corrupted a hunk header by writing 0 into the "number of lines" fields, thus leaving the patch file unusable. Do you think it is possible to amend the hunk header editing routine so that it can't make such mistakes? I'm sceptical. Just to emphasise once more, it was the surreptitious nature of Diff Mode's corruption that caused the pain. If it had been open about its changes, it would have been so much easier to reverse them. Do you have a better proposal for a fix to this bug than my proposal? > Stefan -- Alan Mackenzie (Nuremberg, Germany).