Re: cygwin version of emacs, Windows jvm and paths

2005-04-08 Thread Ed Mooney
Meant to add, though, that unlike with NT Emacs, I'm not able to go to 
the file found by pointing point in one of the lines in the *grep* 
buffer and hitting RET, and accepting the default. I have to manually do 
cygpath on the pathname. Is there a way to have the default be a Cygwin 
path?

  -- Ed
Ed Mooney wrote:
But I thought this thread was about jde-find, which works for me with 
Cygwin emacs the way Henry described.

  -- Ed
[ ... ]


Re: cygwin version of emacs, Windows jvm and paths

2005-04-08 Thread Ed Mooney
But I thought this thread was about jde-find, which works for me with 
Cygwin emacs the way Henry described.

  -- Ed
Jeffrey Phillips wrote:
On Apr 8, 2005 10:10 AM, Jeff Jensen <[EMAIL PROTECTED]> wrote:
For Cygwin find:
- these are valid:
 find c:/ -name "AUTOEXEC.BAT"
 find c:/. -name "AUTOEXEC.BAT"
 find c:\. -name "AUTOEXEC.BAT"
- this is not valid:
 find c:\ -name "AUTOEXEC.BAT"
Notice using the c:\ requires the period for the current directory, where
c:/ does not.

Using c:\. with period would be undefined escape sequence.  In
essence, bash would drop the backslash and you would simply be using
just c:.   .  You have to escape backslashes in *nix which would
include cygwin.  Should be using c:\\ if you wish to use backslashes.
Try these commands on cygwin and notice the similarities and differences:
   # ls c:\.
   # ls c:.
   # ls c:/.
   # ls c:/
   # ls c:\\



Re: cygwin version of emacs, Windows jvm and paths

2005-04-08 Thread Jeffrey Phillips
On Apr 8, 2005 10:10 AM, Jeff Jensen <[EMAIL PROTECTED]> wrote:
> For Cygwin find:
> - these are valid:
>   find c:/ -name "AUTOEXEC.BAT"
>   find c:/. -name "AUTOEXEC.BAT"
>   find c:\. -name "AUTOEXEC.BAT"
> 
> - this is not valid:
>   find c:\ -name "AUTOEXEC.BAT"
> 
> Notice using the c:\ requires the period for the current directory, where
> c:/ does not.
> 

Using c:\. with period would be undefined escape sequence.  In
essence, bash would drop the backslash and you would simply be using
just c:.   .  You have to escape backslashes in *nix which would
include cygwin.  Should be using c:\\ if you wish to use backslashes.

Try these commands on cygwin and notice the similarities and differences:

   # ls c:\.
   # ls c:.
   # ls c:/.
   # ls c:/
   # ls c:\\


RE: cygwin version of emacs, Windows jvm and paths

2005-04-08 Thread Jeff Jensen
Jumping in a little late here, but in case these 2 points help (and I may be
misunderstanding some of your issues)...

For Cygwin find:
- these are valid:
  find c:/ -name "AUTOEXEC.BAT"
  find c:/. -name "AUTOEXEC.BAT"
  find c:\. -name "AUTOEXEC.BAT"

- this is not valid:
  find c:\ -name "AUTOEXEC.BAT"

Notice using the c:\ requires the period for the current directory, where
c:/ does not.

(I mention this invalid one because the example on Henry's reply has this
invalid syntax, which could be a typo or part of the problem)


IIRC, earlier in the thread someone wondered about the Cygwin drive syntax.
It is this: /cygdrive/c/

I am wondering if using the Cygwin syntax in any Emacs/JDE settings will
help or completely fix the problem(s).

So "d:/MT/source/"'s path in Cygwin-speak is /cygdrive/d/MT/source.


Note that I use NT Emacs, not the Cygwin Emacs, and so have not encountered
these problems; just mentioning a couple of Cygwin-isms in case it helps
:-).


-Original Message-
From: Henry S. Thompson [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 08, 2005 8:33 AM
To: Léopold Bailly
Cc: jde@sunsite.dk
Subject: Re: cygwin version of emacs, Windows jvm and paths

=?utf-8?b?TMOpb3BvbGQ=?= Bailly <[EMAIL PROTECTED]> writes:

>> 
>>  '(jde-cygwin-path-converter (quote 
>> (jde-cygwin-path-converter-internal)))
>> 
>> instead -- that's what I have, and
>> 
>>  a) jde-open-class-at-point works;
>>  b) jde-find works.
>
> It's even worse, because / are replaced by \, that is catastrophic for 
> jde-find :
>
> find d:\foo\bar -name "*.java" -type f | xargs grep -i -n "myString" 
> /dev/null /dev/null
> find: d:foobar: No such file or directory
>
> Can you paste an example of your jde-find result ?

cd /home/ht/MT/source/com/markuptech/stdcomponents/
find d:/MT/source -name "*.java" -type f | xargs grep -i n "dirty" /dev/null
/dev/null
d:/MT/source/com/markuptech/tools/mtpl/MTPLApp.java:808: dirtyWhileReading =
false;

etc.

So maybe the additional crucial fact is that I have

 '(jde-sourcepath (quote ("/home/ht/MT/source")))

where /home/ht is mounted as D:

ht
--
 Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
 Half-time member of W3C Team
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: [EMAIL PROTECTED]
   URL: http://www.ltg.ed.ac.uk/~ht/ [mail really from me
