Article View: gnu.emacs.bug
Article #87740Problem with info-mode in 19.25
From: Dan Gehlhaar
Date: Tue, 06 Sep 1994 18:24
Date: Tue, 06 Sep 1994 18:24
433 lines
15116 bytes
15116 bytes
This message is an addendum to a similar message submitted 9/2/94.
I discovered a workaround, which may give insight into the cause of
the problem, listed under "What works", below.
-------------------------------------------------------
Emacs version: 19.25.2
hardware: SGI Indigo 2 XZ (150 MHz R4400)
configuration: mips-sgi-irix5.2
prefix directory: /sw/ADDS/emacs25
compiler: cc
options: -g -O
special: emacs was stripped after installation to save disk space.
Problem description:
-------------------
Info mode (C-h i) gives error message, "Can't find the info directory
node".
This was not a problem with 19.22, compiled on the same machine and
installed the same way.
What works:
----------
1) Invoking info interactively with any info file other than 'dir'. Example:
<ESC> 1 <ESC> x info <RET> /sw/ADDS/emacs25/info/emacs <RET>
2) Replace lib/emacs/19.25/lisp/info.el(c) with equivalent code from
19.19 (we happened to have 19.19 code sitting around). Diffs between
the versions are included at the end of this document for your
convenience.
What I've verified:
------------------
1) The /sw/ADDS/emacs25/info directory was installed.
2) The 'dir' file exists.
3) The /sw/ADDS/emacs25/info directory and all files therein have
world read access.
4) Emacs can visit all of the files in the /sw/ADDS/emacs25/info directory.
----------------------------------------------------------
diff 19.19/info.el 19.25/info.el
3c3
< ;; Copyright (C) 1985, 1986, 1992, 1993 Free Software Foundation, Inc.
---
> ;; Copyright (C) 1985, 1986, 1992, 1993, 1994 Free Software Foundation, Inc.
54c54,55
< (let ((path (getenv "INFOPATH")))
---
> (let ((path (getenv "INFOPATH"))
> (sibling (expand-file-name "../info/" (invocation-directory))))
64c65,68
< Info-default-directory-list))
---
> (if (or (member sibling Info-default-directory-list)
> (not (file-exists-p sibling)))
> Info-default-directory-list
> (reverse (cons sibling (cdr (reverse Info-default-directory-list)))))))
68c72,76
< if there is no INFOPATH variable in the environment.")
---
> if there is no INFOPATH variable in the environment.
> The last element of `Info-default-directory-list' is the directory
> where Emacs installs the Info files that come with it.
> If Emacs finds it has been installed elsewhere, or not yet installed,
> it replaces that element with the directory that its Info files are in.")
93,94c101,105
< (defvar Info-suffix-list '( (".info" . nil)
< ("" . nil)
---
> (defvar Info-suffix-list '( (".info.Z" . "uncompress")
> (".info.Y" . "unyabba")
> (".info.gz" . "gunzip")
> (".info.z" . "gunzip")
> (".info" . nil)
99,102c110
< (".info.Z" . "uncompress")
< (".info.Y" . "unyabba")
< (".info.gz" . "gunzip")
< (".info.z" . "gunzip"))
---
> ("" . nil))
105c113,115
< the command as standard input. If STRING is nil, no decoding is done.")
---
> the command as standard input. If STRING is nil, no decoding is done.
> Because the SUFFIXes are tried in order, the empty string should
> be last in the list.")
110,125c120,147
< (if (null (catch 'ok
< (mapcar
< (function
< (lambda (x)
< (let ((compressed (concat filename (car x))))
< (if (file-exists-p compressed)
< (progn
< (insert-file-contents compressed visit)
< (if (cdr x)
< (let ((buffer-read-only nil))
< (shell-command-on-region
< (point-min) (point-max) (cdr x) t)))
< (throw 'ok t))))))
< Info-suffix-list)
< nil))
< (error "Can't find %s or any compressed version of it!" filename)))
---
> (let ((tail Info-suffix-list)
> fullname decoder)
> (if (file-exists-p filename)
> (progn
> (while (and tail
> (not (string-match
> (concat (regexp-quote (car (car tail))) "$")
> filename)))
> (setq tail (cdr tail)))
> (setq fullname filename
> decoder (cdr (car tail))))
> (while (and tail
> (not (file-exists-p (concat filename (car (car tail))))))
> (setq tail (cdr tail)))
> (setq fullname (concat filename (car (car tail)))
> decoder (cdr (car tail)))
> ;; check for conflict with jka-compr
> (if (and (featurep 'jka-compr)
> (jka-compr-installed-p)
> (jka-compr-get-compression-info (concat filename
> (car (car tail)))))
> (setq decoder nil))
> (or tail
> (error "Can't find %s or any compressed version of it!" filename)))
> (insert-file-contents fullname visit)
> (if decoder
> (let ((buffer-read-only nil))
> (shell-command-on-region (point-min) (point-max) decoder t)))))
295c317
< (or Info-current-node no-going-back
---
> (or Info-current-node no-going-back (null Info-history)
333,362c355,383
< (or (member (file-truename (expand-file-name (car dirs))) dirs-done)
< (member (directory-file-name (file-truename (expand-file-name (car dirs))))
< dirs-done)
< ;; Try several variants of specified name.
< ;; Try upcasing, appending `.info', or both.
< (let* (temp
< (buffer
< (cond
< ((progn (setq temp (expand-file-name "DIR" (car dirs)))
< (file-exists-p temp))
< (find-file-noselect temp))
< ((progn (setq temp (expand-file-name "dir" (car dirs)))
< (file-exists-p temp))
< (find-file-noselect temp))
< ((progn (setq temp (expand-file-name "DIR.INFO" (car dirs)))
< (file-exists-p temp))
< (find-file-noselect temp))
< ((progn (setq temp (expand-file-name "dir.info" (car dirs)))
< (file-exists-p temp))
< (find-file-noselect temp)))))
< (setq dirs-done
< (cons (file-truename (expand-file-name (car dirs)))
< (cons (directory-file-name
< (file-truename (expand-file-name (car dirs))))
< dirs-done)))
< (if buffer (setq buffers (cons buffer buffers)
< Info-dir-file-attributes
< (cons (cons (buffer-file-name buffer)
< (file-attributes (buffer-file-name buffer)))
< Info-dir-file-attributes)))))
---
> (let ((truename (file-truename (expand-file-name (car dirs)))))
> (or (member truename dirs-done)
> (member (directory-file-name truename) dirs-done)
> ;; Try several variants of specified name.
> ;; Try upcasing, appending `.info', or both.
> (let* (temp
> (buffer
> (cond
> ((progn (setq temp (expand-file-name "DIR" (car dirs)))
> (file-exists-p temp))
> (find-file-noselect temp))
> ((progn (setq temp (expand-file-name "dir" (car dirs)))
> (file-exists-p temp))
> (find-file-noselect temp))
> ((progn (setq temp (expand-file-name "DIR.INFO" (car dirs)))
> (file-exists-p temp))
> (find-file-noselect temp))
> ((progn (setq temp (expand-file-name "dir.info" (car dirs)))
> (file-exists-p temp))
> (find-file-noselect temp)))))
> (setq dirs-done
> (cons truename
> (cons (directory-file-name truename)
> dirs-done)))
> (if buffer (setq buffers (cons buffer buffers)
> Info-dir-file-attributes
> (cons (cons (buffer-file-name buffer)
> (file-attributes (buffer-file-name buffer)))
> Info-dir-file-attributes))))))
364a386,387
> (or buffers
> (error "Can't find the info directory node"))
391c414
< (search-backward "\n")
---
> (search-backward "\n\^_")
394c417
< (search-forward "\n" nil 'move)
---
> (search-forward "\n\^_" nil 'move)
405c428
< (end (save-excursion (search-forward "" nil t) (point))))
---
> (end (save-excursion (search-forward "\^_" nil t) (point))))
408,413c431,439
< (or (member (downcase nodename) menu-items)
< (re-search-forward (concat "^\\* " (regexp-quote nodename) ":")
< end t)
< (progn
< (insert "* " nodename "\n")
< (setq menu-items (cons nodename menu-items)))))
---
> (save-excursion
> (or (member (downcase nodename) menu-items)
> (re-search-forward (concat "^\\* "
> (regexp-quote nodename)
> "::")
> end t)
> (progn
> (insert "* " nodename "::" "\n")
> (setq menu-items (cons nodename menu-items))))))
421c447
< (if (re-search-forward (concat "\n.*\n.*Node: "
---
> (if (re-search-forward (concat "\n\^_.*\n.*Node: "
426c452
< (search-forward "\n" nil 'move)
---
> (search-forward "\n\^_" nil 'move)
430c456
< (insert "\nFile: dir\tnode: " nodename "\n\n* Menu:\n\n"))
---
> (insert "\^_\nFile: dir\tnode: " nodename "\n\n* Menu:\n\n"))
555a582
> (widen)
578,580c605,608
< (if hl
< (if (and (equal (nth 0 (car hl)) Info-current-file)
< (equal (nth 1 (car hl)) Info-current-node))
---
> (while hl
> (if (and (equal (nth 0 (car hl)) Info-current-file)
> (equal (nth 1 (car hl)) Info-current-node))
> (progn
582c610,611
< (Info-restore-point (cdr hl)))))
---
> (setq hl nil)) ;terminate the while at next iter
> (setq hl (cdr hl)))))
722c751
< completions default (start-point (point)) str i)
---
> completions default alt-default (start-point (point)) str i bol eol)
723a753,758
> ;; Store end and beginning of line.
> (end-of-line)
> (setq eol (point))
> (beginning-of-line)
> (setq bol (point))
>
731c766
< (< (match-beginning 0) start-point)
---
> (<= (match-beginning 0) start-point)
733a769,773
> ;; See if this one should be the alternate default.
> (and (null alt-default)
> (and (<= bol (match-beginning 0))
> (<= (point) eol))
> (setq alt-default t))
740a781
> (if (eq alt-default t) (setq alt-default str))
743a785,790
> ;; If no good default was found, try an alternate.
> (or default
> (setq default alt-default))
> ;; If only one cross-reference found, then make it default.
> (if (eq (length completions) 1)
> (setq default (car (car completions))))
847,848c894,895
< (or (re-search-forward (concat "\n* " menu-item ":") nil t)
< (re-search-forward (concat "\n* " menu-item) nil t)
---
> (or (re-search-forward (concat "\n\\* " menu-item ":") nil t)
> (re-search-forward (concat "\n\\* " menu-item) nil t)
976,979c1023
< (cond ((looking-at "\\*note[ \n]*\\([^:]*\\):")
< (Info-follow-reference
< (buffer-substring (match-beginning 1) (match-end 1))))
< ((Info-no-error (Info-next-menu-item)) )
---
> (cond ((Info-no-error (Info-next-menu-item)) )
995,996c1039
< (scroll-up))
< )
---
> (scroll-up)))
1003,1004c1046
< (scroll-down))
< )
---
> (scroll-down)))
1194c1236
< (defun Info-follow-nearest-node (click)
---
> (defun Info-mouse-follow-nearest-node (click)
1197c1239
< At end of the node's text, moves to the next node."
---
> At end of the node's text, moves to the next node, or up if none."
1203a1246,1260
> (and (not (Info-try-follow-nearest-node))
> (save-excursion (forward-line 1) (eobp))
> (Info-next-preorder)))
>
> (defun Info-follow-nearest-node ()
> "\\<Info-mode-map>Follow a node reference near point.
> Like \\[Info-menu], \\[Info-follow-reference], \\[Info-next], \\[Info-prev] or \\[Info-up] command, depending on where point is.
> If no reference to follow, moves to the next node, or up if none."
> (interactive)
> (or (Info-try-follow-nearest-node)
> (Info-next-preorder)))
>
> ;; Common subroutine.
> (defun Info-try-follow-nearest-node ()
> "Follow a node reference near point. Return non-nil if successful."
1206c1263,1264
< ((setq node (Info-get-token (point) "\\*note[ \n]" "\\*note[ \n]\\([^:]*\\):"))
---
> ((setq node (Info-get-token (point) "\\*note[ \n]"
> "\\*note[ \n]\\([^:]*\\):"))
1219,1222c1277,1278
< (Info-goto-node node))
< ((save-excursion (forward-line 1) (eobp))
< (Info-next)))
< ))
---
> (Info-goto-node node)))
> node))
1232c1288
< (define-key Info-mode-map "\C-m" 'Info-next-preorder)
---
> (define-key Info-mode-map "\C-m" 'Info-follow-nearest-node)
1267c1323
< (define-key Info-mode-map [mouse-2] 'Info-follow-nearest-node)
---
> (define-key Info-mode-map [mouse-2] 'Info-mouse-follow-nearest-node)
1295c1351
< \\[scroll-up] Normally, scroll forward a full screen. If the end of the buffer is
---
> \\[Info-scroll-up] Normally, scroll forward a full screen. If the end of the buffer is
1297c1353
< \\[scroll-down] Normally, scroll backward. If the beginning of the buffer is
---
> \\[Info-scroll-down] Normally, scroll backward. If the beginning of the buffer is
1378c1434
< "Editing: Type \\<Info-mode-map>\\[Info-cease-edit] to return to info")))
---
> "Editing: Type \\<Info-edit-map>\\[Info-cease-edit] to return to info")))
1443,1446c1499,1502
< "Found %d other entr%. Use \\[Info-last] to see %s."
< (1- num-matches)
< (if (> num-matches 2) "ies" "y")
< (if (> num-matches 2) "them" "it"))))))
---
> "Found %d other entr%s. Use \\[Info-last] to see %s.")
> (1- num-matches)
> (if (> num-matches 2) "ies" "y")
> (if (> num-matches 2) "them" "it")))))
1476c1532,1534
< 'face 'info-xref))))
---
> 'face 'info-xref)
> (put-text-property (match-beginning 1) (match-end 1)
> 'mouse-face 'highlight))))
1482c1540,1542
< 'face 'info-xref)))
---
> 'face 'info-xref)
> (put-text-property (match-beginning 1) (match-end 1)
> 'mouse-face 'highlight)))
1487c1547
< (< (- (point-max) (point)) 10000))
---
> (< (- (point-max) (point)) 30000))
1496c1556,1558
< 'face 'info-node))))
---
> 'face 'info-node)
> (put-text-property (match-beginning 1) (match-end 1)
> 'mouse-face 'highlight))))
----------------------------------------------
If you need any more information, please let me know.
Dan Gehlhaar
Agouron Pharmaceuticals, Inc.
Technical Details
Message-ID:
<9409061819.AA21680@hammer>Path:
arc1-ca.pugleaf.net!nntp.gmd.de!xlink.net!slsv6bt!slbh01.bln.sel.alcatel.de!rcvie!Austria.EU.net!EU.net!howland.reston.ans.net!math.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!agouron.com!gehlhaarShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,40cf1409b25545d6,start X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1994-09-07 10:36:20 PST Path: arc1-ca.pugleaf.net!nntp.gmd.de!xlink.net!slsv6bt!slbh01.bln.sel.alcatel.de!rcvie!Austria.EU.net!EU.net!howland.reston.ans.net!math.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!agouron.com!gehlhaar From: gehlhaar@agouron.com (Dan Gehlhaar) Newsgroups: gnu.emacs.bug Subject: Problem with info-mode in 19.25 Date: 6 Sep 1994 14:24:18 -0400 Organization: GNUs Not Usenet Lines: 436 Sender: daemon@cis.ohio-state.edu Approved: bug-gnu-emacs@prep.ai.mit.edu Distribution: gnu Message-ID: <9409061819.AA21680@hammer>