Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 281979 - app-editors/emacs site-gentoo.el blocks locally set infopath
Summary: app-editors/emacs site-gentoo.el blocks locally set infopath
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Emacs project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-19 02:07 UTC by Alan Eugene Davis
Modified: 2009-09-10 06:49 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Eugene Davis 2009-08-19 02:07:10 UTC
app-editors/emacs-cvs-23.0.9999-r2 (possibly other versions)
~amd64


The site-init file /usr/share/emacs/site-lisp/site-gentoo.el sets INFOPATH so:

;;; emacs-cvs-23 site-lisp configuration

(when (string-match "\\`23\\.0\\.96\\>" emacs-version)
  ;;(setq find-function-C-source-directory
  ;;      "/usr/share/emacs/23.0.96/src")
  (let ((path (getenv "INFOPATH"))
        (dir "/usr/share/info/emacs-23"))
    (and path
         ;; move Emacs Info dir to beginning of list
         (setq Info-directory-list
               (cons dir (delete dir (split-string path ":" t)))))))

The recommended practice for setting INFOPATH to first check /usr/local/share/info is contramanded by the method of setting INFOPATH in site-gentoo.el. 

The method recommended is ordinarily to set INFOPATH in .bashrc or elsewhere.  

I set INFOPATH as follows:
export INFOPATH="/usr/local/share/info:${INFOPATH}"

Standalone info in a terminal will find a locally installed version of org-mode's info documentation, installed from git.  However, emacs' info reader does not.  

Even when I set the Info-default-director and other variables in ~/.emacs, the version in /usr/local/share/info was not found by emacs

Reproducible: Always

Steps to Reproduce:
For example:

1.  Install org-mode from git source, with info files in /usr/local/share/info
2.  Run $ info in a terminal: the newly installed version appears
3.  Run info in emacs, the emacs' own version is displayed



Expected Results:  
Using the upstream prescribed methods for installing local info docs would result in emacs info finding them.
Comment 1 Ulrich Müller gentoo-dev 2009-08-19 16:08:47 UTC
Does it fix the problem for you if the Emacs Info dir is just moved before /usr/share/info? Replacing above-mentioned code by the following should do this (you may have to adapt the version numbers):

(when (string-match "\\`23\\.0\\.96\\>" emacs-version)
  (let ((path (getenv "INFOPATH"))
	(dir "/usr/share/info/emacs-23"))
    (and path
	 ;; move dir before anything else in /usr/share/info
	 (let ((p (split-string path ":" t)) q)
	   (while (and p (not (string-match
			       "\\`/usr/share/info\\b" (car p))))
	     (push (pop p) q))
	   (setq Info-directory-list
		 (prune-directory-list
		  (nconc (nreverse q) (cons dir (delete dir p)))))))))
Comment 2 Alan Eugene Davis 2009-08-19 22:47:00 UTC
(In reply to comment #1)
> Does it fix the problem for you if the Emacs Info dir is just moved before
> /usr/share/info? Replacing above-mentioned code by the following should do this
> (you may have to adapt the version numbers):

This works for me.  
Comment 3 Ulrich Müller gentoo-dev 2009-08-20 07:50:37 UTC
I've committed a slightly different fix for emacs-23.1 and emacs-cvs-23.1.9999-r1. No revision bump since this is a small change.

The stable version (emacs-22.3-r2) will follow on its next revbump, or in one month from now, whatever is earlier. Leaving this bug open until then.

Thank you for reporting this issue.