unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* `eshell-under-cygwin-p' etc. inappropriate?
@ 2002-08-06  9:24 John Paul Wallington
  2002-08-06 20:28 ` John Wiegley
  0 siblings, 1 reply; 17+ messages in thread
From: John Paul Wallington @ 2002-08-06  9:24 UTC (permalink / raw)
  Cc: emacs-devel

I was suprised to discover that the following change was applied to
Emacs yesterday:

2002-04-09  John Paul Wallington  <jpw@shootybangbang.com>

	* esh-util.el (eshell-under-cygwin-p): New function.
	* em-cmpl.el (eshell-cmpl-ignore-case): Use it.
	* em-dirs.el (eshell/cd): Ditto.
	* em-glob.el (eshell-glob-case-insensitive): Ditto.
	* em-hist.el (eshell-previous-matching-input-string-position): Ditto.
	* esh-ext.el (eshell-binary-suffixes): Ditto.

This was a patch I suggested for the eshell XEmacs package. I'm not
certain it is appropriate for XEmacs, but I don't think it should have
been installed in Emacs.  I thought it had been rejected, rightly.

In Emacs, the eshell files are located in the lisp/eshell subdirectory
so the ChangeLog entry is wrong (they suit the XEmacs package layout).
Furthermore, `eshell-under-cygwin-p' is a misleading name: it should
probably be `eshell-under-xemacs-cygwin-p' or similar.

I don't understand why these changes were installed now, four months
after they were suggested.

-- 
John Paul Wallington

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

* Re: `eshell-under-cygwin-p' etc. inappropriate?
  2002-08-06  9:24 `eshell-under-cygwin-p' etc. inappropriate? John Paul Wallington
@ 2002-08-06 20:28 ` John Wiegley
  2002-08-07  5:06   ` John Paul Wallington
  2002-08-10  0:05   ` John Paul Wallington
  0 siblings, 2 replies; 17+ messages in thread
From: John Wiegley @ 2002-08-06 20:28 UTC (permalink / raw)


>>>>> On Tue Aug  6, John writes:

> This was a patch I suggested for the eshell XEmacs package. I'm not
> certain it is appropriate for XEmacs, but I don't think it should
> have been installed in Emacs.  I thought it had been rejected,
> rightly.

That's odd; I thought we had agreed to check them in.  Why should the
XEmacs version diverge from Emacs?  Emacs runs under cygwin also.

> Furthermore, `eshell-under-cygwin-p' is a misleading name: it should
> probably be `eshell-under-xemacs-cygwin-p' or similar.

Why?

> I don't understand why these changes were installed now, four months
> after they were suggested.

If you want them removed, I will remove them.  It's been four months
because that's how long it's taken me to get back to my Emacs work.

John

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

* Re: `eshell-under-cygwin-p' etc. inappropriate?
  2002-08-07  5:06   ` John Paul Wallington
@ 2002-08-07  5:02     ` Eli Zaretskii
  2002-08-07  5:23       ` John Wiegley
  2002-08-08 17:23     ` Tak Ota
  1 sibling, 1 reply; 17+ messages in thread
From: Eli Zaretskii @ 2002-08-07  5:02 UTC (permalink / raw)
  Cc: emacs-devel


On 7 Aug 2002, John Paul Wallington wrote:

