unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Sergei Organov <osv@javad.com>
To: bug-gnu-emacs@gnu.org
Subject: diff-mode misinterprets empty lines.
Date: Tue, 27 Nov 2007 21:04:17 +0300	[thread overview]
Message-ID: <8763zno99a.fsf@osv.gnss.ru> (raw)

Hello,

In GNU Emacs 22.1.1 (i686-pc-linux-gnu, GTK+ Version 2.8.20).

GNU diff since version 2.8.7 outputs empty lines in the unified diff
format for empty context lines that don't change (instead of single
space followed by newline). See, e.g., the thread starting here:

<http://lists.gnu.org/archive/html/bug-gnu-utils/2006-09/msg00005.html>

Emacs diff-mode interprets empty lines as patch hunk separators, in
particular leading to wrong calculation of the length put into hunk
header. Another symptom is "C-c C-n" (diff-restrict-view) wrongly
restricts hunks with empty line(s).

Here is a patch hunk to test on:

@@ -1,7 +1,7 @@
 l1

 l3
-	  abc
+	  cba
 l5
 l6
 l7


-- 
Sergei Organov.




                 reply	other threads:[~2007-11-27 18:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=8763zno99a.fsf@osv.gnss.ru \
    --to=osv@javad.com \
    --cc=bug-gnu-emacs@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).