_always_ has this .sig -- mail without it is forged spam]



Re: cygwin version of emacs, Windows jvm and paths

2005-04-08 Thread Henry S. Thompson
=?utf-8?b?TMOpb3BvbGQ=?= Bailly <[EMAIL PROTECTED]> writes:

>> 
>>  '(jde-cygwin-path-converter (quote (jde-cygwin-path-converter-internal)))
>> 
>> instead -- that's what I have, and
>> 
>>  a) jde-open-class-at-point works;
>>  b) jde-find works.
>
> It's even worse, because / are replaced by \, that is catastrophic
> for jde-find :
>
> find d:\foo\bar -name "*.java" -type f | xargs grep -i -n "myString" /dev/null
> /dev/null
> find: d:foobar: No such file or directory
>
> Can you paste an example of your jde-find result ?

cd /home/ht/MT/source/com/markuptech/stdcomponents/
find d:/MT/source -name "*.java" -type f | xargs grep -i n "dirty" /dev/null 
/dev/null
d:/MT/source/com/markuptech/tools/mtpl/MTPLApp.java:808: dirtyWhileReading = 
false;

etc.

So maybe the additional crucial fact is that I have

 '(jde-sourcepath (quote ("/home/ht/MT/source")))

where /home/ht is mounted as D:

ht
-- 
 Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
 Half-time member of W3C Team
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: [EMAIL PROTECTED]
   URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]


Re: cygwin version of emacs, Windows jvm and paths

2005-04-04 Thread LÃopold Bailly
Henry S. Thompson  inf.ed.ac.uk> writes:

> 
> Try using
> 
>  '(jde-cygwin-path-converter (quote (jde-cygwin-path-converter-internal)))
> 
> instead -- that's what I have, and
> 
>  a) jde-open-class-at-point works;
>  b) jde-find works.

It's even worse, because / are replaced by \, that is catastrophic for jde-find 
:

find d:\foo\bar -name "*.java" -type f | xargs grep -i -n "myString" /dev/null
/dev/null
find: d:foobar: No such file or directory

jde-open-class-at-point doesn't work better.

Anyway, cygwin emacs can't (well, I haven't found how it could) understand paths
like d:/ or d:\\ that results from jde-convert-cygwin-path.

I really don't understand how it can work for you.

Can you paste an example of your jde-find result ?

Leo.



Re: cygwin version of emacs, Windows jvm and paths

2005-04-02 Thread Henry S. Thompson
Try using

 '(jde-cygwin-path-converter (quote (jde-cygwin-path-converter-internal)))

instead -- that's what I have, and

 a) jde-open-class-at-point works;
 b) jde-find works.

ht
-- 
 Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
 Half-time member of W3C Team
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: [EMAIL PROTECTED]
   URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]


Re: cygwin version of emacs, Windows jvm and paths

2005-03-31 Thread LÃopold Bailly
Henry S. Thompson  inf.ed.ac.uk> writes:

> Not sure what problem you're trying to solve -- I use jde+cygwin
> emacs+win32-j2sdk without any path problems to speak of -- could you
> give an example of something that doesn't work without your hack?

jde-open-class-at-point doesn't work at all.
jde-find works but results aren't browsable.

I use this setting, that allows classpath to be suitable for the windows jvm,
but makes paths unsuitable for cygwin emacs :
'(jde-cygwin-path-converter (quote (jde-cygwin-path-converter-cygpath)))

The underlying problem is that (file-exists-p "c:/...") always returns nil.

How can you deal with that ?


Leo.



Re: cygwin version of emacs, Windows jvm and paths

2005-03-31 Thread Henry S. Thompson
Not sure what problem you're trying to solve -- I use jde+cygwin
emacs+win32-j2sdk without any path problems to speak of -- could you
give an example of something that doesn't work without your hack?

ht
-- 
 Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
 Half-time member of W3C Team
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: [EMAIL PROTECTED]
   URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]


cygwin version of emacs, Windows jvm and paths

2005-03-30 Thread LÃopold Bailly
Hello,

I've succeeded in using jdee on MS Windows with the Cygwin compiled version of
emacs (not the Windows natively compiled version), but it has been painful
because this emacs version doesn't understand Windows style paths like c:/ or
 c:\.

I had to split jde-normalize-path in two functions, one that does the same job
except converting paths to Windows syntax, and another that pipes the result to
jde-convert-cygwin-path ; so that, I can call the first one to transform paths
used by emacs itself (in jde-find, for example) and the second one to transform
paths used by java.

So I've patched a lot my jde installation...

Is it a known problem ? Does anyone know another workaround ? I've searched a
lot and I couldn't find any discussion about this.

Could it be handled in the jde official distribution or is it a bug of the
Cygwin version of emacs ?


Below is the detail of what I did in jde.el :

(defun jde-normalize-path-without-cygwin (path &optional symbol) 
...
;; This is a copy of the original jde-normalize-path function
;; I just comment the following instruction
;;(setq p (jde-convert-cygwin-path p))
  p))

(defun jde-normalize-path (path &optional symbol) 
  "Just calls `jde-normalize-path-without-cygwin'
   and pipes the result to jde-convert-cygwin-path"
(jde-convert-cygwin-path (jde-normalize-path-without-cygwin path 
symbol))
)

The calls to jde-normalize-path have then to be replaced by calls to
jde-normalize-path-without-cygwin when java is not concerned.


Leo.