From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Info-insert-dir Date: Mon, 19 Mar 2007 01:15:13 -0400 Message-ID: References: <45FAF396.1030504@gmx.at> <45FD35C4.7060207@gmx.at> Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1174281569 11140 80.91.229.12 (19 Mar 2007 05:19:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 19 Mar 2007 05:19:29 +0000 (UTC) Cc: emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 19 06:19:21 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 1HTAHA-0001HO-QF for ged-emacs-devel@m.gmane.org; Mon, 19 Mar 2007 06:19:21 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HTAIb-0007tm-BQ for ged-emacs-devel@m.gmane.org; Mon, 19 Mar 2007 00:20:49 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HTAGZ-0006Ik-PK for emacs-devel@gnu.org; Mon, 19 Mar 2007 01:18:43 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HTAGZ-0006I6-4v for emacs-devel@gnu.org; Mon, 19 Mar 2007 01:18:43 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HTAGY-0006Hv-Qm for emacs-devel@gnu.org; Mon, 19 Mar 2007 00:18:42 -0500 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HTAF8-0003op-AW for emacs-devel@gnu.org; Mon, 19 Mar 2007 01:17:14 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1HTADB-0003Uw-9R; Mon, 19 Mar 2007 01:15:13 -0400 In-reply-to: <45FD35C4.7060207@gmx.at> (message from martin rudalics on Sun, 18 Mar 2007 13:51:16 +0100) 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:68080 Archived-At: My last statement was incorrect. The value of `default-directory' in the *info* buffer is not nil but a directory that doesn't exist. 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? 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. Does this patch make it work? *** ispell.el 17 Feb 2007 15:40:35 -0500 1.208 --- ispell.el 18 Mar 2007 19:27:09 -0500 *************** *** 895,901 **** (let* ((dictionaries (split-string (with-temp-buffer ! (call-process ispell-program-name nil t nil "dicts") (buffer-string)))) ;; Search for the named dictionaries. (found --- 895,904 ---- (let* ((dictionaries (split-string (with-temp-buffer ! (let ((default-directory default-directory)) ! (unless (file-exists-p default-directory) ! (setq default-directory (expand-file-name "~/"))) ! (call-process ispell-program-name nil t nil "dicts")) (buffer-string)))) ;; Search for the named dictionaries. (found *************** *** 928,934 **** "Return value of Aspell configuration option KEY. Assumes that value contains no whitespace." (with-temp-buffer ! (call-process ispell-program-name nil t nil "config" key) (car (split-string (buffer-string))))) (defun ispell-aspell-find-dictionary (dict-name) --- 931,940 ---- "Return value of Aspell configuration option KEY. Assumes that value contains no whitespace." (with-temp-buffer ! (let ((default-directory default-directory)) ! (unless (file-exists-p default-directory) ! (setq default-directory (expand-file-name "~/"))) ! (call-process ispell-program-name nil t nil "config" key)) (car (split-string (buffer-string))))) (defun ispell-aspell-find-dictionary (dict-name) *************** *** 1499,1509 **** (set-buffer output-buf) (erase-buffer) (set-buffer session-buf) ! (setq status ! (apply 'call-process-region (point-min) (point-max) ! ispell-program-name nil ! output-buf nil ! "-a" "-m" ispell-args)) (set-buffer output-buf) (goto-char (point-min)) (save-match-data --- 1505,1518 ---- (set-buffer output-buf) (erase-buffer) (set-buffer session-buf) ! (let ((default-directory default-directory)) ! (unless (file-exists-p default-directory) ! (setq default-directory (expand-file-name "~/"))) ! (setq status ! (apply 'call-process-region (point-min) (point-max) ! ispell-program-name nil ! output-buf nil ! "-a" "-m" ispell-args))) (set-buffer output-buf) (goto-char (point-min)) (save-match-data *************** *** 2197,2209 **** (while (search-backward "*" nil t) (insert ".")) (setq word (buffer-string)) (erase-buffer)) ! (setq status (apply 'call-process prog nil t nil ! (nconc (if (and args (> (length args) 0)) ! (list args) ! (if look-p nil ! (list "-e"))) ! (list word) ! (if lookup-dict (list lookup-dict))))) ;; grep returns status 1 and no output when word not found, which ;; is a perfectly normal thing. (if (stringp status) --- 2206,2221 ---- (while (search-backward "*" nil t) (insert ".")) (setq word (buffer-string)) (erase-buffer)) ! (let ((default-directory default-directory)) ! (unless (file-exists-p default-directory) ! (setq default-directory (expand-file-name "~/"))) ! (setq status (apply 'call-process prog nil t nil ! (nconc (if (and args (> (length args) 0)) ! (list args) ! (if look-p nil ! (list "-e"))) ! (list word) ! (if lookup-dict (list lookup-dict)))))) ;; grep returns status 1 and no output when word not found, which ;; is a perfectly normal thing. (if (stringp status)