> Maybe `eshell-under-cygwin-p' should be called something else?

What difference in behavior is that test supposed to handle?  Perhaps 
there's a cleaner way of taking care of that problem.

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

* Re: `eshell-under-cygwin-p' etc. inappropriate?
  2002-08-06 20:28 ` John Wiegley
@ 2002-08-07  5:06   ` John Paul Wallington
  2002-08-07  5:02     ` Eli Zaretskii
  2002-08-08 17:23     ` Tak Ota
  2002-08-10  0:05   ` John Paul Wallington
  1 sibling, 2 replies; 17+ messages in thread
From: John Paul Wallington @ 2002-08-07  5:06 UTC (permalink / raw)


John Wiegley <johnw@gnu.org> wrote:

> >>>>> On Tue Aug  6, John writes:
> 
> > This was a patch I suggested for the eshell XEmacs package. I'm not
> > certain it is appropriate for XEmacs, but I don't think it should
> > have been installed in Emacs.  I thought it had been rejected,
> > rightly.
> 
> That's odd; I thought we had agreed to check them in.  Why should the
> XEmacs version diverge from Emacs?  Emacs runs under cygwin also.

XEmacs can be built both for Windows and for Cygwin, and the behavior
of the builds is different.  Emacs cannot be built for Cygwin, I
think.  You are right that eshell shouldn't diverge; I hadn't thought
about that in April.
 
> > Furthermore, `eshell-under-cygwin-p' is a misleading name: it should
> > probably be `eshell-under-xemacs-cygwin-p' or similar.
> 
> Why?

Because with Emacs running on/under Cygwin it will return nil.  It
really only tests whether you have the XEmacs Cygwin build.

> > I don't understand why these changes were installed now, four months
> > after they were suggested.
> 
> If you want them removed, I will remove them.  It's been four months
> because that's how long it's taken me to get back to my Emacs work.

Maybe `eshell-under-cygwin-p' should be called something else?

-- 
John Paul Wallington

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

* Re: `eshell-under-cygwin-p' etc. inappropriate?
  2002-08-07  5:23       ` John Wiegley
@ 2002-08-07  5:23         ` Eli Zaretskii
  2002-08-07  6:10           ` John Paul Wallington
  0 siblings, 1 reply; 17+ messages in thread
From: Eli Zaretskii @ 2002-08-07  5:23 UTC (permalink / raw)
  Cc: emacs-devel


On Tue, 6 Aug 2002, John Wiegley wrote:

> >>>>> On Tue Aug  6, Eli writes:
> 
> > On 7 Aug 2002, John Paul Wallington wrote:
> >> Maybe `eshell-under-cygwin-p' should be called something else?
> 
> > What difference in behavior is that test supposed to handle?
> > Perhaps there's a cleaner way of taking care of that problem.
> 
> I think he wants a function that means "DOS-ish behavior for certain
> things".

Sure, but I'd like to know the gory details.  Sometimes you can eat the 
cake and have it, too.

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

* Re: `eshell-under-cygwin-p' etc. inappropriate?
  2002-08-07  5:02     ` Eli Zaretskii
@ 2002-08-07  5:23       ` John Wiegley
  2002-08-07  5:23         ` Eli Zaretskii
  0 siblings, 1 reply; 17+ messages in thread
From: John Wiegley @ 2002-08-07  5:23 UTC (permalink / raw)


>>>>> On Tue Aug  6, Eli writes:

> On 7 Aug 2002, John Paul Wallington wrote:
>> Maybe `eshell-under-cygwin-p' should be called something else?

> What difference in behavior is that test supposed to handle?
> Perhaps there's a cleaner way of taking care of that problem.

I think he wants a function that means "DOS-ish behavior for certain
things".

John

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

* Re: `eshell-under-cygwin-p' etc. inappropriate?
  2002-08-07  5:23         ` Eli Zaretskii
@ 2002-08-07  6:10           ` John Paul Wallington
  2002-08-07 20:32             ` John Wiegley
  0 siblings, 1 reply; 17+ messages in thread
From: John Paul Wallington @ 2002-08-07  6:10 UTC (permalink / raw)


Eli Zaretskii <eliz@is.elta.co.il> wrote:

