unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: Where is patch?
       [not found] ` <dnpsv8$o2r$1@sea.gmane.org>
@ 2005-12-14 20:28   ` Lennart Borgman
  2005-12-15  4:29     ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Lennart Borgman @ 2005-12-14 20:28 UTC (permalink / raw)
  Cc: cygwin, Emacs Devel

René Berber wrote:

>Lennart Borgman wrote:
>
>  
>
>>I am having trouble with patch. My Cygwin patch (and my GnuWin32 patch)
>>says it is version 2.5.9. But where is the sources for this? I looked at
>>ftp://ftp.gnu.org/gnu/patch and they only have version 2.5.4. How can
>>that be?
>>    
>>
>
>The latest GNU patch version compiles out of the box and it works better than
>the one distributed with Cygwin.  By "works better" I mean that Cygwin's patch
>sometimes fail when GNU patch works perfect.
>  
>
That is interesting. However my problem is with line endings. It turned 
out that the file to patch has CR-LF line endings (which is ok) and the 
patch file had LF line endings. This surprised me, I did not notice it 
first. In my opinion it should not have had that. It came from 
Thunderbird on MS Windows and I just pasted into a new file in Emacs. 
Then Emacs made the decision to save the file with LF line endings.

There are two things I would like here:

*** For patch: I would like it to discover that the line ending type of 
the patch file and the file to patch differ. I would then like patch to 
convert the line endings in the patch read from the patch file to that 
kind used in the file to patch. (It should not change the patch file of 
course.) That would be enough to solve my problem. However I would like 
such functionality to go into the main patch distribution if possible. 
That would save work I hope.

*** For Emacs: I would like the default on MS Windows to be CR-LF line 
endings. That would in my opinion be less surpricing for an MS Windows user.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: Where is patch?
@ 2005-12-14 20:47 Richard Campbell
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Campbell @ 2005-12-14 20:47 UTC (permalink / raw)


> *** For Emacs: I would like the default on MS Windows to be CR-LF line endings. That would in my opinion be less surpricing for an MS Windows user.

1. My opinion is that \n line endings on Cygwin (a Unix-ish environment) are less surprising.  
2. Cygwin already has a feature for determining line endings for files opened in text mode, and a corresponding install setting for the default (dos versus unix).  If you wanted a default CR-LF ending out of Emacs, you could get it that way.

-Richard Campbell.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Where is patch?
  2005-12-14 20:28   ` Lennart Borgman
@ 2005-12-15  4:29     ` Eli Zaretskii
  0 siblings, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2005-12-15  4:29 UTC (permalink / raw)
  Cc: r.berber, cygwin, emacs-devel

> Date: Wed, 14 Dec 2005 21:28:54 +0100
> From: Lennart Borgman <lennart.borgman.073@student.lu.se>
> Cc: cygwin@cygwin.com, Emacs Devel <emacs-devel@gnu.org>
> 
> *** For patch: I would like it to discover that the line ending type of 
> the patch file and the file to patch differ.

Patch does that already if you use the --binary option on Windows.

> *** For Emacs: I would like the default on MS Windows to be CR-LF line 
> endings. That would in my opinion be less surpricing for an MS Windows user.

We decided long ago to preserve the EOL format, and I think that
decision was correct.  As I wrote elsewhere, I use Patch from within
Emacs on Windows with no problems at all.  Emacs has commands to force
specific EOL types when it saves files and communicates with
subordinate programs, so the defaults are not really important.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-12-15  4:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-14 20:47 Where is patch? Richard Campbell
     [not found] <43A064AD.4050604@student.lu.se>
     [not found] ` <dnpsv8$o2r$1@sea.gmane.org>
2005-12-14 20:28   ` Lennart Borgman
2005-12-15  4:29     ` Eli Zaretskii

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).