On Sat, Mar 21, 2009 at 02:17:51PM -0500, Jeffrey Phillips wrote:
> >> Is there a reason expand-file-name is used directly?
> 
> Standard Emacs lisp programming.  Cygwin emacs should and is able to use
> expand-file-name just fine.  The problem is when you call non-cygwin aware
> windows
> apps, such as java and javac.  Now you have deal with hybrid file
> nomenclature

Yes, exactly. That's why I suggested creating a wrapper for using in
such cases, because...

> The better solution for everyone, that will hopefully be coming with the
> opening of java
> source, is we will start to see standard java SDK packages that can compile
> and run
> natively in cygwin.  Then none of the special cygwin conditional lisp is
> needed.

...then you can go immediately to one place and just remove your
conditional code for Cygwin, instead of having it distributed around the
codebase. Maybe in terms of saving effort it's too late, however, since
it's already done.

There is a Cygwin port of gcj and the like, but I haven't managed to get
that to work at all with jdee (knowing where to point the jde-*
variables seems to be the main problem, because the GNU Java stuff seems
to be pretty non-standard, not to say downright odd).

> >> Could it not be wrapped by another (internal to jde) function that
> includes the
> >> jde-cygpath call when the environment demands it (i.e. when running on
> >> Cygwin)?
> 
> Well, the beauty of Emacs is ... yes.  If you put this in your .emacs then
> it will
> wrap a call to jde-cygpath after _all_ calls to Emacs expand-file-name:
> 
> (defadvice expand-file-name (after my-expand-file-name activate)
>  (setq ad-return-value (jde-cygpath ad-return-value)))
> 
> Of course, this could have other side-effects since it will affect all
> calls, and
> likely get recursive problems somewhere down the road.  You could test if
> current buffer is jde-mode type inside the advice, and then it would only be
> specific to JDEE calls.

Thanks. I might try it, but it would then affect all expand-file-name
calls, as you say (even if they are just within jde). Not a problem, I
guess, but probably unnecessary and there might also be cases where it
would also be undesirable. Anyway, I will give it a go.

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
jdee-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jdee-users

Reply via email to