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

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

bug#29916: 26.0.90; CRLF in diff-command output breaks smerge hunk heade


From: Eli Zaretskii
Subject: bug#29916: 26.0.90; CRLF in diff-command output breaks smerge hunk header parsing
Date: Mon, 01 Jan 2018 06:37:44 +0200

> From: Richard Copley <rcopley@gmail.com>
> Date: Sun, 31 Dec 2017 21:13:21 +0000
> Cc: Stefan Monnier <monnier@iro.umontreal.ca>, 29916@debbugs.gnu.org
> 
> >> >From 'emacs -Q', visit the patch file, do "M-x diff-mode RET", then
> >> move point into the second diff hunk (in editfns.c) and type RET
> >> (diff-goto-source).
> >
> > You mean M-RET, not RET, right?
> 
> No, with that recipe it is bound to o, <mouse-2>, RET, C-c C-c, M-o,
> ESC <mouse-2>, M-RET, <menu-bar> <Diff> <Jump to Source>.

Sorry, what recipe?  It's "emacs -Q", isn't it?  After visiting
txtWF9rI8yqfI.txt and typing "M-x diff-mode RET", "C-h c RET" says RET
is bound to 'newline'.  And "C-h w diff-goto-source RET" says

  diff-goto-source is on C-c C-c, M-o, ESC <mouse-2>, M-RET, <menu-bar> <Diff> 
<Jump to Source>

What am I missing?  Why do we get different results both for the
command binding and for the recipe?

> > If not, where did you get the ported Diff command?
> 
> It's the (ubiquitous) gnuwin32 port of diff 2.8.7.

Same here.

> > I suggest to use utf-8-emacs instead of emacs-mule (you _really_ don't
> > want the latter).  I do agree that forcing -unix EOL when decoding the
> > output of Diff is probably wrong.  Stefan?
> 
> Do you mean utf-8, with the end of line conversion left unspecified?
> According to the manual (33.10.1), "'emacs-internal’ is an alias for
> ‘utf-8-emacs’."

"C-h C emacs-internal RET" says:

  U -- emacs-internal (alias of utf-8-emacs-unix)

  Support for all Emacs characters (including non-Unicode characters).
  Type: utf-8 (UTF-8: Emacs internal multibyte form)
  EOL type: LF

So emacs-internal fixes the EOL format at Unix-style LF.  By contrast,
utf-8-emacs does not:

  U -- utf-8-emacs

  Support for all Emacs characters (including non-Unicode characters).
  Type: utf-8 (UTF-8: Emacs internal multibyte form)
  EOL type: Automatic selection from:
          [utf-8-emacs-unix utf-8-emacs-dos utf-8-emacs-mac]





reply via email to

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