[Top][All Lists]

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

bug#397: 23.0.60; T in Info when in (dir)

From: Lars Ingebrigtsen
Subject: bug#397: 23.0.60; T in Info when in (dir)
Date: Wed, 27 Apr 2016 20:28:15 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Drew Adams <address@hidden> writes:

> Fair enough.  Someone might actually try it: use the :enable
> guard (Info-find-node "dir" "*TOC*") and see whether it is
> in fact onerous.  If it is then I agree with (both of) you:
> we can do without disabling the menu item.

Well, using it as is doesn't really work, because it does a lot
of... stuff.

Here's how it starts:

(defun Info-find-node-2 (filename nodename &optional no-going-back strict-case)
  (buffer-disable-undo (current-buffer))
  (or (derived-mode-p 'Info-mode)
  (setq Info-current-node nil)
      (let ((case-fold-search t)
            (virtual-fun (Info-virtual-fun 'find-node
                                           (or filename Info-current-file)
         ((functionp virtual-fun)
          (let ((filename (or filename Info-current-file)))
            (setq buffer-read-only nil)
            (setq Info-current-file filename
                  Info-current-subfile nil
                  Info-current-file-completions nil
                  buffer-file-name nil)

So that's not the right thing to use.

(Info-virtual-fun 'find-node "dir" "*TOC*")
=> Info-directory-find-node

(defun Info-directory-find-node (_filename _nodename &optional _no-going-back)
  "Directory-specific implementation of `Info-find-node-2'."


(defun Info-insert-dir ()
  (if (and Info-dir-contents Info-dir-file-attributes
           ;; Verify that none of the files we used has changed
           ;; since we used it.
           (eval (cons 'and
                       (mapcar (lambda (elt)
                                 (let ((curr (file-attributes
                                              ;; Handle symlinks
                                              (file-truename (car elt)))))

And down the rabbit hole we go.  Why are we calling that function and
ignoring the parameters?  It's all very confusing.

So does somebody know what the real way to find out whether a node
exists is?  :-)

(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no

reply via email to

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