From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: Problems with the url package on w32? Date: Thu, 21 Dec 2006 11:03:43 +0100 Message-ID: <458A5BFF.3040507@student.lu.se> References: <87lkltztzy.fsf@freemail.hu> <871wniv89d.fsf@freemail.hu> <87wt5825wh.fsf@freemail.hu> <45887987.3040105@student.lu.se> <4589DD3C.3050609@student.lu.se> NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1166695482 22437 80.91.229.10 (21 Dec 2006 10:04:42 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 21 Dec 2006 10:04:42 +0000 (UTC) Cc: Juanma Barranquero , Eli Zaretskii , Michael Kifer , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 21 11:04:39 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by dough.gmane.org with esmtp (Exim 4.50) id 1GxKmw-0002xR-IE for ged-emacs-devel@m.gmane.org; Thu, 21 Dec 2006 11:04:34 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GxKmw-0001dd-2N for ged-emacs-devel@m.gmane.org; Thu, 21 Dec 2006 05:04:34 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GxKmL-0001br-BW for emacs-devel@gnu.org; Thu, 21 Dec 2006 05:03:57 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GxKmJ-0001af-HY for emacs-devel@gnu.org; Thu, 21 Dec 2006 05:03:55 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GxKmI-0001aK-G5 for emacs-devel@gnu.org; Thu, 21 Dec 2006 05:03:54 -0500 Original-Received: from [80.76.149.213] (helo=ch-smtp02.sth.basefarm.net) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GxKmF-0007au-Mk; Thu, 21 Dec 2006 05:03:52 -0500 Original-Received: from c83-254-145-24.bredband.comhem.se ([83.254.145.24]:61837 helo=[127.0.0.1]) by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.63) (envelope-from ) id 1GxKmC-0000bI-7B; Thu, 21 Dec 2006 11:03:50 +0100 User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) Original-To: Lennart Borgman In-Reply-To: <4589DD3C.3050609@student.lu.se> X-Antivirus: avast! (VPS 0661-0, 2006-12-20), Outbound message X-Antivirus-Status: Clean X-Scan-Result: No virus found in message 1GxKmC-0000bI-7B. X-Scan-Signature: ch-smtp02.sth.basefarm.net 1GxKmC-0000bI-7B 9b38b124f15e2755c8b77b28fdab156d X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:64047 Archived-At: Lennart Borgman wrote: > Juanma Barranquero wrote: >> On 12/20/06, Eli Zaretskii 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?