emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problems with emacsclient started by cygwin programs (mswindows)


From: Stefan Monnier
Subject: Re: problems with emacsclient started by cygwin programs (mswindows)
Date: Tue, 05 Jul 2011 12:11:42 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> I mostly agree.  The problem only happens when external pathnames get
> introduced into Emacs.  The ways this can happen are:
>  - command line
>  - server (used by emacsclient)
> I'm not sure they can get into Emacs in other meaningful ways.

They can show up in several other ways, e.g. in *compile*/*grep* if your
compiler/grep is using cygwin.

Enumerating them all and making them all do the right thing is rather
tedious/difficult, which is why cygwin-mount is fairly popular for those
people who mix cygwin and the native Windows port of Emacs: by handling
cygwin filenames everywhere, it's sure to handle them where needed.

>>> But there a mount from c:/cygwin to / so cygwin-mount should be able
>>> to translate /home/user/foo.el to c:/cygwin/home/user/foo.el.  At least
>>> in theory.
> But when it's OK to do this?  What if there was a c:/home/ and
> c:/cygwin/home, then what would /home refer to?  Could be c:/home/ and
> not c:/cygwin/home/.

Indeed, cygwin-mount isn't told when a file is using cygwin syntax and
when it uses some other syntax, so it has to guess.  That's probably why
it did not handle your /home (too ambiguous).

> To me, this global interpretation of pathnames (if I correctly
> interpret what you are suggesting for expand-file-name or
> cygwin-mount) to fix them is asking for trouble.  On the other hand, I
> know the Emacs command line and Emacs server inputs will for me always
> have cygwin paths on them.

OK.

> I do (now) agree that hook should be applied to the command line
> processing.  If we come to agreement on all this I can look into doing
> that, too.

That sounds great.  I think we should simply add a new function
file-name-import-function (feel free to come up with a better name)
which by default is set to `identity' and whose intention is to
translate an external file name (coming from another process) into one
usable inside Emacs.  And then call this function where appropriate.


        Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]