[Top][All Lists]

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

Re: [h-e-w] expand-file-name leaves forward slashes

From: Stephen Leake
Subject: Re: [h-e-w] expand-file-name leaves forward slashes
Date: Fri, 01 Sep 2006 05:32:25 -0400
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (windows-nt)

Eli Zaretskii <address@hidden> writes:

>> > Btw, I don't really understand what's wrong with c:/foo/bar style of
>> > file names that ada-mode needs to mirror the slashes.  Can you
>> > explain?  I'm afraid you will hit lots of problems if you use
>> > backslash-style absolute file names in Emacs.  (That is the reason why
>> > Emacs sets directory-sep-char to `/' in the first place.)
>> It is because we are executing DOS commands.
> That is not necessarily a problem; see below.
>> When running on "plain windows" (no Cygwin), we are using a DOS shell.
>> 'cd' requires DOS filenames (back slashes); it cannot handle forward
>> slashes.
> Is `cd' the only problem?  

So far, yes.

> Most commands internal to the Windows shell will happily accept
> forward slashes if you enclose the file name in quotes; `cd' is one
> of the few exceptions. For example try this in the Windows shell:
>       dir "C:/Program Files"
> You will see that it works.

Ok, I didn't know that. I normally use Cygwin bash :).

>> So I would only call convert-standard-filename to create the 'cd'
>> command.
> If `cd' is the only problem, you could instead change the value of
> default-directory of the buffer where you invoke the build command.
> That is what "M-x compile" does.

Interesting idea. But it won't work in this case; we are invoking
build from a source file buffer.

> Btw, are you sing "M-x compile" to run the "build" command?  

No, C-c C-c

> If not, why not?

Shorter keystroke.

But perhaps you mean "are you using the function 'compile'"; that we
are, but with a wrapper to set up the parameters.

So perhaps the explicit 'cd' is not necessary, if 'compile' takes care
of it, in the *compilation* buffer. I'll check ...

Yes, I'm getting _two_ cd commands. Apparently one from the wrapper,
and one from compile.

Hmm. On further investigation, the first "command" is not sent to the
shell; compile-internal does:

        (setq default-directory thisdir)
        (insert "cd " thisdir "\n" command "\n")

So I don't need the explicit 'cd' command.

Thanks for the tip.

-- Stephe

reply via email to

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