unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Oleksandr Gavenko <gavenkoa@gmail.com>
To: 28434@debbugs.gnu.org
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	[thread overview]
Message-ID: <86lglj6bkl.fsf@gavenkoa.example.com> (raw)

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	other threads:[~2017-09-12 18:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-12 18:01 Oleksandr Gavenko [this message]
2019-06-24 16:13 ` bug#28434: 25.2; Final "\ No newline at end of file" breaks Emacs patch handling Lars Ingebrigtsen
2019-06-24 22:50   ` Noam Postavsky
2019-06-24 23:09     ` Lars Ingebrigtsen
2019-06-24 23:58       ` Noam Postavsky
2019-06-25 11:16         ` Lars Ingebrigtsen
2019-06-25  2:41       ` Eli Zaretskii
2022-08-23  9:36 ` Lars Ingebrigtsen

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=86lglj6bkl.fsf@gavenkoa.example.com \
    --to=gavenkoa@gmail.com \
    --cc=28434@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 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).