all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: npostavs@users.sourceforge.net
To: Eli Zaretskii <eliz@gnu.org>
Cc: 26412@debbugs.gnu.org
Subject: bug#26412: 26.0.50; Minibuffer completion for "C-h f" probes unrelated stuff
Date: Sun, 09 Apr 2017 07:56:47 -0400	[thread overview]
Message-ID: <87shlhu740.fsf@users.sourceforge.net> (raw)
In-Reply-To: <83zifqkjsh.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 09 Apr 2017 12:33:02 +0300")

Eli Zaretskii <eliz@gnu.org> 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()





  reply	other threads:[~2017-04-09 11:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-09  9:33 bug#26412: 26.0.50; Minibuffer completion for "C-h f" probes unrelated stuff Eli Zaretskii
2017-04-09 11:56 ` npostavs [this message]
2017-04-09 12:37   ` Eli Zaretskii
2017-04-10 13:24   ` npostavs
2017-04-10 13:33     ` Eli Zaretskii
2017-04-11 14:13       ` npostavs
2017-04-11 15:36         ` Eli Zaretskii
2017-04-20  3:13           ` npostavs

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=87shlhu740.fsf@users.sourceforge.net \
    --to=npostavs@users.sourceforge.net \
    --cc=26412@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /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.