all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Drew Adams <drew.adams@oracle.com>
Cc: 397@debbugs.gnu.org
Subject: bug#397: 23.0.60; T in Info when in (dir)
Date: Wed, 27 Apr 2016 20:28:15 +0200	[thread overview]
Message-ID: <874mamgb40.fsf@gnus.org> (raw)
In-Reply-To: <b018da66-7a95-4b32-b184-baecc0a3af3a@default> (Drew Adams's message of "Wed, 27 Apr 2016 11:09:54 -0700 (PDT)")

Drew Adams <drew.adams@oracle.com> 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)
      (Info-mode))
  (widen)
  (setq Info-current-node nil)
  (unwind-protect
      (let ((case-fold-search t)
	    (virtual-fun (Info-virtual-fun 'find-node
					   (or filename Info-current-file)
					   nodename))
	    anchorpos)
	(cond
	 ((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)
	    (erase-buffer)

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'."
  (Info-insert-dir))

...

(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	other threads:[~2016-04-27 18:28 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-12 15:53 bug#397: 23.0.60; T in Info when in (dir) Drew Adams
2016-04-27 16:11 ` Lars Ingebrigtsen
2016-04-27 16:42   ` Drew Adams
2016-04-27 16:47     ` Lars Ingebrigtsen
2016-04-27 17:12       ` Drew Adams
2016-04-27 17:35         ` Lars Ingebrigtsen
2016-04-27 17:46           ` Drew Adams
2016-04-27 17:58             ` Eli Zaretskii
2016-04-27 18:22               ` Andreas Schwab
2016-04-27 19:27                 ` Eli Zaretskii
2016-04-30 20:08                   ` Juri Linkov
     [not found]           ` <<5a64ed8a-d9c7-4b33-b63a-11d83b7dab99@default>
     [not found]             ` <<83vb33x7b6.fsf@gnu.org>
2016-04-27 18:09               ` Drew Adams
2016-04-27 18:28                 ` Lars Ingebrigtsen [this message]
2022-03-21 22:06                   ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874mamgb40.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=397@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.