From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#397: 23.0.60; T in Info when in (dir) Date: Wed, 27 Apr 2016 20:28:15 +0200 Message-ID: <874mamgb40.fsf@gnus.org> References: <007c01c8cca4$686e6fb0$c2b22382@us.oracle.com> <87eg9rhvzy.fsf@gnus.org> <285bd041-cb56-4d42-a085-88605bd08f44@default> <87twingfso.fsf@gnus.org> <72369d48-65c7-4468-9d49-21dcb045cdf2@default> <8760v3gdkm.fsf@gnus.org>> <5a64ed8a-d9c7-4b33-b63a-11d83b7dab99@default>> <83vb33x7b6.fsf@gnu.org>> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1461781764 18434 80.91.229.3 (27 Apr 2016 18:29:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 Apr 2016 18:29:24 +0000 (UTC) Cc: 397@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Apr 27 20:29:11 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1avUD0-0008DY-Vy for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Apr 2016 20:29:11 +0200 Original-Received: from localhost ([::1]:44665 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avUD0-0003R7-Bu for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Apr 2016 14:29:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54302) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avUCv-0003N2-Gk for bug-gnu-emacs@gnu.org; Wed, 27 Apr 2016 14:29:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1avUCs-0007Ye-9y for bug-gnu-emacs@gnu.org; Wed, 27 Apr 2016 14:29:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:38168) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1avUCs-0007YU-6b for bug-gnu-emacs@gnu.org; Wed, 27 Apr 2016 14:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1avUCr-0001Ah-Vr for bug-gnu-emacs@gnu.org; Wed, 27 Apr 2016 14:29:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Apr 2016 18:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 397 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 397-submit@debbugs.gnu.org id=B397.14617816994448 (code B ref 397); Wed, 27 Apr 2016 18:29:01 +0000 Original-Received: (at 397) by debbugs.gnu.org; 27 Apr 2016 18:28:19 +0000 Original-Received: from localhost ([127.0.0.1]:50505 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1avUCB-00019g-Ko for submit@debbugs.gnu.org; Wed, 27 Apr 2016 14:28:19 -0400 Original-Received: from hermes.netfonds.no ([80.91.224.195]:47509) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1avUCA-00019Z-KP for 397@debbugs.gnu.org; Wed, 27 Apr 2016 14:28:18 -0400 Original-Received: from cm-84.215.1.64.getinternet.no ([84.215.1.64] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1avUC7-00019y-T9; Wed, 27 Apr 2016 20:28:17 +0200 In-Reply-To: (Drew Adams's message of "Wed, 27 Apr 2016 11:09:54 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:116950 Archived-At: Drew Adams 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