[Top][All Lists]

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

Re: 900276502f..: Paul Eggert 2018-11-13 Act like POSIX sh if $HOME is r

From: Yuri Khan
Subject: Re: 900276502f..: Paul Eggert 2018-11-13 Act like POSIX sh if $HOME is relative
Date: Wed, 12 Dec 2018 20:19:55 +0700

On Wed, Dec 12, 2018 at 7:43 PM João Távora <address@hidden> wrote:

> With HOME="z:", it used to be that (expand-file-name "~/blabla")
> returned "z:/blabla" but now it returns
> "z:/source/emacs/emacs/src/z:/blabla", which is not a valid Windows
> pathname.

As a former Windows user, I’d say both are wrong.

Setting HOME="z:" says “Whichever is the current directory on drive Z,
that’s my home”. ~/blabla means “file named blabla in my home”, i.e.
“blabla in the current directory on drive Z”, i.e. "z:blabla". Further
expansion depends on the actual current directory on Z:; if that’s
/source/emacs/emacs/src, then "z:/source/emacs/emacs/src/blabla".

> All of this can be fixed by me by setting HOME to "z:/", but
> unfortunately I am breaking other applications that expected it
> slash-less.

I’d say those are broken already. A slashless drive letter refers to
the current directory there, not the root.

> An alternative would be:

* get those other applications fixed;

> * for this part of the change to be reverted in Emacs;
> * for me to set the correct environment var from the Windows shortcut
>   that points to runemacs.exe. Can it be done easily?

Easiest is probably to change it to run a .cmd file that sets the
variable and then runs runemacs.exe, if you don’t mind a useless
console window. If you do, you’ll probably need to write and compile a
(GUI-targeted but windowless) program in a language of your choice,
that runs runemacs.exe with a modified environment.

reply via email to

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