bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#28434: 25.2; Final "\ No newline at end of file" breaks Emacs patch


From: Oleksandr Gavenko
Subject: bug#28434: 25.2; Final "\ No newline at end of file" breaks Emacs patch handling.
Date: Tue, 12 Sep 2017 21:01:14 +0300

In GNU Emacs 25.2.1 (i686-w64-mingw32)
 of 2017-04-24 built on LAPHROAIG

It happens with a lot of tools (diff/hg/git). If file doesn't end on new line
diff file has:

  \ No newline at end of file

C-c C-c (diff-goto-source) on that hunk says:

  Hunk text not found

C-c C-a (diff-apply-hunk) says:

  diff-apply-hunk: Can’t find the text to patch

It's very annoying as I have no control over file content and sometime can't
add final new line.

Emacs commands in diff mode should tolerate ``\`` message about missing final
new line.

ediff-diff-ok-lines-regexp is:

  "^\\([0-9,]+[acd][0-9,]+?$\\|[<>] \\|---\\|.*Warning *:\\|.*No 
+newline\\|.*missing +newline\\|^?$\\)"

and match that line.

I live with that problem from Emacs 22.x or so. Surprised why no one fixed it 
yet.

-- 
http://defun.work/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]