unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Where is patch? - problems with patch.exe on w32
Date: Thu, 15 Dec 2005 06:26:07 +0200	[thread overview]
Message-ID: <uacf3q940.fsf@gnu.org> (raw)
In-Reply-To: <43A07AC3.1030209@student.lu.se> (message from Lennart Borgman on Wed, 14 Dec 2005 21:04:19 +0100)

> Date: Wed, 14 Dec 2005 21:04:19 +0100
> From: Lennart Borgman <lennart.borgman.073@student.lu.se>
> 
> The trouble I had turned out to be one with line endings. For some 
> reason patch does not behave as Emacs on w32 when it comes to line 
> endings. A line and should just be a line end in my opinion. The patched 
> text file should retain its original line format. If this is possible 
> then that would really give me and other using w32 a fair chance of 
> doing useful work. So I hope to get in contact with the patch maintainer 
> about this.

I use the GnuWin32 port of Patch on Windows, and it works fine for me.
Since I checkout Emacs files with -kb option to "cvs up", they (the
text files in Emacs source tree) have Unix-style EOLs.  Therefore, I
always invoke Patch with the --binary command-line option, which
causes Patch to preserve the Unix EOL format in the patched files.
Since Patch already knows how to detect DOS-style CR-LF EOLs in the
patch files and strip the CRs, this invocation method takes care of
all the problems with EOLs I ever had.

If I need to invoke Patch from within Emacs (e.g., if the patch was
sent in an email message), I do that with "C-x RET c Unix RET M-|",
which causes Emacs to pass the patch file to Patch with Unix EOLs.

These are all the tricks I need to get Patch DTRT on Windows.  It
works perfectly.

  reply	other threads:[~2005-12-15  4:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <43A064AD.4050604@student.lu.se>
     [not found] ` <20051214192858.GM2399@calimero.vinschen.de>
     [not found]   ` <43A07425.70205@student.lu.se>
2005-12-14 20:04     ` Where is patch? - problems with patch.exe on w32 Lennart Borgman
2005-12-15  4:26       ` Eli Zaretskii [this message]
2005-12-15  8:19         ` Lennart Borgman
2005-12-15 19:26           ` Eli Zaretskii
2005-12-15 20:19             ` Lennart Borgman
2005-12-16  7:38               ` Eli Zaretskii
     [not found] ` <dnpsv8$o2r$1@sea.gmane.org>
2005-12-14 20:28   ` Where is patch? Lennart Borgman
2005-12-15  4:29     ` Eli Zaretskii

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=uacf3q940.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@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).