GNU bug report logs -
#28434
25.2; Final "\ No newline at end of file" breaks Emacs patch handling.
Previous Next
Reported by: Oleksandr Gavenko <gavenkoa <at> gmail.com>
Date: Tue, 12 Sep 2017 18:02:01 UTC
Severity: minor
Found in version 25.2
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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/
This bug report was last modified 2 years and 359 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.