From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Jeremy Gray Newsgroups: gmane.emacs.help Subject: Re: INFOPATH and emacs Date: Thu, 17 Apr 2003 20:12:24 GMT Organization: Prodigy Internet http://www.prodigy.com Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <3E9EE2EE.5060709@yahoo.com> Reply-To: gray@metacomet.net NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1050607378 7836 80.91.224.249 (17 Apr 2003 19:22:58 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 17 Apr 2003 19:22:58 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Thu Apr 17 21:22:52 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 196EyC-00021y-00 for ; Thu, 17 Apr 2003 21:22:52 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 196EwS-0000zl-07 for gnu-help-gnu-emacs@m.gmane.org; Thu, 17 Apr 2003 15:21:04 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!cyclone.bc.net!sjc70.webusenet.com!news.webusenet.com!pd2nf1so.cg.shawcable.net!residential.shaw.ca!prodigy.com!newsmst01.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssrv26.news.prodigy.com.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: slrn/0.9.7.4 (Linux) Original-Lines: 46 Original-NNTP-Posting-Host: 68.22.249.88 Original-X-Complaints-To: abuse@prodigy.net Original-X-Trace: newssrv26.news.prodigy.com 1050610344 ST000 68.22.249.88 (Thu, 17 Apr 2003 15:12:24 CDT) Original-NNTP-Posting-Date: Thu, 17 Apr 2003 15:12:24 CDT X-UserInfo1: Q[R_PJSCTS@GRVTY\JKVNFP@XB]BAAXOGHTVOBPLAH[\RWICYFWUQBKZQLYJX\_ITFD_KFVLUN[DOM_A_NSYNWPFWNS[XV\I]PZ@BQ[@CDQDPCL^FKCBIPC@KLGEZEFNMDYMKHRL_YYYGDSSODXYN@[\BK[LVTWI@AXGQCOA_SAH@TPD^\AL\RLGRFWEARBM Original-Xref: shelby.stanford.edu gnu.emacs.help:112070 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:8570 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:8570 Jeremy Gray wrote: > Kevin Rodgers wrote: >> >> So there is a discrepancy between the command line info program and >> Emacs' M-x info command in how an empty INFOPATH component is >> interpreted. I think Emacs should emulate info as closely as >> possible; if the OP agrees, he should use M-x report-emacs-bug to >> submit a bug report. > > I think setting the entire path is easier in the long run since it > works for both info and info-mode. But, I think this is a easily fixed > bug. This appears to work, at least for me. diff -Naur emacs-21.3/lisp/info.el emacs-21.3-jag/lisp/info.el --- emacs-21.3/lisp/info.el 2001-12-21 13:08:17.000000000 -0600 +++ emacs-21.3-jag/lisp/info.el 2003-04-17 14:08:25.000000000 -0500 @@ -320,7 +320,8 @@ (insert-file-contents fullname visit)))) (defun info-initialize () - "Initialize `Info-directory-list', if that hasn't been done yet." + "Initialize `Info-directory-list', respecting a final colon like +info standalone, if that hasn't been done yet." (unless Info-directory-list (let ((path (getenv "INFOPATH")) (source (expand-file-name "info/" source-directory)) @@ -341,7 +342,10 @@ (setq Info-directory-list (prune-directory-list (if path - (split-string path (regexp-quote path-separator)) + (if (string-match ":$" path) + (append (split-string path (regexp-quote path-separator)) + Info-default-directory-list) + (split-string path (regexp-quote path-separator))) (if (and sibling (file-exists-p sibling)) ;; Uninstalled, Emacs builddir != srcdir. (setq alternative sibling) -- Jeremy A. Gray gray@metacomet.net "Remember the Pueblo." -- the Fourth Law of Marvin