From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#14541: 24.3.50; `ediff-buffers' does not play well with recent Cygwin version Date: Wed, 5 Jun 2013 16:55:01 -0700 (PDT) Message-ID: <9db8fa66-43bf-4d68-841d-8ddb3c1a65cf@default> References: <7d461150-fe55-4278-bb7a-22fc24811364@default>> <83hahfxkw9.fsf@gnu.org>> <2c39c869-9210-432d-aa95-d392e9ee8dac@default> <87txlfrvd8.fsf@Rainer.invalid> <5f681b7a-8e4d-4263-9337-817bd2c00fa6@default> <87a9n41fe0.fsf@Rainer.invalid> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1370476574 22045 80.91.229.3 (5 Jun 2013 23:56:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 5 Jun 2013 23:56:14 +0000 (UTC) To: Achim Gratz , 14541@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 06 01:56:11 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UkNYp-00006I-8g for geb-bug-gnu-emacs@m.gmane.org; Thu, 06 Jun 2013 01:56:11 +0200 Original-Received: from localhost ([::1]:42583 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkNYo-0003am-Mm for geb-bug-gnu-emacs@m.gmane.org; Wed, 05 Jun 2013 19:56:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33882) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkNYg-0003ac-Te for bug-gnu-emacs@gnu.org; Wed, 05 Jun 2013 19:56:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UkNYb-0007OD-0W for bug-gnu-emacs@gnu.org; Wed, 05 Jun 2013 19:56:02 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36504) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UkNYa-0007O7-P6 for bug-gnu-emacs@gnu.org; Wed, 05 Jun 2013 19:55:56 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UkNac-0005HU-81 for bug-gnu-emacs@gnu.org; Wed, 05 Jun 2013 19:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 05 Jun 2013 23:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14541 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 14541-submit@debbugs.gnu.org id=B14541.137047664320218 (code B ref 14541); Wed, 05 Jun 2013 23:58:02 +0000 Original-Received: (at 14541) by debbugs.gnu.org; 5 Jun 2013 23:57:23 +0000 Original-Received: from localhost ([127.0.0.1]:53095 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UkNZy-0005G0-5j for submit@debbugs.gnu.org; Wed, 05 Jun 2013 19:57:23 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:41162) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UkNZu-0005Fa-F8 for 14541@debbugs.gnu.org; Wed, 05 Jun 2013 19:57:20 -0400 Original-Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r55Nt4G4022694 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 5 Jun 2013 23:55:06 GMT Original-Received: from userz7022.oracle.com (userz7022.oracle.com [156.151.31.86]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r55Nt3oe009017 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 5 Jun 2013 23:55:03 GMT Original-Received: from abhmt120.oracle.com (abhmt120.oracle.com [141.146.116.72]) by userz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r55Nt2Ht009006; Wed, 5 Jun 2013 23:55:02 GMT In-Reply-To: <87a9n41fe0.fsf@Rainer.invalid> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.7 (607090) [OL 12.0.6668.5000 (x86)] X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:74830 Archived-At: > You are putting this file on EmacsWiki for others to use, aren't you? Yes, I am. To use if they want to. I put a lot of stuff on Emacs Wiki for others to use. Some of it good, some of it no doubt not as good. And I will continue to do so, until I stop hacking Emacs. I put code (and doc and...) on the wiki for anyone who finds it helpful and wants to use it. Anyone who does not want to use it need not use it. Anyone who wants to use setup-cygwin.el as inspiration for their own, better setup file is welcome to copy & adapt it. They are also welcome to ignore it altogether. It is offered as is - no guarantees. You clearly have your idea of what can be helpful; I have mine. I know that this file has helped people. And I don't know of anyone who has been harmed by its existence. But no doubt we can do better - please do! > Secondly, that warning is there for a reason, so simply switching > it off certainly isn't going to do the right thing for everyone. No one says that switching it off pretends to do the right thing for everyone. (Like Cygwin, for that matter, or even Emacs...) Are you always this black & white? Surely, turning it off (or on) for everyone would *NOT* DTRT for everyone. Otherwise there would be no need for the switch. Where you go wrong (apparently) is assuming that setup-cygwin.el is for everyone. And (seemingly) that if it is not good for everyone then it cannot be good for anyone. > >> Don't. You might override other settings that the user wants to take > >> effect or at best produce a confusing no-op. You'd be much better off > >> if you would use cygpath to convert to POSIX instead. > > > > I'll leave it in setup-cygwin.el, at least for now. But I'll add a > > comment per what Eli said: that if come other Cygwin process started > > earlier and turned this off then turning it on here has no effect. >=20 > Again: it simply doesn't work the way you think it works. I like how you are so certain of what I think. ;-) Should we judge your certainty about Cygwin and Emacs similarly? I hope not. > The comment isn't helping that issue in any way. I disagree. I believe there are others who, like me, use Cygwin mainly to provide `grep' etc. to Emacs. There are also people who do not even know how to set an env var in Windows, or might be hesitant to do so. For such a user, this file likely - typically - will get Emacs working with Cygwin. The real shame is that Cygwin no longer works with Emacs out of the box. From my perspective, which is admittedly limited wrt Cygwin, that's more or less a regression. (Perhaps I should have hung onto my old version of Cygwin...) And the thing about the env var being cached and looked up only by the first Cygwin process seems downright perverted. I repeat: from my limited and ignorant perspective. I have used Emacs on Windows with Cygwin for many moon (decades). Always in a limited way, but always with no particular problem. > It is wrong to do this in setup-cygwin.el even when you want this > environment variable to have exactly that value. Wrong? Feel free to provide an Emacs setup file that "DTRT for everyone" all the time. Feel free to point out, on the wiki or anywhere else, that setup-cygwin.el is wrong, bad, evil, or whatever. But especially, please do provide something better. I will be the first to use it and to point others to it, believe me! I posted setup-cygwin.el because it took me a while to piece together the stuff it contains, and I found that I needed it, in addition to cygwin-mount.el. I don't know or imagine that everyone needs it. I make no claim about its contents being 100% correct or complete. Far from it. It is a hack job born out of ignorance. It is just something I have used and still use. And I know it has helped others too, regardless of its probably being "wrong" in more than one way. And I'll be glad to use something better, when I come across it. > It must already be set before Emacs gets started. Not as far as I can see. Not for the case I use it for: using Cygwin almost exclusively with Emacs. In that use case, the first Cygwin process is launched by Emacs. I do understand that setting the env var is better (and is sure). I understand that it is needed if you expect to use Cygwin outside Emacs, to be sure that the first Cygwin process sees the same value. But setup-cygwin.el works for the simple Emacs-only use case - just in case you have not set the env var . > > Sounds like the only good approach for an Emacs user on Windows, with > > Cygwin installed, is to set the env var at the system level. If that > > is the case (please confirm) then I'll mention that too in a > > setup-cygwin.el comment. (And we might want to mention that in the > > Emacs manual?) >=20 > The only way to have it working reliably is to set it from the > system panel, then log off and on again. Sounds right to me. And Eli too confirmed that. But wasn't it you, BTW, who said that an alternative (presumably working reliably) is to "use cygpath to convert to POSIX instead"? Eli was more definitive, seemingly rejecting that alternative you mentioned, when he confirmed "That's the _only_ way, yes." Of course, "working reliably" is a strange term for a workaround for such a hack (apparently) as this exceptional env var presents. It may work reliably, but it seems to be a weird way of doing things (the caching/one-time-lookup, I mean). (Thinking that it seems weird does not mean that I have a better idea for Cygwin, obviously. Presumably this hack was the best approach available.) > I'm not sure what you want Emacs to document: the problem is that you > are using non-Windows tools together with a Windows Emacs and you aren't > correctly converting the different path conventions by these tools and > Emacs. That is not a Cygwin problem and not an Emacs problem. Fair enough (though Cygwin is a Windows tool, AFAIK). Nevertheless, at least for the uses I make of Cygwin with Emacs, it seems to work fine (once the env var is set), and it has for decades (without the env var). Now, if I used Cygwin as a *developer* on Windows (outside Emacs), that might be different, as Eli has pointed out in the past. I don't doubt that there is an impedance mismatch between Windows Emacs and Cygwin, if you look hard enough. For what I do, however, I haven't run into it, so far. I make no claim for anyone else. > > OK, I suppose that's not the only good approach. I guess you're > > suggesting another, for someone who is willing to change to POSIX: > > use the cygpath utility. Feel free to document that one (for Emacs > > users)... >=20 > Actually, emacs-w32 from Cygwin is much better in almost all regards and > doesn't have the problem to begin with because it never uses any Windows > path names. Aha - that's where you're coming from. Thanks, but no thanks. I will stick with vanilla GNU Emacs. (Call me wrong.) But I am sure both you and Eli are right that the combination of Windows Emacs with Cygwin is not ideal for either. It happens that it works well enough for me, and it's the package I prefer - so far. Sorry about that. IMO, it would be good if Cygwin played better with Windows Emacs. But I have no idea how feasible or difficult that would be to realize.