> On Tue, 6 Aug 2002, John Wiegley wrote:
> 
> > >>>>> On Tue Aug  6, Eli writes:
> > 
> > > On 7 Aug 2002, John Paul Wallington wrote:
> > >> Maybe `eshell-under-cygwin-p' should be called something else?
> > 
> > > What difference in behavior is that test supposed to handle?
> > > Perhaps there's a cleaner way of taking care of that problem.
> > 
> > I think he wants a function that means "DOS-ish behavior for certain
> > things".
> 
> Sure, but I'd like to know the gory details.  Sometimes you can eat the 
> cake and have it, too.

It was only for XEmacs Cygwin build: AFAICR, executables have
extensions such as .exe and the file system was case-insensitive (is
that the right phrase? eg README and ReadMe meant the same file,
although the filename's case was retained).

-- 
John Paul Wallington

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

* Re: `eshell-under-cygwin-p' etc. inappropriate?
  2002-08-07  6:10           ` John Paul Wallington
@ 2002-08-07 20:32             ` John Wiegley
  2002-08-07 21:53               ` John Paul Wallington
  2002-08-08  4:50               ` Eli Zaretskii
  0 siblings, 2 replies; 17+ messages in thread
From: John Wiegley @ 2002-08-07 20:32 UTC (permalink / raw)


>>>>> On Tue Aug  6, John writes:

> It was only for XEmacs Cygwin build: AFAICR, executables have
> extensions such as .exe

Eshell is now using `exec-suffixes', which should be set properly by
the build environment.

> and the file system was case-insensitive

Then let's make a config variable eshell-case-sensitive-filesystem or
some such.

John

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

* Re: `eshell-under-cygwin-p' etc. inappropriate?
  2002-08-07 20:32             ` John Wiegley
@ 2002-08-07 21:53               ` John Paul Wallington
  2002-08-08  4:50               ` Eli Zaretskii
  1 sibling, 0 replies; 17+ messages in thread
From: John Paul Wallington @ 2002-08-07 21:53 UTC (permalink / raw)


John Wiegley <johnw@gnu.org> wrote:

> >>>>> On Tue Aug  6, John writes:
> 
> > It was only for XEmacs Cygwin build: AFAICR, executables have
> > extensions such as .exe
> 
> Eshell is now using `exec-suffixes', which should be set properly by
> the build environment.

Okay.

> > and the file system was case-insensitive
> 
> Then let's make a config variable eshell-case-sensitive-filesystem or
> some such.

That sounds good.  I think it would be good to revert my patch.

-- 
John Paul Wallington

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

* Re: `eshell-under-cygwin-p' etc. inappropriate?
  2002-08-07 20:32             ` John Wiegley
  2002-08-07 21:53               ` John Paul Wallington
@ 2002-08-08  4:50               ` Eli Zaretskii
  2002-08-10  0:44                 ` John Wiegley
  1 sibling, 1 reply; 17+ messages in thread
From: Eli Zaretskii @ 2002-08-08  4:50 UTC (permalink / raw)
  Cc: emacs-devel


On Wed, 7 Aug 2002, John Wiegley wrote:

> >>>>> On Tue Aug  6, John writes:
> 
> > It was only for XEmacs Cygwin build: AFAICR, executables have
> > extensions such as .exe
> 
> Eshell is now using `exec-suffixes', which should be set properly by
> the build environment.

Right; and the .exe suffix is not specific to Cygwin, it's relevant to 
all versions of Emacs running on DOS/Windows systems.

> > and the file system was case-insensitive
> 
> Then let's make a config variable eshell-case-sensitive-filesystem or
> some such.

If Eshell must know about the case insensitivity.  Where is that important?

Also, this aspect is not specific to Cygwin, either.  It's a general 
``feature'' of DOS/Windows filesystems.

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

* Re: `eshell-under-cygwin-p' etc. inappropriate?
  2002-08-07  5:06   ` John Paul Wallington
  2002-08-07  5:02     ` Eli Zaretskii
@ 2002-08-08 17:23     ` Tak Ota
  2002-08-11 13:49       ` Eli Zaretskii
  1 sibling, 1 reply; 17+ messages in thread
From: Tak Ota @ 2002-08-08 17:23 UTC (permalink / raw)
  Cc: emacs-devel

07 Aug 2002 06:06:12 +0100: John Paul Wallington <jpw@shootybangbang.com> wrote:

> Maybe `eshell-under-cygwin-p' should be called something else?

I use the following function for my own use.

