From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Masterson Newsgroups: gmane.emacs.help Subject: Re: ispell/hunspell/Windows: a fully-worked example Date: Fri, 04 Apr 2014 23:59:33 -0700 Organization: Aioe.org NNTP Server Message-ID: <867g74cld6.fsf@gmail.com> References: <87zjk0zrl6.fsf@robertthorpeconsulting.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1396681228 26666 80.91.229.3 (5 Apr 2014 07:00:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 5 Apr 2014 07:00:28 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Apr 05 09:00:18 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WWKaP-0001FK-Vf for geh-help-gnu-emacs@m.gmane.org; Sat, 05 Apr 2014 09:00:18 +0200 Original-Received: from localhost ([::1]:53492 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WWKaP-0005Ql-LK for geh-help-gnu-emacs@m.gmane.org; Sat, 05 Apr 2014 03:00:17 -0400 Original-Path: usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!194.109.133.83.MISMATCH!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!news.stack.nl!aioe.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 37 Original-NNTP-Posting-Host: FBbxX6uxje+SXmxpIOXVag.user.speranza.aioe.org Original-X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (cygwin) X-Notice: Filtered by postfilter v. 0.8.2 Cancel-Lock: sha1:iVYx6Z8nJN+G+jd6oblQEtB7w5o= Original-Xref: usenet.stanford.edu gnu.emacs.help:204725 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:96995 Archived-At: Eli Zaretskii writes: >> From: Robert Thorpe >> 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