From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.devel Subject: Re: diff-mode misinterprets empty lines. Date: Mon, 14 Jan 2008 16:38:44 -0500 Message-ID: <6ek5mcgk9n.fsf@fencepost.gnu.org> References: <85ir3l767y.fsf@lola.goethe.zz> <87ir3d1tn7.fsf@penguin.cs.ucla.edu> <878x494f9w.fsf@rho.meyering.net> <857ijtwgpw.fsf@lola.goethe.zz> <87k5nt2xga.fsf@rho.meyering.net> <854pexur0g.fsf@lola.goethe.zz> <87hcix827c.fsf@penguin.cs.ucla.edu> <3n4pdrlshh.fsf@fencepost.gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1200346735 24139 80.91.229.12 (14 Jan 2008 21:38:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 14 Jan 2008 21:38:55 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 14 22:39:18 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JEX1Y-00068c-D3 for ged-emacs-devel@m.gmane.org; Mon, 14 Jan 2008 22:39:16 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JEX1A-0004yv-6g for ged-emacs-devel@m.gmane.org; Mon, 14 Jan 2008 16:38:52 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JEX15-0004yg-OH for emacs-devel@gnu.org; Mon, 14 Jan 2008 16:38:47 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JEX13-0004yT-Db for emacs-devel@gnu.org; Mon, 14 Jan 2008 16:38:46 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JEX13-0004yQ-7y for emacs-devel@gnu.org; Mon, 14 Jan 2008 16:38:45 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JEX13-0004FL-D4 for emacs-devel@gnu.org; Mon, 14 Jan 2008 16:38:45 -0500 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1JEX12-0001C8-Ex; Mon, 14 Jan 2008 16:38:44 -0500 X-Spook: MP5K-SD BROMURE quiche Glock White House eavesdropping X-Ran: j+[!P4k<)QV<+]hikWU0vfVuRkNY/G%K'8Zaj6L#S)vZx|4mKuNX#[zNLP:I/2n]&A.lh^ X-Hue: red X-Attribution: GM User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:86913 Archived-At: Stefan Monnier wrote: >> In an effort to clear FOR-RELEASE, here is a simple-minded attempt to >> deal with this. It seems to fix the original problem at least. > > It is problematic when you try to apply a hunk via C-c C-a because any > empty line following your hunk (e.g. the last hunk in a C-x v =) will be > taken as being part of the hunk and C-c C-a will think that the original > text was just missing a newline and will add it (as a result of its > fuzzy matching feature). Oh dear. Would it suffice to back up over empty lines at the end of a unified diff? Ie treat empty-lines as part of a hunk unless they are at the very end of the diff?