From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: Info-insert-dir Date: Mon, 19 Mar 2007 10:50:21 +0100 Message-ID: <45FE5CDD.3010909@gmx.at> References: <45FAF396.1030504@gmx.at> <45FD35C4.7060207@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1174297950 21364 80.91.229.12 (19 Mar 2007 09:52:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 19 Mar 2007 09:52:30 +0000 (UTC) Cc: emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 19 10:52:22 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HTEXL-0006Ow-Fl for ged-emacs-devel@m.gmane.org; Mon, 19 Mar 2007 10:52:19 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HTEYo-0001Vr-5O for ged-emacs-devel@m.gmane.org; Mon, 19 Mar 2007 04:53:50 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HTEYj-0001V2-Sy for emacs-devel@gnu.org; Mon, 19 Mar 2007 05:53:45 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HTEYj-0001Uc-Ar for emacs-devel@gnu.org; Mon, 19 Mar 2007 05:53:45 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HTEYi-0001UQ-Pg for emacs-devel@gnu.org; Mon, 19 Mar 2007 04:53:45 -0500 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1HTEXH-0005lt-1P for emacs-devel@gnu.org; Mon, 19 Mar 2007 05:52:15 -0400 Original-Received: (qmail invoked by alias); 19 Mar 2007 09:52:13 -0000 Original-Received: from N718P007.adsl.highway.telekom.at (EHLO [62.47.33.167]) [62.47.33.167] by mail.gmx.net (mp001) with SMTP; 19 Mar 2007 10:52:13 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1/5KphEUKv5/q4lomsaKzCxZ0VsyRO1J/YlIcN932 i9fDBlk7i2OKj2 User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en In-Reply-To: X-Y-GMX-Trusted: 0 X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:68087 Archived-At: > This nonexistent directory came from `Info-additional-directory-list', > right? So I think that if this is a bug, the bug would be at the > earlier stage, where the value of `Info-additional-directory-list' was > set up. Do you disagree? Probably. It's a customizable variable and `wid-edit' doesn't even check if the user puts valid directory names in there. Also, whether a directory exists at the time of calling `call-process' may depend on a number of factors - whether the directory is remote, a drive is mounted... I think it would be better if `Info-insert-dir' refrained from using an obscure source such as `Info-additional-directory-list' to set the default directory of its buffer. > More disconcerting, > however, is that any part of Emacs that relies on a valid, existing > default directory won't work reliably. > > You can set `default-directory' to any string, so Emacs facilities > should not assume it is an existing directory unless it part of > their definition to need that. > > Therefore, those other features such as spell checking should be > changed not to depend on this. As far as I know, ispell and aspell > have no need to use the default directory. Indeed one call-process > call in ispell.el already handles the case of nonexistent default > directory. You mean the (unless (file-exists-p default-directory) (setq default-directory (expand-file-name "~/"))) AFAICT this is the only occurrence of such a test in the entire Emacs sources. It might fail if default-directory equals the name of an existing non-directory file - an unlikely case, though. > Does this patch make it work? I'm not sure. Before I already wrapped every occurrence of these in a (let ((default-directory (if (file-directory-p default-directory) default-directory "~/"))) including the `start-process' instance in ispell.el and it worked (BTW `flyspell' has another instance of `call-process-region'). But isn't it a bit tedious to search for all occurrences of `call-process' etc? Couldn't such a check make it to `call-process', `start-process' ...