From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: npostavs@users.sourceforge.net Newsgroups: gmane.emacs.bugs Subject: bug#26412: 26.0.50; Minibuffer completion for "C-h f" probes unrelated stuff Date: Sun, 09 Apr 2017 07:56:47 -0400 Message-ID: <87shlhu740.fsf@users.sourceforge.net> References: <83zifqkjsh.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1491738985 13585 195.159.176.226 (9 Apr 2017 11:56:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 9 Apr 2017 11:56:25 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) Cc: 26412@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Apr 09 13:56:21 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxBRx-0001Qs-6o for geb-bug-gnu-emacs@m.gmane.org; Sun, 09 Apr 2017 13:56:09 +0200 Original-Received: from localhost ([::1]:58218 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cxBS1-0000xt-Jt for geb-bug-gnu-emacs@m.gmane.org; Sun, 09 Apr 2017 07:56:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45915) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cxBRt-0000xX-J2 for bug-gnu-emacs@gnu.org; Sun, 09 Apr 2017 07:56:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cxBRq-0000QY-H7 for bug-gnu-emacs@gnu.org; Sun, 09 Apr 2017 07:56:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:40804) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cxBRq-0000QO-Ci for bug-gnu-emacs@gnu.org; Sun, 09 Apr 2017 07:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cxBRp-0002U7-Tq for bug-gnu-emacs@gnu.org; Sun, 09 Apr 2017 07:56:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 09 Apr 2017 11:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26412 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 26412-submit@debbugs.gnu.org id=B26412.14917389309506 (code B ref 26412); Sun, 09 Apr 2017 11:56:01 +0000 Original-Received: (at 26412) by debbugs.gnu.org; 9 Apr 2017 11:55:30 +0000 Original-Received: from localhost ([127.0.0.1]:39002 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxBRJ-0002TG-Qv for submit@debbugs.gnu.org; Sun, 09 Apr 2017 07:55:30 -0400 Original-Received: from mail-io0-f178.google.com ([209.85.223.178]:33390) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cxBRI-0002Sz-86 for 26412@debbugs.gnu.org; Sun, 09 Apr 2017 07:55:28 -0400 Original-Received: by mail-io0-f178.google.com with SMTP id t68so36460615iof.0 for <26412@debbugs.gnu.org>; Sun, 09 Apr 2017 04:55:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=RIr8GqWtcZHkHnFxCluvZAXsBewP6qT7vzUwlZbiLYI=; b=szkYv5iqYpBASupXxeZlqI22c/sWrlk9ogVATgGuRKqBiF6zX1BT2L8GVQDPfCwBFY +VFZt0WLpiv/+R5aNUvUhL5vyiO1PL5sunKJTWy+RJMP/+hkDneb+ZuWnwYN6US0KiwO iKhlOBj9boVb8mhqKjOIRqOmS4N1yuueRx36+t5WDUAf175PapBUhzmsV2kiJcFOOdGb QD2KTOv8XvOzNFrM73rZ+Auf+STJDYCDo5Ng1ifQ8zHQJ7seAN4IuiMKOjmpU93wTl8O sCWiIedrxHpaVc6GGnPADf9eEoCftSPvqL5A3FfBEZWKdy+hIIGo7uWLN57kjUw4sl9V 9aeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=RIr8GqWtcZHkHnFxCluvZAXsBewP6qT7vzUwlZbiLYI=; b=fnT7z2CDCjiPkO8/Ukt4XkjEWHCPH4vGTmr+dwOt/j0k9DJsIcEjBKlZ4Cy3YSb3L1 ey0F5hTLp4M6TgU/v/92qfYu/SWfJMbF0CVHS3e521yQuH689l64IlexOpZsEynjqtna Iw1SgYliXPM+R483aeGaNAuUm4rV+PkS4zkgi0p80ijnxmFSZQTeOyM383lCEFbGaco/ R4rKhFgDQgGpHSLFJqKNK2aBLKBAXxhuppJjSsdGoSY7aPxM0O4/Bebv9oNdZT8cmi20 HZeOFJAR58552JPPFEhIP9/wnz2zI1DnSV+/zZJcocWbaLNEntS6tTdMYo2ckgPC4WZG vSgA== X-Gm-Message-State: AFeK/H3nGaBPAFX6R17ybKFgnFOEuEJji93GbQGghSPAzHzYvA9ZRIV3ryAOJqd72xIclw== X-Received: by 10.107.172.134 with SMTP id v128mr52363280ioe.49.1491738922603; Sun, 09 Apr 2017 04:55:22 -0700 (PDT) Original-Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id d188sm858505itc.1.2017.04.09.04.55.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 09 Apr 2017 04:55:21 -0700 (PDT) In-Reply-To: <83zifqkjsh.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 09 Apr 2017 12:33:02 +0300") 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:131405 Archived-At: Eli Zaretskii writes: > It seems minibuffer completion, via its subroutine > help--load-prefixes, is too eager to probe unrelated stuff, for some > reason. Similar report for C-h v at https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25552. > Recompiling all the *.el files doesn't help. > Why would minibuffer completion of a symbol want to know whether I > have MH installed?? > > As another example, why would the same "C-h f" command need to know > what kind of movemail program I have? The mh-e files have some strange compile vs runtime setup. Several are marked with no-byte-compile, and they make some checks for installed MH program inside macros. So you get these "NO MH variant" messages every time the file is loaded, no matter what. Below is a backtrace from doing emacs -Q -l help-fns.el -l minibuffer.el --eval '(progn (setq print-circle t print-gensym t) (debug-on-load (quote load)))' then C-h f default-font-height RET The essential problem seems to be that (radix-tree-prefixes (help-definition-prefixes) "default-font-height") ;=> (("def" "nnoo" "mode-local" "mh-e" "mh-acros" "cl")) Actually, (radix-tree-prefixes (help-definition-prefixes) "default") produces the same as result, and C-h f default SPC triggers this as well. I can't find any definitions starting with "default" in lisp/mh-e/*.el though. Debugger entered--entering a function: * load("nnoo" noerror nomessage) (if (help--loaded-p file) nil (load file (quote noerror) (quote nomessage))) (let ((file (car --dolist-tail--))) (if (help--loaded-p file) nil (load file (quote noerror) (quote nomessage))) (setq --dolist-tail-- (cdr --dolist-tail--))) (while --dolist-tail-- (let ((file (car --dolist-tail--))) (if (help--loaded-p file) nil (load file (quote noerror) (quote nomessage))) (setq --dolist-tail-- (cdr --dolist-tail--)))) (let ((--dolist-tail-- files)) (while --dolist-tail-- (let ((file (car --dolist-tail--))) (if (help--loaded-p file) nil (load file (quote noerror) (quote nomessage))) (setq --dolist-tail-- (cdr --dolist-tail--))))) (progn (setq help-definition-prefixes (radix-tree-insert help-definition-prefixes prefix nil)) (let ((--dolist-tail-- files)) (while --dolist-tail-- (let ((file (car --dolist-tail--))) (if (help--loaded-p file) nil (load file (quote noerror) (quote nomessage))) (setq --dolist-tail-- (cdr --dolist-tail--)))))) (let ((files #:x) (prefix #:x)) (progn (setq help-definition-prefixes (radix-tree-insert help-definition-prefixes prefix nil)) (let ((--dolist-tail-- files)) (while --dolist-tail-- (let ((file (car --dolist-tail--))) (if (help--loaded-p file) nil (load file (quote noerror) (quote nomessage))) (setq --dolist-tail-- (cdr --dolist-tail--))))))) (let* ((#3=#:x (car #1=#:x)) (#2=#:x (cdr #1#))) (let ((files #2#) (prefix #3#)) (progn (setq help-definition-prefixes (radix-tree-insert help-definition-prefixes prefix nil)) (let ((--dolist-tail-- files)) (while --dolist-tail-- (let ((file ...)) (if (help--loaded-p file) nil (load file ... ...)) (setq --dolist-tail-- (cdr --dolist-tail--)))))))) (let ((#1=#:x (car --dolist-tail--))) (let* ((#3=#:x (car #1#)) (#2=#:x (cdr #1#))) (let ((files #2#) (prefix #3#)) (progn (setq help-definition-prefixes (radix-tree-insert help-definition-prefixes prefix nil)) (let ((--dolist-tail-- files)) (while --dolist-tail-- (let (...) (if ... nil ...) (setq --dolist-tail-- ...))))))) (setq --dolist-tail-- (cdr --dolist-tail--))) (while --dolist-tail-- (let ((#1=#:x (car --dolist-tail--))) (let* ((#3=#:x (car #1#)) (#2=#:x (cdr #1#))) (let ((files #2#) (prefix #3#)) (progn (setq help-definition-prefixes (radix-tree-insert help-definition-prefixes prefix nil)) (let ((--dolist-tail-- files)) (while --dolist-tail-- (let ... ... ...)))))) (setq --dolist-tail-- (cdr --dolist-tail--)))) (let ((--dolist-tail-- prefixes)) (while --dolist-tail-- (let ((#1=#:x (car --dolist-tail--))) (let* ((#3=#:x (car #1#)) (#2=#:x (cdr #1#))) (let ((files #2#) (prefix #3#)) (progn (setq help-definition-prefixes (radix-tree-insert help-definition-prefixes prefix nil)) (let (...) (while --dolist-tail-- ...))))) (setq --dolist-tail-- (cdr --dolist-tail--))))) help--load-prefixes((("def" "nnoo" "mode-local" "mh-e" "mh-acros" "cl"))) (let ((prefixes (radix-tree-prefixes (help-definition-prefixes) string))) (help--load-prefixes prefixes)) help--symbol-completion-table("default-font-height" (closure ((fn) t) (f) (or (fboundp f) (get f (quote function-documentation)))) lambda) test-completion("default-font-height" help--symbol-completion-table (closure ((fn) t) (f) (or (fboundp f) (get f (quote function-documentation))))) (cond ((= beg end) (funcall exit-function)) ((test-completion (buffer-substring beg end) minibuffer-completion-table minibuffer-completion-predicate) (if completion-ignore-case (progn (let* ((string (buffer-substring beg end)) (compl (try-completion string minibuffer-completion-table minibuffer-completion-predicate))) (if (and (stringp compl) (not ...) (= ... ...)) (progn (completion--replace beg end compl)))))) (funcall exit-function)) ((memq minibuffer-completion-confirm (quote (confirm confirm-after-completion))) (if (or (eq last-command this-command) (and (eq minibuffer-completion-confirm (quote confirm-after-completion)) (not (memq last-command minibuffer-confirm-exit-commands)))) (funcall exit-function) (minibuffer-message "Confirm") nil)) (t (funcall completion-function))) completion--complete-and-exit(20 39 exit-minibuffer (closure ((exit-function . exit-minibuffer) (end . 39) (beg . 20) t) nil (let* ((#1=#:val (condition-case nil (completion--do-completion beg end nil (quote expect-exact)) (error 1)))) (cond ((memq #1# (quote (3 1))) (funcall exit-function)) ((eq #1# 7) (if (not minibuffer-completion-confirm) (funcall exit-function) (minibuffer-message "Confirm") nil)) (t nil))))) completion-complete-and-exit(20 39 exit-minibuffer) minibuffer-complete-and-exit()