emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Info


From: Stefan Monnier
Subject: Info
Date: Thu, 29 Nov 2001 18:52:24 -0500

I was going through the old "todo" things and bumped into the completion
in Info-index.  So it's now finally working.

But I'm still wondering about the thing that I brought up a year ago:

The function info-insert-file-contents is called twice in info.el, once
with the `visit' argument set to t and once to nil (by default).

I can't quite figure out why there is such a difference, but the result is
that if you visit the `emacs' manual, `buffer-file-name' is nil while
if you visit the `message' manual, `buffer-file-name' will be set to
the path corresponding to the info file (like "/usr/local/info/message").
The difference being that `emacs' has a separate tag-table-only file
while `message' does not.

I don't really mind the discrepancy as much as I dislike setting
buffer-file-name since it has several side-effects:
- when visiting the `message' info pages, if you do
  C-x C-f /usr/local/info/message RET you're put into the *Info* buffer.
- if you use uniquify and (setq uniquify-after-kill-buffer-p t),
  the *Info* buffer will be renamed "message" if you kill another buffer.

Now the C-x C-f thing might be considered a feature (especially if
we might want to automatically turn on info-mode when visiting info
buffers at some point in the future, using something like
Info-on-current-buffer).  But the interaction with uniquify is
rather unfortunate.

Should uniquify be instructed not to muck around with Info buffers
or should Info be careful not to set buffer-file-name ?

I've been running with the trivial patch below for a year now
without seeing any adverse effect.


        Stefan


Index: info.el
===================================================================
RCS file: /cvs/emacs/lisp/info.el,v
retrieving revision 1.286
diff -u -r1.286 info.el
--- info.el     2001/11/29 23:44:01     1.286
+++ info.el     2001/11/29 23:46:35
@@ -609,7 +609,7 @@
               (erase-buffer)
               (if (eq filename t)
                   (Info-insert-dir)
-                (info-insert-file-contents filename t)
+                (info-insert-file-contents filename nil)
                 (setq default-directory (file-name-directory filename)))
               (set-buffer-modified-p nil)
               ;; See whether file has a tag table.  Record the location if yes.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]