all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: 17522@debbugs.gnu.org
Subject: bug#17522: diff-mode frustrates attempt to correct corrupted diff file.
Date: Sun, 18 May 2014 10:50:55 +0000	[thread overview]
Message-ID: <20140518105055.GA3727@acm.acm> (raw)

Hi, Emacs.

On

GNU Emacs 24.4.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.8.7) of 2014-04-19 on acm.acm

, I have a diff which has been corrupted during transmission by email.  I
have loaded this diff into a Diff Mode buffer.  At the head of one of the
hunks appears:

    @@ -3155,115 +3160,38 @

, and three times in the hunk a long line has got split somehow, like
this:

   -                 (message "Eval error in the `c-lang-defvar' or `c-lang-setvar' for
   `%s'%s: %S"

.  When I attempt to correct the patch by removing the spurious line feed
using M-^, the header line is (silently) corrupted by replacing the two
"number of lines" fields with zeros, thusly:

    @@ -3155,0 +3160,0 @

.  This is surely a bug.  The workaround seems to be to use Fundamental
Mode.

-- 
Alan Mackenzie (Nuremberg, Germany).
 





             reply	other threads:[~2014-05-18 10:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-18 10:50 Alan Mackenzie [this message]
2014-05-19 15:39 ` bug#17522: diff-mode frustrates attempt to correct corrupted diff file Glenn Morris
2014-05-20 13:54 ` Stefan Monnier
2014-05-21 21:56   ` Alan Mackenzie
2014-05-22  1:32     ` Stefan Monnier
2014-05-22 21:14       ` Alan Mackenzie
2014-05-23  2:07         ` Stefan Monnier
2014-05-23 20:43           ` Alan Mackenzie
2014-05-24  3:19             ` Stefan Monnier
2014-05-25 16:07       ` Alan Mackenzie
2014-05-25 20:18         ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140518105055.GA3727@acm.acm \
    --to=acm@muc.de \
    --cc=17522@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.