help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: ispell/hunspell/Windows: a fully-worked example


From: David Masterson
Subject: Re: ispell/hunspell/Windows: a fully-worked example
Date: Fri, 04 Apr 2014 23:59:33 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (cygwin)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Robert Thorpe <rt@robertthorpeconsulting.com>
>> Date: Fri, 04 Apr 2014 22:56:37 +0100
>> Cc: help-gnu-emacs@gnu.org
>> 
>> Let's say you install a new version of Emacs.  Instead of installing
>> the new menus and links with "addpm.exe" you just change the
>> executable path in the icon link file on your desktop.  In that case
>> the new version of Emacs is starting in the current directory of the
>> old version.  That can make Emacs confused if it searches for things
>> in the current directory.
>
> Emacs never searches for things "in the current directory", it always
> fully resolves file names relative to the current buffer's value of
> default-directory, before passing them to system-call APIs.  The
> "Start in" directory set by the desktop shortcut only affects the
> *scratch* buffer; every other buffer will have some other directory as
> its default one.  E.g., buffers that visit files have that file's
> directory as their default-directory.
>
> So I wonder whether you could show a real-life case where this problem
> is indeed at work.  I think such cases don't really exist, except when
> you evaluate expressions in *scratch*.

The OP is using the typical use-case.  Emacs will indeed start with the
default-directory set to the value of "Start In" for the Windows icon.
Any buffer created will inherit this value and, then, may set a new
value.  Therefore, the real-life case is that, if you go into dired, you
may not be in what you were expecting...

The answer to the OP is to set the "Start In" property of the Windows
icon for Emacs to something that will always be appropriate (like the
Documents directory in your \Users directory).

-- 
David Masterson


reply via email to

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