unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Lennart Borgman <lennart.borgman.073@student.lu.se>
Cc: Juanma Barranquero <lekktu@gmail.com>,
	Eli Zaretskii <eliz@gnu.org>, Michael Kifer <kifer@cs.sunysb.edu>,
	emacs-devel@gnu.org
Subject: Re: Problems with the url package on w32?
Date: Thu, 21 Dec 2006 11:03:43 +0100	[thread overview]
Message-ID: <458A5BFF.3040507@student.lu.se> (raw)
In-Reply-To: <4589DD3C.3050609@student.lu.se>

Lennart Borgman wrote:
> Juanma Barranquero wrote:
>> On 12/20/06, Eli Zaretskii <eliz@gnu.org> wrote:
>>
>>> I do, but I do it with "M-|", not with Ediff.
>>
>> I don't use ediff either. I was talking of cutting a patch from an
>> e-mail, for example, pasting it into a buffer, M-x diff-mode'ing and
>> doing C-c C-a. If your e-mail program did somehow alter the patch
>> (which Gmail does, unless you take pains to extract the patch from the
>> original view), C-c C-a often mistakenly says that it's applying hunks
>> which it's not.
>
> I tried to look into the problem with ediff-patch a bit. It took quite 
> some time to figure out what is going on. There are different bugs and 
> misfeatures.
>
> 1) First ediff-patch-file--internal calls call-process-region with a 
> shell as its program. This means that the file arguments must be 
> converted with convert-standard-filename. This is a clear bug.
>
> 2) Then ediff-shell has a bad initialization value in my opinion. On 
> w32 it is initialized to the value of shell-file-name at that time. 
> There is not very much sense in that. ediff-shell is used only 
> ediff-patch-file--internal. There it overrides shell-file-name. It 
> would be much better to initialize it to nil and then use this value 
> only if it is set. Otherwise shell-file-name should be used.
>
> 3) There is something very strange when calling patch this way from 
> emacs. It takes up to 10 s to apply that little patch Kim sent if 
> cmdproxy with gnuwin32 binaries or Cygwin is used as inferior shells. 
> Applying the patch from outside Emacs does not take any time at all 
> with gnubinaries in cmd.exe. Using MSYS for the inferior shell on the 
> other hand takes very little time. Is there something wrong with 
> cmdproxy and the call of it from emacs?
>
> Should I send patches for 1 + 2?

Looking into this a bit more I can see that 3 is probably a problem with 
line endings and the patch program. There might be more problems since 
cmdproxy is involved in the case taking long time (or actually just 
hangs) but not in the other, I am not sure about that. The problem with 
the line endings are however certain, see the end of this file for some 
tests of different patch programs on w32 I finished a year ago:

   http://ourcomments.org/GNU/patchcrlf/readme.txt

Now I believe that this is possible to solve within ediff if ediff 
always makes sure that the patch file and the file to patch always have 
the same line endings (and perhaps that this can be choosen to LF or 
CRLF). Further I think that the patched file of course should have the 
same line endings as the original file.


Michael, what do you think about this? I think the main part of this can 
be done in ediff-patch-file--internal, or?

  reply	other threads:[~2006-12-21 10:03 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <ur6vodg5m.fsf@gmail.com>
     [not found] ` <871wnnclkz.fsf@freemail.hu>
     [not found]   ` <uac2acxu0.fsf@gmail.com>
     [not found]     ` <87lkltztzy.fsf@freemail.hu>
2006-12-02 11:37       ` Problems with the url package on w32? Magnus Henoch
2006-12-03  3:15         ` Richard Stallman
2006-12-03 18:25           ` Magnus Henoch
2006-12-03 21:17             ` Kim F. Storm
2006-12-19 15:48               ` Kim F. Storm
2006-12-19 23:13                 ` Juanma Barranquero
2006-12-20 11:05                   ` Kim F. Storm
2006-12-20 12:05                     ` Juanma Barranquero
2006-12-19 23:45                 ` Lennart Borgman
2006-12-19 23:54                   ` Juanma Barranquero
2006-12-20  0:04                     ` Lennart Borgman
2006-12-20  0:08                       ` Juanma Barranquero
2006-12-20  6:57                     ` Eli Zaretskii
2006-12-20  9:07                       ` Juanma Barranquero
2006-12-20 10:52                         ` Eli Zaretskii
2006-12-20 11:06                           ` Juanma Barranquero
2006-12-20 21:41                         ` Stefan Monnier
2006-12-20 23:13                           ` Juanma Barranquero
2006-12-21 22:47                             ` Stefan Monnier
2006-12-21 22:56                               ` Juanma Barranquero
2006-12-21 23:31                                 ` Stefan Monnier
2006-12-21 23:13                               ` Lennart Borgman
2006-12-22 21:48                                 ` Stefan Monnier
2006-12-23  0:33                                   ` Lennart Borgman
2006-12-21  1:02                         ` Lennart Borgman
2006-12-21 10:03                           ` Lennart Borgman [this message]
2006-12-04  5:15             ` Richard Stallman
2006-12-04  8:55               ` Kim F. Storm
2006-12-05  1:45                 ` Richard Stallman
2006-12-20 11:22 LENNART BORGMAN
2006-12-20 14:36 ` Kim F. Storm
2006-12-21 11:52 ` Jason Rumney

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=458A5BFF.3040507@student.lu.se \
    --to=lennart.borgman.073@student.lu.se \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=kifer@cs.sunysb.edu \
    --cc=lekktu@gmail.com \
    /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).