From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: What's the right way to define a custom info path. Date: Wed, 25 Nov 2015 20:02:10 +0200 Message-ID: <83wpt6vty5.fsf@gnu.org> References: <1603934532.294950108.1448466307513.JavaMail.root@spooler5n-g27.priv.proxad.net> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1448474633 26314 80.91.229.3 (25 Nov 2015 18:03:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 25 Nov 2015 18:03:53 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Nov 25 19:03:40 2015 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 1a1ePr-0008KB-6O for geh-help-gnu-emacs@m.gmane.org; Wed, 25 Nov 2015 19:03:39 +0100 Original-Received: from localhost ([::1]:46986 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1ePs-0001Lw-Ug for geh-help-gnu-emacs@m.gmane.org; Wed, 25 Nov 2015 13:03:40 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59599) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1eOv-0000d8-DT for help-gnu-emacs@gnu.org; Wed, 25 Nov 2015 13:02:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a1eOs-0002g3-5L for help-gnu-emacs@gnu.org; Wed, 25 Nov 2015 13:02:41 -0500 Original-Received: from mtaout24.012.net.il ([80.179.55.180]:52447) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1eOr-0002fx-QA for help-gnu-emacs@gnu.org; Wed, 25 Nov 2015 13:02:38 -0500 Original-Received: from conversion-daemon.mtaout24.012.net.il by mtaout24.012.net.il (HyperSendmail v2007.08) id <0NYD00300TOP4J00@mtaout24.012.net.il> for help-gnu-emacs@gnu.org; Wed, 25 Nov 2015 19:55:03 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout24.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NYD00353TRRJD00@mtaout24.012.net.il> for help-gnu-emacs@gnu.org; Wed, 25 Nov 2015 19:55:03 +0200 (IST) In-reply-to: <1603934532.294950108.1448466307513.JavaMail.root@spooler5n-g27.priv.proxad.net> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.180 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:108216 Archived-At: > Date: Wed, 25 Nov 2015 16:45:07 +0100 (CET) > From: pierre.techoueyres@free.fr > > ** My problems > First I tried to setup the Info-path with the custom variable `Info-default-directory-list' but that doesn't work, because of package-activate-1 which call info-initialize so the customization of Info-default-directory-list is done too late. And worse it's not correctly initialized !!! > > > Next I try using `Info-directory-list' but to do so I must require info and call info-initialize in my init.el and I prefer to avoid that. > > Then I looked at `Info-additional-directory-list' which has the same problem as `Info-default-directory-list'. > > ** What I think should be done. > 1) `Info-default-directory-list' should be correctly initialized for the emacs w32. > 1) To do that env.el should provide an `w32-substitute-env-vars' to allow replacement of %var% strings with the corresponding env vars. > 2) The defcustom of Info-default-directory-list should call (substitute-env-vars configure-info-directory) instead of configure-info-directory directly. > > 2) `package-activate-1' should not require info nor use `info-initialize'. Instead it should add info paths on `Info-default-directory-list' or `Info-additional-directory-list' (maybe the later). > > ** My questions > Have I do something wrong with my config ? Should I set an INFOPATH env var with absolutes paths ? > If the answer of the previous questions is : No, should I open bugs ? The way to set this up correctly is to define the INFOPATH environment variable (outside Emacs) which mentions the directories with Info files in the proper order. The Emacs is supposed to automatically pick up the directories from INFOPATH, and you should be able to read your manuals without any further problems. You are instead trying to futz with Emacs variables that are not supposed to do that well. I suggest to save yourself a lot of trouble and go via INFOPATH. > ** My questions > Have I do something wrong with my config ? Should I set an INFOPATH env var with absolutes paths ? Yes to INFOPATH. > If the answer of the previous questions is : No, should I open bugs ? No, there's no bug here, AFAICT. If you want to set up Info-directory-list or Info-additional-directory-list, you must load info.elc first. (But again, I don't recommend going that way.)