(defun cygwin-exists-p ()
  "Search cygwin1.dll in the exec-path and return the full path if it exists or nil otherwise."
  (catch 'exists
    (let ((path-list exec-path))
      (while path-list
	(let ((full-path (expand-file-name "cygwin1.dll" (car path-list))))
	  (if (file-exists-p full-path)
	      (throw 'exists full-path))
	  (setq path-list (cdr path-list)))))))

This has been often useful for me regardless of under emacs or
xemacs.  Since it is w32 platform specific w32-cygwin-exists-p maybe
more appropriate.

-Tak

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

* Re: `eshell-under-cygwin-p' etc. inappropriate?
  2002-08-06 20:28 ` John Wiegley
  2002-08-07  5:06   ` John Paul Wallington
@ 2002-08-10  0:05   ` John Paul Wallington
  2002-08-10  0:06     ` John Wiegley
  1 sibling, 1 reply; 17+ messages in thread
From: John Paul Wallington @ 2002-08-10  0:05 UTC (permalink / raw)
  Cc: emacs-devel

John Wiegley <johnw@gnu.org> wrote:

> >>>>> On Tue Aug  6, John writes:
[...]
> > I don't understand why these changes were installed now, four months
> > after they were suggested.
> 
> If you want them removed, I will remove them.  It's been four months
> because that's how long it's taken me to get back to my Emacs work.

If the offer still stands, I want them removed.

-- 
John Paul Wallington

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

* Re: `eshell-under-cygwin-p' etc. inappropriate?
  2002-08-10  0:05   ` John Paul Wallington
@ 2002-08-10  0:06     ` John Wiegley
  0 siblings, 0 replies; 17+ messages in thread
From: John Wiegley @ 2002-08-10  0:06 UTC (permalink / raw)


>>>>> On Fri Aug  9, John writes:

>> If you want them removed, I will remove them.  It's been four
>> months because that's how long it's taken me to get back to my
>> Emacs work.

> If the offer still stands, I want them removed.

Ok, removing now...

John

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

* Re: `eshell-under-cygwin-p' etc. inappropriate?
  2002-08-08  4:50               ` Eli Zaretskii
@ 2002-08-10  0:44                 ` John Wiegley
  0 siblings, 0 replies; 17+ messages in thread
From: John Wiegley @ 2002-08-10  0:44 UTC (permalink / raw)


>>>>> On Wed Aug  7, Eli writes:

>> Then let's make a config variable eshell-case-sensitive-filesystem
>> or some such.

> If Eshell must know about the case insensitivity.  Where is that
> important?

Well, globbing, history searching, etc.  All of these subsystems
already have a variable to test against, but they are many.  They
should be collapsed into a general "case-insensitive" variable.

John

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

* Re: `eshell-under-cygwin-p' etc. inappropriate?
  2002-08-08 17:23     ` Tak Ota
@ 2002-08-11 13:49       ` Eli Zaretskii
  2002-08-12 18:19         ` Tak Ota
  0 siblings, 1 reply; 17+ messages in thread
From: Eli Zaretskii @ 2002-08-11 13:49 UTC (permalink / raw)
  Cc: jpw, emacs-devel

> From: Tak Ota <Takaaki.Ota@am.sony.com>
> Date: Thu, 08 Aug 2002 10:23:16 -0700 (PDT)
> 
> 07 Aug 2002 06:06:12 +0100: John Paul Wallington <jpw@shootybangbang.com> wrote:
> 
> > Maybe `eshell-under-cygwin-p' should be called something else?
> 
> I use the following function for my own use.
> 
> (defun cygwin-exists-p ()
>   "Search cygwin1.dll in the exec-path and return the full path if it exists or nil otherwise."
>   (catch 'exists
>     (let ((path-list exec-path))
>       (while path-list
> 	(let ((full-path (expand-file-name "cygwin1.dll" (car path-list))))
> 	  (if (file-exists-p full-path)
> 	      (throw 'exists full-path))
> 	  (setq path-list (cdr path-list)))))))

I think this might be dangerous: a user could have some Cygwin tools
installed, but she could still be using a natively-co9mpiled Emacs.

In other words, the mere fact of cygwin.dll's existence does not
necessarily mean that this Emacs is a Cygwin binary.

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

* Re: `eshell-under-cygwin-p' etc. inappropriate?
  2002-08-11 13:49       ` Eli Zaretskii
@ 2002-08-12 18:19         ` Tak Ota
  2002-08-13  9:48           ` Eli Zaretskii
  0 siblings, 1 reply; 17+ messages in thread
From: Tak Ota @ 2002-08-12 18:19 UTC (permalink / raw)
  Cc: jpw, emacs-devel

Sun, 11 Aug 2002 16:49:49 +0300: "Eli Zaretskii" <eliz@is.elta.co.il> wrote:

> > From: Tak Ota <Takaaki.Ota@am.sony.com>
> > Date: Thu, 08 Aug 2002 10:23:16 -0700 (PDT)
> > 
> > 07 Aug 2002 06:06:12 +0100: John Paul Wallington <jpw@shootybangbang.com> wrote:
> > 
> > > Maybe `eshell-under-cygwin-p' should be called something else?
> > 
> > I use the following function for my own use.
> > 
> > (defun cygwin-exists-p ()
> >   "Search cygwin1.dll in the exec-path and return the full path if it exists or nil otherwise."
> >   (catch 'exists
> >     (let ((path-list exec-path))
> >       (while path-list
> > 	(let ((full-path (expand-file-name "cygwin1.dll" (car path-list))))
> > 	  (if (file-exists-p full-path)
> > 	      (throw 'exists full-path))
> > 	  (setq path-list (cdr path-list)))))))
> 
> I think this might be dangerous: a user could have some Cygwin tools
> installed, but she could still be using a natively-co9mpiled Emacs.
> 
> In other words, the mere fact of cygwin.dll's existence does not
> necessarily mean that this Emacs is a Cygwin binary.

You are right.  For that purpose I think `system-type' should provide
appropriate distinction between the two.  `cygwin-exists-p' does
nothing more than what its name and doc string say.

-Tak

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

* Re: `eshell-under-cygwin-p' etc. inappropriate?
  2002-08-12 18:19         ` Tak Ota
@ 2002-08-13  9:48           ` Eli Zaretskii
  0 siblings, 0 replies; 17+ messages in thread
From: Eli Zaretskii @ 2002-08-13  9:48 UTC (permalink / raw)
  Cc: jpw, emacs-devel

> Date: Mon, 12 Aug 2002 11:19:31 -0700 (PDT)
> From: Tak Ota <Takaaki.Ota@am.sony.com>
> > 
> > In other words, the mere fact of cygwin.dll's existence does not
> > necessarily mean that this Emacs is a Cygwin binary.
> 
> You are right.  For that purpose I think `system-type' should provide
> appropriate distinction between the two.

Yes, that would be my recommendation as well.

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

end of thread, other threads:[~2002-08-13  9:48 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-06  9:24 `eshell-under-cygwin-p' etc. inappropriate? John Paul Wallington
2002-08-06 20:28 ` John Wiegley
2002-08-07  5:06   ` John Paul Wallington
2002-08-07  5:02     ` Eli Zaretskii
2002-08-07  5:23       ` John Wiegley
2002-08-07  5:23         ` Eli Zaretskii
2002-08-07  6:10           ` John Paul Wallington
2002-08-07 20:32             ` John Wiegley
2002-08-07 21:53               ` John Paul Wallington
2002-08-08  4:50               ` Eli Zaretskii
2002-08-10  0:44                 ` John Wiegley
2002-08-08 17:23     ` Tak Ota
2002-08-11 13:49       ` Eli Zaretskii
2002-08-12 18:19         ` Tak Ota
2002-08-13  9:48           ` Eli Zaretskii
2002-08-10  0:05   ` John Paul Wallington
2002-08-10  0:06     ` John Wiegley

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