bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#26412: 26.0.50; Minibuffer completion for "C-h f" probes unrelated s


From: npostavs
Subject: bug#26412: 26.0.50; Minibuffer completion for "C-h f" probes unrelated stuff
Date: Sun, 09 Apr 2017 07:56:47 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Eli Zaretskii <address@hidden> 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 via email to

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