* bug#9669: 24.0.50; `tramp-compat.el' in *Help* when it doesn't belong (?)
@ 2011-10-04 16:55 Drew Adams
2011-10-04 17:00 ` Drew Adams
2011-10-04 17:52 ` Stefan Monnier
0 siblings, 2 replies; 13+ messages in thread
From: Drew Adams @ 2011-10-04 16:55 UTC (permalink / raw)
To: 9669
I'm seeing this in my own setup. I don't have the time to track it down
further. Maybe you can reproduce it for emacs -Q (maybe not). Maybe
you can understand the problem from the description here (maybe not).
I do `C-h f read-char-by-name', and I see this:
read-char-by-name is an alias for `icicle-read-char-by-name' in
`tramp-compat.el'.
I expect to see that, except that the file where
`icicle-read-char-by-name' is defined is `icicles-fn.el', not
`tramp-compat.el'. No idea where the latter comes from. A user
clicking the `tramp-compat.el' link will go to that file and have no
clue about either `read-char-by-name' or `icicle-read-char-by-name'!
And if a user clicks `icicle-read-char-by-name' s?he sees only this -
still no mention of `icicles-fn.el':
icicle-read-char-by-name is a compiled Lisp function.
The defaliasing is done dynamically, and that is perhaps what throws
things off. In `icicles-mode.el', the defaliasing code is this:
(defun icicle-redefine-standard-functions ()
(when (fboundp 'icicle-completing-read)
(dolist (fn icicle-functions-to-redefine)
(when (fboundp (intern (concat "old-" (symbol-name fn))))
(defalias fn (intern (concat "icicle-" (symbol-name fn))))))))
I can understand that `C-h f' would not be able to figure out which file
the defaliasing was done in. But what the help seems to say is that
`icicle-read-char-by-name' is defined in `tramp-compat.el', and it is
not (nor is `read-char-by-name'). There is nothing in `tramp-compat.el'
about `read-char'.
I would expect that the help could figure out where
`icicle-read-char-by-name' is defined, even if it cannot figure out
where `read-char-by-name' gets defaliased to it.
In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
of 2011-09-19 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.5) --no-opt'
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#9669: 24.0.50; `tramp-compat.el' in *Help* when it doesn't belong (?)
2011-10-04 16:55 bug#9669: 24.0.50; `tramp-compat.el' in *Help* when it doesn't belong (?) Drew Adams
@ 2011-10-04 17:00 ` Drew Adams
2011-10-04 17:52 ` Stefan Monnier
1 sibling, 0 replies; 13+ messages in thread
From: Drew Adams @ 2011-10-04 17:00 UTC (permalink / raw)
To: 9669
FWIW, in Emacs 23.3, the same problem occurs, but the file cited is `tramp.el',
not `tramp-compat.el'. HTH.
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#9669: 24.0.50; `tramp-compat.el' in *Help* when it doesn't belong (?)
2011-10-04 16:55 bug#9669: 24.0.50; `tramp-compat.el' in *Help* when it doesn't belong (?) Drew Adams
2011-10-04 17:00 ` Drew Adams
@ 2011-10-04 17:52 ` Stefan Monnier
2011-10-04 17:56 ` Drew Adams
1 sibling, 1 reply; 13+ messages in thread
From: Stefan Monnier @ 2011-10-04 17:52 UTC (permalink / raw)
To: Drew Adams; +Cc: 9669
> I'm seeing this in my own setup. I don't have the time to track it down
> further. Maybe you can reproduce it for emacs -Q (maybe not). Maybe
> you can understand the problem from the description here (maybe not).
I might have a vague idea why the defalias cold be attributed to another
file (e.g. tramp-compat.el, because the defalias happened to be executed
as part of code executed while loading tramp-compat.el) but seeing more
details it's hard to know how we could try and fix it. And without more
details I have no clue why icicle-read-char-by-name isn't properly
attributed to icicles.
Stefan
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#9669: 24.0.50; `tramp-compat.el' in *Help* when it doesn't belong (?)
2011-10-04 17:52 ` Stefan Monnier
@ 2011-10-04 17:56 ` Drew Adams
2011-10-04 21:41 ` Stefan Monnier
0 siblings, 1 reply; 13+ messages in thread
From: Drew Adams @ 2011-10-04 17:56 UTC (permalink / raw)
To: 'Stefan Monnier'; +Cc: 9669
> I might have a vague idea why the defalias cold be attributed
> to another file (e.g. tramp-compat.el, because the defalias
> happened to be executed as part of code executed while loading
> tramp-compat.el) but seeing more details it's hard to know how
> we could try and fix it. And without more details I have no
> clue why icicle-read-char-by-name isn't properly attributed to
> icicles.
I understand. It was worth a try, in case it rang a bell immediately.
I don't have time to dig down deeply into this (e.g. try to make a reproducible
case from emacs -Q), but perhaps you can let me know something about what
additional info might help. If it doesn't take to long to dig that up, I will
try to do so.
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#9669: 24.0.50; `tramp-compat.el' in *Help* when it doesn't belong (?)
2011-10-04 17:56 ` Drew Adams
@ 2011-10-04 21:41 ` Stefan Monnier
2011-10-04 22:15 ` Drew Adams
0 siblings, 1 reply; 13+ messages in thread
From: Stefan Monnier @ 2011-10-04 21:41 UTC (permalink / raw)
To: Drew Adams; +Cc: 9669
>> I might have a vague idea why the defalias cold be attributed
>> to another file (e.g. tramp-compat.el, because the defalias
>> happened to be executed as part of code executed while loading
>> tramp-compat.el) but seeing more details it's hard to know how
>> we could try and fix it. And without more details I have no
>> clue why icicle-read-char-by-name isn't properly attributed to
>> icicles.
> I understand. It was worth a try, in case it rang a bell immediately.
> I don't have time to dig down deeply into this (e.g. try to make a reproducible
> case from emacs -Q), but perhaps you can let me know something about what
> additional info might help. If it doesn't take to long to dig that up, I will
> try to do so.
For the defalias, just place a (debug) in front of the defalias and post
the resulting backtrace.
For the other function, showing us how it's defined would be a good
first step.
Stefan
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#9669: 24.0.50; `tramp-compat.el' in *Help* when it doesn't belong (?)
2011-10-04 21:41 ` Stefan Monnier
@ 2011-10-04 22:15 ` Drew Adams
2011-10-05 0:30 ` Stefan Monnier
0 siblings, 1 reply; 13+ messages in thread
From: Drew Adams @ 2011-10-04 22:15 UTC (permalink / raw)
To: 'Stefan Monnier'; +Cc: 9669
> For the defalias, just place a (debug) in front of the
> defalias and post the resulting backtrace.
Not sure what you mean. This is the backtrace upon entry:
(progn (debug) (defalias fn (intern (concat "icicle-" (symbol-name fn)))))
(if (fboundp (intern (concat "old-" (symbol-name fn)))) (progn (debug)
(defalias fn (intern (concat "icicle-" (symbol-name fn))))))
(when (fboundp (intern (concat "old-" (symbol-name fn)))) (debug) (defalias fn
(intern (concat "icicle-" (symbol-name fn)))))
(while --cl-dolist-temp-- (setq fn (car --cl-dolist-temp--)) (when (fboundp
(intern (concat "old-" (symbol-name fn)))) (debug) (defalias fn (intern (concat
"icicle-" (symbol-name fn))))) (setq --cl-dolist-temp-- (cdr
--cl-dolist-temp--)))
(let ((--cl-dolist-temp-- icicle-functions-to-redefine) fn) (while
--cl-dolist-temp-- (setq fn (car --cl-dolist-temp--)) (when (fboundp (intern
(concat "old-" (symbol-name fn)))) (debug) (defalias fn (intern (concat
"icicle-" (symbol-name fn))))) (setq --cl-dolist-temp-- (cdr
--cl-dolist-temp--))))
(catch (quote --cl-block-nil--) (let ((--cl-dolist-temp--
icicle-functions-to-redefine) fn) (while --cl-dolist-temp-- (setq fn (car
--cl-dolist-temp--)) (when (fboundp (intern (concat "old-" (symbol-name fn))))
(debug) (defalias fn (intern (concat "icicle-" (symbol-name fn))))) (setq
--cl-dolist-temp-- (cdr --cl-dolist-temp--)))))
(cl-block-wrapper (catch (quote --cl-block-nil--) (let ((--cl-dolist-temp--
icicle-functions-to-redefine) fn) (while --cl-dolist-temp-- (setq fn (car
--cl-dolist-temp--)) (when (fboundp (intern (concat "old-" ...))) (debug)
(defalias fn (intern (concat "icicle-" ...)))) (setq --cl-dolist-temp-- (cdr
--cl-dolist-temp--))))))
(block nil (let ((--cl-dolist-temp-- icicle-functions-to-redefine) fn) (while
--cl-dolist-temp-- (setq fn (car --cl-dolist-temp--)) (when (fboundp (intern
(concat "old-" (symbol-name fn)))) (debug) (defalias fn (intern (concat
"icicle-" (symbol-name fn))))) (setq --cl-dolist-temp-- (cdr
--cl-dolist-temp--)))))
(dolist (fn icicle-functions-to-redefine) (when (fboundp (intern (concat
"old-" (symbol-name fn)))) (debug) (defalias fn (intern (concat "icicle-"
(symbol-name fn))))))
(progn (dolist (fn icicle-functions-to-redefine) (when (fboundp (intern
(concat "old-" (symbol-name fn)))) (debug) (defalias fn (intern (concat
"icicle-" (symbol-name fn)))))))
(if (fboundp (quote icicle-completing-read)) (progn (dolist (fn
icicle-functions-to-redefine) (when (fboundp (intern (concat "old-" (symbol-name
fn)))) (debug) (defalias fn (intern (concat "icicle-" (symbol-name fn))))))))
(when (fboundp (quote icicle-completing-read)) (dolist (fn
icicle-functions-to-redefine) (when (fboundp (intern (concat "old-" (symbol-name
fn)))) (debug) (defalias fn (intern (concat "icicle-" (symbol-name fn)))))))
icicle-redefine-standard-functions()
(cond (icicle-mode ... (icicle-redefine-standard-functions)...)
...
And this is the return value:
Debugger entered--returning value: icicle-comint-dynamic-complete
defalias(comint-dynamic-complete icicle-comint-dynamic-complete)
(progn (debug) (defalias fn (intern (concat "icicle-" (symbol-name fn)))))
Dunno how that would help you. Let me know if you meant something different.
> For the other function, showing us how it's defined would be a good
> first step.
What other function?
This is a defalias of a standard Emacs function to an Icicles variant. There
are several such defaliases. Each such pair <std fn, Icicles fn> is different.
The definitions of the actual functions cannot, I think, be important, since
they are all completeley different.
But I'm probably misunderstanding you.
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#9669: 24.0.50; `tramp-compat.el' in *Help* when it doesn't belong (?)
2011-10-04 22:15 ` Drew Adams
@ 2011-10-05 0:30 ` Stefan Monnier
2011-10-05 1:03 ` Drew Adams
0 siblings, 1 reply; 13+ messages in thread
From: Stefan Monnier @ 2011-10-05 0:30 UTC (permalink / raw)
To: Drew Adams; +Cc: 9669
>> For the defalias, just place a (debug) in front of the
>> defalias and post the resulting backtrace.
> Not sure what you mean. This is the backtrace upon entry:
I meant exactly what you did...
[...]
> icicle-redefine-standard-functions()
> (cond (icicle-mode ... (icicle-redefine-standard-functions)...)
> ...
But it's the part in the "..." that I'm interested in (i.e. in which
context is icicle-redefine-standard-functions called).
>> For the other function, showing us how it's defined would be a good
>> first step.
> What other function?
The one you said Emacs couldn't discover where it's defined.
Stefan
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#9669: 24.0.50; `tramp-compat.el' in *Help* when it doesn't belong (?)
2011-10-05 0:30 ` Stefan Monnier
@ 2011-10-05 1:03 ` Drew Adams
2011-10-05 16:34 ` Stefan Monnier
0 siblings, 1 reply; 13+ messages in thread
From: Drew Adams @ 2011-10-05 1:03 UTC (permalink / raw)
To: 'Stefan Monnier'; +Cc: 9669
> But it's the part in the "..." that I'm interested in (i.e. in which
> context is icicle-redefine-standard-functions called).
It is called when you turn on minor mode `icicle-mode'.
Debugger entered--entering a function:
* symbol-name(comint-dynamic-complete)
icicle-redefine-standard-functions()
(cond (icicle-mode (icicle-define-icicle-maps) (icicle-bind-other-keymap-keys)
(add-hook (quote minibuffer-setup-hook) (quote icicle-minibuffer-setup))
(add-hook (quote minibuffer-exit-hook) (quote icicle-cancel-Help-redirection))
(add-hook (quote minibuffer-exit-hook) (quote icicle-restore-region-face))
(add-hook (quote minibuffer-exit-hook) (quote icicle-unhighlight-lighter))
(add-hook (quote icicle-post-command-hook) (quote icicle-activate-mark) (quote
append)) (add-hook (quote completion-setup-hook) (quote icicle-set-calling-cmd)
(quote append)) (when icicle-customize-save-flag (add-hook (quote
kill-emacs-hook) (quote icicle-command-abbrev-save))) (add-hook (quote
comint-mode-hook) (quote icicle-comint-hook-fn)) (add-hook (quote
compilation-mode-hook) (quote icicle-compilation-hook-fn)) (add-hook (quote
compilation-minor-mode-hook) (quote icicle-compilation-hook-fn))
(icicle-undo-std-completion-faces) (icicle-redefine-std-completion-fns)
(icicle-redefine-standard-functions) (icicle-redefine-standard-options) (when
(ad-find-some-advice (quote describe-face) (quote before) (quote
icicle-respect-WYSIWYG)) (ad-enable-advice (quote describe-face) (quote before)
(quote icicle-respect-WYSIWYG))) (when (fboundp (quote
minibuffer-depth-indicate-mode)) (minibuffer-depth-indicate-mode 99)) (if
icicle-menu-items-to-history-flag (add-hook (quote pre-command-hook) (quote
icicle-add-menu-item-to-cmd-history)) (remove-hook (quote pre-command-hook)
(quote icicle-add-menu-item-to-cmd-history))) (when (> emacs-major-version 22)
(when icicle-populate-interactive-history-flag (ad-enable-advice (quote
call-interactively) (quote after) (quote icicle-save-to-history))) (ad-activate
(quote call-interactively))) (dolist (fn icicle-inhibit-advice-functions) (when
(and (fboundp fn) (ad-is-active fn)) (push (cons fn (ad-copy-advice-info fn))
icicle-advice-info-list) (ad-deactivate fn)))) (t (makunbound (quote
icicle-mode-map)) (icicle-restore-other-keymap-keys) (remove-hook (quote
minibuffer-setup-hook) (quote icicle-minibuffer-setup)) (remove-hook (quote
minibuffer-exit-hook) (quote icicle-cancel-Help-redirection)) (remove-hook
(quote minibuffer-exit-hook) (quote icicle-restore-region-face)) (remove-hook
(quote icicle-post-command-hook) (quote icicle-activate-mark)) (remove-hook
(quote pre-command-hook) (quote icicle-top-level-prep)) (remove-hook (quote
pre-command-hook) (quote icicle-run-icicle-pre-command-hook) t) (remove-hook
(quote post-command-hook) (quote icicle-run-icicle-post-command-hook) t)
(remove-hook (quote completion-setup-hook) (quote icicle-set-calling-cmd))
(remove-hook (quote kill-emacs-hook) (quote icicle-command-abbrev-save))
(remove-hook (quote comint-mode-hook) (quote icicle-comint-hook-fn))
(remove-hook (quote compilation-mode-hook) (quote icicle-compilation-hook-fn))
(remove-hook (quote compilation-minor-mode-hook) (quote
icicle-compilation-hook-fn)) (icicle-restore-std-completion-fns)
(icicle-restore-standard-functions) (icicle-restore-standard-options) (when
(ad-find-some-advice (quote describe-face) (quote before) (quote
icicle-respect-WYSIWYG)) (ad-disable-advice (quote describe-face) (quote before)
(quote icicle-respect-WYSIWYG))) (when (fboundp (quote
minibuffer-depth-indicate-mode)) (minibuffer-depth-indicate-mode -99))
(remove-hook (quote pre-command-hook) (quote
icicle-add-menu-item-to-cmd-history)) (when (> emacs-major-version 22)
(ad-disable-advice (quote call-interactively) (quote after) (quote
icicle-save-to-history)) (ad-activate (quote call-interactively))) (dolist (fn
icicle-inhibit-advice-functions) (let ((info (memq fn icicle-advice-info-list)))
(when (and (fboundp fn) info) (ad-set-advice-info fn info) (when (ad-is-active
fn) (ad-activate fn)))))))
(let ((last-message (current-message))) (setq icicle-mode (if (eq arg (quote
toggle)) (not icicle-mode) (> (prefix-numeric-value arg) 0))) (cond (icicle-mode
(icicle-define-icicle-maps) (icicle-bind-other-keymap-keys) (add-hook (quote
minibuffer-setup-hook) (quote icicle-minibuffer-setup)) (add-hook (quote
minibuffer-exit-hook) (quote icicle-cancel-Help-redirection)) (add-hook (quote
minibuffer-exit-hook) (quote icicle-restore-region-face)) (add-hook (quote
minibuffer-exit-hook) (quote icicle-unhighlight-lighter)) (add-hook (quote
icicle-post-command-hook) (quote icicle-activate-mark) (quote append)) (add-hook
(quote completion-setup-hook) (quote icicle-set-calling-cmd) (quote append))
(when icicle-customize-save-flag (add-hook (quote kill-emacs-hook) (quote
icicle-command-abbrev-save))) (add-hook (quote comint-mode-hook) (quote
icicle-comint-hook-fn)) (add-hook (quote compilation-mode-hook) (quote
icicle-compilation-hook-fn)) (add-hook (quote compilation-minor-mode-hook)
(quote icicle-compilation-hook-fn)) (icicle-undo-std-completion-faces)
(icicle-redefine-std-completion-fns) (icicle-redefine-standard-functions)
(icicle-redefine-standard-options) (when (ad-find-some-advice (quote
describe-face) (quote before) (quote icicle-respect-WYSIWYG)) (ad-enable-advice
(quote describe-face) (quote before) (quote icicle-respect-WYSIWYG))) (when
(fboundp (quote minibuffer-depth-indicate-mode)) (minibuffer-depth-indicate-mode
99)) (if icicle-menu-items-to-history-flag (add-hook (quote pre-command-hook)
(quote icicle-add-menu-item-to-cmd-history)) (remove-hook (quote
pre-command-hook) (quote icicle-add-menu-item-to-cmd-history))) (when (>
emacs-major-version 22) (when icicle-populate-interactive-history-flag
(ad-enable-advice (quote call-interactively) (quote after) (quote
icicle-save-to-history))) (ad-activate (quote call-interactively))) (dolist (fn
icicle-inhibit-advice-functions) (when (and (fboundp fn) (ad-is-active fn))
(push (cons fn (ad-copy-advice-info fn)) icicle-advice-info-list) (ad-deactivate
fn)))) (t (makunbound (quote icicle-mode-map))
(icicle-restore-other-keymap-keys) (remove-hook (quote minibuffer-setup-hook)
(quote icicle-minibuffer-setup)) (remove-hook (quote minibuffer-exit-hook)
(quote icicle-cancel-Help-redirection)) (remove-hook (quote
minibuffer-exit-hook) (quote icicle-restore-region-face)) (remove-hook (quote
icicle-post-command-hook) (quote icicle-activate-mark)) (remove-hook (quote
pre-command-hook) (quote icicle-top-level-prep)) (remove-hook (quote
pre-command-hook) (quote icicle-run-icicle-pre-command-hook) t) (remove-hook
(quote post-command-hook) (quote icicle-run-icicle-post-command-hook) t)
(remove-hook (quote completion-setup-hook) (quote icicle-set-calling-cmd))
(remove-hook (quote kill-emacs-hook) (quote icicle-command-abbrev-save))
(remove-hook (quote comint-mode-hook) (quote icicle-comint-hook-fn))
(remove-hook (quote compilation-mode-hook) (quote icicle-compilation-hook-fn))
(remove-hook (quote compilation-minor-mode-hook) (quote
icicle-compilation-hook-fn)) (icicle-restore-std-completion-fns)
(icicle-restore-standard-functions) (icicle-restore-standard-options) (when
(ad-find-some-advice (quote describe-face) (quote before) (quote
icicle-respect-WYSIWYG)) (ad-disable-advice (quote describe-face) (quote before)
(quote icicle-respect-WYSIWYG))) (when (fboundp (quote
minibuffer-depth-indicate-mode)) (minibuffer-depth-indicate-mode -99))
(remove-hook (quote pre-command-hook) (quote
icicle-add-menu-item-to-cmd-history)) (when (> emacs-major-version 22)
(ad-disable-advice (quote call-interactively) (quote after) (quote
icicle-save-to-history)) (ad-activate (quote call-interactively))) (dolist (fn
icicle-inhibit-advice-functions) (let ((info (memq fn icicle-advice-info-list)))
(when (and (fboundp fn) info) (ad-set-advice-info fn info) (when (ad-is-active
fn) (ad-activate fn))))))) (unless (eq icicle-guess-commands-in-path (quote
load)) (setq icicle-shell-command-candidates-cache nil)) (message "Turning %s
Icicle mode..." (if icicle-mode "ON" "OFF")) (icicle-define-minibuffer-maps
icicle-mode) (run-hooks (quote icicle-mode-hook)) (message "Turning %s Icicle
mode...done" (if icicle-mode "ON" "OFF")) (run-hooks (quote icicle-mode-hook)
(if icicle-mode (quote icicle-mode-on-hook) (quote icicle-mode-off-hook))) (if
(called-interactively-p (quote any)) (progn (customize-mark-as-set (quote
icicle-mode)) (unless (and (current-message) (not (equal last-message
(current-message)))) (message "Icicle mode %sabled" (if icicle-mode "en"
"dis"))))))
icy-mode(1)
...
> >> For the other function, showing us how it's defined would be a
> >> good first step.
> > What other function?
> The one you said Emacs couldn't discover where it's defined.
As I said, there are about 30 such "other functions", and all of their
definitions are different. But I guess you are interested in the context of the
definition and not the definition itself.
All are defined pretty much at the top level of an Icicles file, so they get
defined each time the file is loaded. (The defalias for the `old-*' function to
restore to is done only on the first load of the file.) E.g.:
(unless (fboundp 'old-display-completion-list)
(defalias 'old-display-completion-list
(symbol-function 'display-completion-list)))
(defun icicle-display-completion-list (completions &optional ignored)
...)
In this example, `icicle-display-completion-list' would be the file that Emacs
thinks is defined in `tramp-compat.el'.
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#9669: 24.0.50; `tramp-compat.el' in *Help* when it doesn't belong (?)
2011-10-05 1:03 ` Drew Adams
@ 2011-10-05 16:34 ` Stefan Monnier
2011-10-05 17:06 ` Drew Adams
0 siblings, 1 reply; 13+ messages in thread
From: Stefan Monnier @ 2011-10-05 16:34 UTC (permalink / raw)
To: Drew Adams; +Cc: 9669
>> But it's the part in the "..." that I'm interested in (i.e. in which
>> context is icicle-redefine-standard-functions called).
> It is called when you turn on minor mode `icicle-mode'.
[...]
> "dis"))))))
> icy-mode(1)
> ...
I'm not sure what that backtrace was about (the tip was different from
the other one, for example), and it still doesn't seem to include the beginning.
Basically, I'd expect this backtrace to have something to do with Tramp,
otherwise I have no clue how the defalias gets attributed to tramp-compat.el.
> In this example, `icicle-display-completion-list' would be the file
> that Emacs thinks is defined in `tramp-compat.el'.
Huh? You said Emacs told you:
icicle-read-char-by-name is a compiled Lisp function.
I.e. the actual function has no associated file (rather than being
associated to tramp-compat.el), while the defalias is associated with
tramp-compat.el.
Stefan
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#9669: 24.0.50; `tramp-compat.el' in *Help* when it doesn't belong (?)
2011-10-05 16:34 ` Stefan Monnier
@ 2011-10-05 17:06 ` Drew Adams
2011-10-05 17:41 ` Drew Adams
0 siblings, 1 reply; 13+ messages in thread
From: Drew Adams @ 2011-10-05 17:06 UTC (permalink / raw)
To: 'Stefan Monnier'; +Cc: 9669
> > It is called when you turn on minor mode `icicle-mode'.
> > icy-mode(1)
>
> I'm not sure what that backtrace was about (the tip was different from
> the other one, for example),
I had hit `d' once, thinking that the info shown after `d' would be more
helpful. That is the only difference from the previous backtrace I sent.
> and it still doesn't seem to include the beginning.
As I've tried to say a couple times now, it does not matter what calls
`icy-mode' (aka `icicle-mode') to turn on Icicle mode (the result is the same).
That's why I trimmed off the actual call to it.
> Basically, I'd expect this backtrace to have something to do
> with Tramp, otherwise I have no clue how the defalias gets
> attributed to tramp-compat.el.
No, there is nothing about "tramp" in the backtrace. I already looked for that.
I have no clue either.
I've included the entire backtrace again (below), this time as soon as the
debugger is entered, rather than after hitting `d' once, and this time including
the call to `execute-extended-command' that invokes `icy-mode' to enter Icicle
mode.
> > In this example, `icicle-display-completion-list' would be the file
> > that Emacs thinks is defined in `tramp-compat.el'.
>
> Huh? You said Emacs told you:
> icicle-read-char-by-name is a compiled Lisp function.
> I.e. the actual function has no associated file (rather than being
> associated to tramp-compat.el), while the defalias is associated with
> tramp-compat.el.
Correct. That's what I meant, but I misspoke. In that example,
`icicle-display-completion-list' is the function that Emacs thinks has no
associated file, and `display-completion-list' is the function Emacs thinks is
defined in `tramp-compat.el'.
In case it helps, after toggling Icicle mode OFF, this is what the help buffer
says:
read-char-by-name is an alias for `old-read-char-by-name' in
`tramp-compat.el'.
Again, that's correct except for the file name. But this time, if you click the
function name it _correctly_ shows this:
old-read-char-by-name is a compiled Lisp function in `icicles-fn.el'.
So the second problem (no file name) does not occur in this case. But the first
problem (file = tramp-compat.el) is still there. And yes, this is repeatable
(turning on/off Icicle mode).
HTH.
--------------
Debugger entered: nil
(progn (debug) (defalias fn (intern (concat "icicle-" (symbol-name fn)))))
(if (fboundp (intern (concat "old-" (symbol-name fn)))) (progn (debug)
(defalias fn (intern (concat "icicle-" (symbol-name fn))))))
(when (fboundp (intern (concat "old-" (symbol-name fn)))) (debug) (defalias fn
(intern (concat "icicle-" (symbol-name fn)))))
(while --cl-dolist-temp-- (setq fn (car --cl-dolist-temp--)) (when (fboundp
(intern (concat "old-" (symbol-name fn)))) (debug) (defalias fn (intern (concat
"icicle-" (symbol-name fn))))) (setq --cl-dolist-temp-- (cdr
--cl-dolist-temp--)))
(let ((--cl-dolist-temp-- icicle-functions-to-redefine) fn) (while
--cl-dolist-temp-- (setq fn (car --cl-dolist-temp--)) (when (fboundp (intern
(concat "old-" (symbol-name fn)))) (debug) (defalias fn (intern (concat
"icicle-" (symbol-name fn))))) (setq --cl-dolist-temp-- (cdr
--cl-dolist-temp--))))
(catch (quote --cl-block-nil--) (let ((--cl-dolist-temp--
icicle-functions-to-redefine) fn) (while --cl-dolist-temp-- (setq fn (car
--cl-dolist-temp--)) (when (fboundp (intern (concat "old-" (symbol-name fn))))
(debug) (defalias fn (intern (concat "icicle-" (symbol-name fn))))) (setq
--cl-dolist-temp-- (cdr --cl-dolist-temp--)))))
(cl-block-wrapper (catch (quote --cl-block-nil--) (let ((--cl-dolist-temp--
icicle-functions-to-redefine) fn) (while --cl-dolist-temp-- (setq fn (car
--cl-dolist-temp--)) (when (fboundp (intern (concat "old-" ...))) (debug)
(defalias fn (intern (concat "icicle-" ...)))) (setq --cl-dolist-temp-- (cdr
--cl-dolist-temp--))))))
(block nil (let ((--cl-dolist-temp-- icicle-functions-to-redefine) fn) (while
--cl-dolist-temp-- (setq fn (car --cl-dolist-temp--)) (when (fboundp (intern
(concat "old-" (symbol-name fn)))) (debug) (defalias fn (intern (concat
"icicle-" (symbol-name fn))))) (setq --cl-dolist-temp-- (cdr
--cl-dolist-temp--)))))
(dolist (fn icicle-functions-to-redefine) (when (fboundp (intern (concat
"old-" (symbol-name fn)))) (debug) (defalias fn (intern (concat "icicle-"
(symbol-name fn))))))
(progn (dolist (fn icicle-functions-to-redefine) (when (fboundp (intern
(concat "old-" (symbol-name fn)))) (debug) (defalias fn (intern (concat
"icicle-" (symbol-name fn)))))))
(if (fboundp (quote icicle-completing-read)) (progn (dolist (fn
icicle-functions-to-redefine) (when (fboundp (intern (concat "old-" (symbol-name
fn)))) (debug) (defalias fn (intern (concat "icicle-" (symbol-name fn))))))))
(when (fboundp (quote icicle-completing-read)) (dolist (fn
icicle-functions-to-redefine) (when (fboundp (intern (concat "old-" (symbol-name
fn)))) (debug) (defalias fn (intern (concat "icicle-" (symbol-name fn)))))))
icicle-redefine-standard-functions()
(cond (icicle-mode (icicle-define-icicle-maps) (icicle-bind-other-keymap-keys)
(add-hook (quote minibuffer-setup-hook) (quote icicle-minibuffer-setup))
(add-hook (quote minibuffer-exit-hook) (quote icicle-cancel-Help-redirection))
(add-hook (quote minibuffer-exit-hook) (quote icicle-restore-region-face))
(add-hook (quote minibuffer-exit-hook) (quote icicle-unhighlight-lighter))
(add-hook (quote icicle-post-command-hook) (quote icicle-activate-mark) (quote
append)) (add-hook (quote completion-setup-hook) (quote icicle-set-calling-cmd)
(quote append)) (when icicle-customize-save-flag (add-hook (quote
kill-emacs-hook) (quote icicle-command-abbrev-save))) (add-hook (quote
comint-mode-hook) (quote icicle-comint-hook-fn)) (add-hook (quote
compilation-mode-hook) (quote icicle-compilation-hook-fn)) (add-hook (quote
compilation-minor-mode-hook) (quote icicle-compilation-hook-fn))
(icicle-undo-std-completion-faces) (icicle-redefine-std-completion-fns)
(icicle-redefine-standard-functions) (icicle-redefine-standard-options) (when
(ad-find-some-advice (quote describe-face) (quote before) (quote
icicle-respect-WYSIWYG)) (ad-enable-advice (quote describe-face) (quote before)
(quote icicle-respect-WYSIWYG))) (when (fboundp (quote
minibuffer-depth-indicate-mode)) (minibuffer-depth-indicate-mode 99)) (if
icicle-menu-items-to-history-flag (add-hook (quote pre-command-hook) (quote
icicle-add-menu-item-to-cmd-history)) (remove-hook (quote pre-command-hook)
(quote icicle-add-menu-item-to-cmd-history))) (when (> emacs-major-version 22)
(when icicle-populate-interactive-history-flag (ad-enable-advice (quote
call-interactively) (quote after) (quote icicle-save-to-history))) (ad-activate
(quote call-interactively))) (dolist (fn icicle-inhibit-advice-functions) (when
(and (fboundp fn) (ad-is-active fn)) (push (cons fn (ad-copy-advice-info fn))
icicle-advice-info-list) (ad-deactivate fn)))) (t (makunbound (quote
icicle-mode-map)) (icicle-restore-other-keymap-keys) (remove-hook (quote
minibuffer-setup-hook) (quote icicle-minibuffer-setup)) (remove-hook (quote
minibuffer-exit-hook) (quote icicle-cancel-Help-redirection)) (remove-hook
(quote minibuffer-exit-hook) (quote icicle-restore-region-face)) (remove-hook
(quote icicle-post-command-hook) (quote icicle-activate-mark)) (remove-hook
(quote pre-command-hook) (quote icicle-top-level-prep)) (remove-hook (quote
pre-command-hook) (quote icicle-run-icicle-pre-command-hook) t) (remove-hook
(quote post-command-hook) (quote icicle-run-icicle-post-command-hook) t)
(remove-hook (quote completion-setup-hook) (quote icicle-set-calling-cmd))
(remove-hook (quote kill-emacs-hook) (quote icicle-command-abbrev-save))
(remove-hook (quote comint-mode-hook) (quote icicle-comint-hook-fn))
(remove-hook (quote compilation-mode-hook) (quote icicle-compilation-hook-fn))
(remove-hook (quote compilation-minor-mode-hook) (quote
icicle-compilation-hook-fn)) (icicle-restore-std-completion-fns)
(icicle-restore-standard-functions) (icicle-restore-standard-options) (when
(ad-find-some-advice (quote describe-face) (quote before) (quote
icicle-respect-WYSIWYG)) (ad-disable-advice (quote describe-face) (quote before)
(quote icicle-respect-WYSIWYG))) (when (fboundp (quote
minibuffer-depth-indicate-mode)) (minibuffer-depth-indicate-mode -99))
(remove-hook (quote pre-command-hook) (quote
icicle-add-menu-item-to-cmd-history)) (when (> emacs-major-version 22)
(ad-disable-advice (quote call-interactively) (quote after) (quote
icicle-save-to-history)) (ad-activate (quote call-interactively))) (dolist (fn
icicle-inhibit-advice-functions) (let ((info (memq fn icicle-advice-info-list)))
(when (and (fboundp fn) info) (ad-set-advice-info fn info) (when (ad-is-active
fn) (ad-activate fn)))))))
(let ((last-message (current-message))) (setq icicle-mode (if (eq arg (quote
toggle)) (not icicle-mode) (> (prefix-numeric-value arg) 0))) (cond (icicle-mode
(icicle-define-icicle-maps) (icicle-bind-other-keymap-keys) (add-hook (quote
minibuffer-setup-hook) (quote icicle-minibuffer-setup)) (add-hook (quote
minibuffer-exit-hook) (quote icicle-cancel-Help-redirection)) (add-hook (quote
minibuffer-exit-hook) (quote icicle-restore-region-face)) (add-hook (quote
minibuffer-exit-hook) (quote icicle-unhighlight-lighter)) (add-hook (quote
icicle-post-command-hook) (quote icicle-activate-mark) (quote append)) (add-hook
(quote completion-setup-hook) (quote icicle-set-calling-cmd) (quote append))
(when icicle-customize-save-flag (add-hook (quote kill-emacs-hook) (quote
icicle-command-abbrev-save))) (add-hook (quote comint-mode-hook) (quote
icicle-comint-hook-fn)) (add-hook (quote compilation-mode-hook) (quote
icicle-compilation-hook-fn)) (add-hook (quote compilation-minor-mode-hook)
(quote icicle-compilation-hook-fn)) (icicle-undo-std-completion-faces)
(icicle-redefine-std-completion-fns) (icicle-redefine-standard-functions)
(icicle-redefine-standard-options) (when (ad-find-some-advice (quote
describe-face) (quote before) (quote icicle-respect-WYSIWYG)) (ad-enable-advice
(quote describe-face) (quote before) (quote icicle-respect-WYSIWYG))) (when
(fboundp (quote minibuffer-depth-indicate-mode)) (minibuffer-depth-indicate-mode
99)) (if icicle-menu-items-to-history-flag (add-hook (quote pre-command-hook)
(quote icicle-add-menu-item-to-cmd-history)) (remove-hook (quote
pre-command-hook) (quote icicle-add-menu-item-to-cmd-history))) (when (>
emacs-major-version 22) (when icicle-populate-interactive-history-flag
(ad-enable-advice (quote call-interactively) (quote after) (quote
icicle-save-to-history))) (ad-activate (quote call-interactively))) (dolist (fn
icicle-inhibit-advice-functions) (when (and (fboundp fn) (ad-is-active fn))
(push (cons fn (ad-copy-advice-info fn)) icicle-advice-info-list) (ad-deactivate
fn)))) (t (makunbound (quote icicle-mode-map))
(icicle-restore-other-keymap-keys) (remove-hook (quote minibuffer-setup-hook)
(quote icicle-minibuffer-setup)) (remove-hook (quote minibuffer-exit-hook)
(quote icicle-cancel-Help-redirection)) (remove-hook (quote
minibuffer-exit-hook) (quote icicle-restore-region-face)) (remove-hook (quote
icicle-post-command-hook) (quote icicle-activate-mark)) (remove-hook (quote
pre-command-hook) (quote icicle-top-level-prep)) (remove-hook (quote
pre-command-hook) (quote icicle-run-icicle-pre-command-hook) t) (remove-hook
(quote post-command-hook) (quote icicle-run-icicle-post-command-hook) t)
(remove-hook (quote completion-setup-hook) (quote icicle-set-calling-cmd))
(remove-hook (quote kill-emacs-hook) (quote icicle-command-abbrev-save))
(remove-hook (quote comint-mode-hook) (quote icicle-comint-hook-fn))
(remove-hook (quote compilation-mode-hook) (quote icicle-compilation-hook-fn))
(remove-hook (quote compilation-minor-mode-hook) (quote
icicle-compilation-hook-fn)) (icicle-restore-std-completion-fns)
(icicle-restore-standard-functions) (icicle-restore-standard-options) (when
(ad-find-some-advice (quote describe-face) (quote before) (quote
icicle-respect-WYSIWYG)) (ad-disable-advice (quote describe-face) (quote before)
(quote icicle-respect-WYSIWYG))) (when (fboundp (quote
minibuffer-depth-indicate-mode)) (minibuffer-depth-indicate-mode -99))
(remove-hook (quote pre-command-hook) (quote
icicle-add-menu-item-to-cmd-history)) (when (> emacs-major-version 22)
(ad-disable-advice (quote call-interactively) (quote after) (quote
icicle-save-to-history)) (ad-activate (quote call-interactively))) (dolist (fn
icicle-inhibit-advice-functions) (let ((info (memq fn icicle-advice-info-list)))
(when (and (fboundp fn) info) (ad-set-advice-info fn info) (when (ad-is-active
fn) (ad-activate fn))))))) (unless (eq icicle-guess-commands-in-path (quote
load)) (setq icicle-shell-command-candidates-cache nil)) (message "Turning %s
Icicle mode..." (if icicle-mode "ON" "OFF")) (icicle-define-minibuffer-maps
icicle-mode) (run-hooks (quote icicle-mode-hook)) (message "Turning %s Icicle
mode...done" (if icicle-mode "ON" "OFF")) (run-hooks (quote icicle-mode-hook)
(if icicle-mode (quote icicle-mode-on-hook) (quote icicle-mode-off-hook))) (if
(called-interactively-p (quote any)) (progn (customize-mark-as-set (quote
icicle-mode)) (unless (and (current-message) (not (equal last-message
(current-message)))) (message "Icicle mode %sabled" (if icicle-mode "en"
"dis"))))))
icy-mode(toggle)
call-interactively(icy-mode t nil)
execute-extended-command(nil)
call-interactively(execute-extended-command nil nil)
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#9669: 24.0.50; `tramp-compat.el' in *Help* when it doesn't belong (?)
2011-10-05 17:06 ` Drew Adams
@ 2011-10-05 17:41 ` Drew Adams
2011-10-18 19:45 ` Stefan Monnier
0 siblings, 1 reply; 13+ messages in thread
From: Drew Adams @ 2011-10-05 17:41 UTC (permalink / raw)
To: 'Stefan Monnier'; +Cc: 9669
Some more info about this, which I'm guessing now might be pertinent (#2).
Didn't think of it before.
1. I see the same problem for any function that is not defined at top level,
e.g., when the `defun' is inside a top-level (when (...):
(when (fboundp 'map-keymap)
(defun icicle-complete-keys...)...)
C-h f icicle-complete-keys
icicle-complete-keys is an interactive compiled Lisp function.
2. I compile the files using Emacs 20, not Emacs 24.
Maybe #2 is the root of the problem?
I see the same problem in Emacs 23.3. But in Emacs 22.3 I do not see it (still
using *.elc compiled with Emacs 20). This is what Emacs 22.3 says:
icicle-display-completion-list is a compiled Lisp function in
`icicles-fn.el'.
Dunno whether this can be fixed for Emacs 23+, if in fact the version the files
are compiled in is the problem.
I know that Emacs 23+-specific functionality is generally not available using
files compiled with an earlier version. But functionality that is not Emacs
23+-specific still works fine.
HTH.
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#9669: 24.0.50; `tramp-compat.el' in *Help* when it doesn't belong (?)
2011-10-05 17:41 ` Drew Adams
@ 2011-10-18 19:45 ` Stefan Monnier
2013-02-14 8:32 ` Glenn Morris
0 siblings, 1 reply; 13+ messages in thread
From: Stefan Monnier @ 2011-10-18 19:45 UTC (permalink / raw)
To: Drew Adams; +Cc: 9669
> 1. I see the same problem for any function that is not defined at top level,
> e.g., when the `defun' is inside a top-level (when (...):
That's partly expected: the byte-compiler handles those slightly differently.
> 2. I compile the files using Emacs 20, not Emacs 24.
> Maybe #2 is the root of the problem?
I'd say you found your problem, indeed.
> I see the same problem in Emacs 23.3. But in Emacs 22.3 I do not see it (still
> using *.elc compiled with Emacs 20). This is what Emacs 22.3 says:
At least here, when loading Emacs-20's speedbar.elc with Emacs-22,
C-h f speedbar-mouse-event-p tells me it's a compiled function and
doesn't tell me where it comes from.
Stefan
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#9669: 24.0.50; `tramp-compat.el' in *Help* when it doesn't belong (?)
2011-10-18 19:45 ` Stefan Monnier
@ 2013-02-14 8:32 ` Glenn Morris
0 siblings, 0 replies; 13+ messages in thread
From: Glenn Morris @ 2013-02-14 8:32 UTC (permalink / raw)
To: 9669-done
Stefan Monnier wrote:
>> 2. I compile the files using Emacs 20, not Emacs 24.
>> Maybe #2 is the root of the problem?
>
> I'd say you found your problem, indeed.
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2013-02-14 8:32 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-04 16:55 bug#9669: 24.0.50; `tramp-compat.el' in *Help* when it doesn't belong (?) Drew Adams
2011-10-04 17:00 ` Drew Adams
2011-10-04 17:52 ` Stefan Monnier
2011-10-04 17:56 ` Drew Adams
2011-10-04 21:41 ` Stefan Monnier
2011-10-04 22:15 ` Drew Adams
2011-10-05 0:30 ` Stefan Monnier
2011-10-05 1:03 ` Drew Adams
2011-10-05 16:34 ` Stefan Monnier
2011-10-05 17:06 ` Drew Adams
2011-10-05 17:41 ` Drew Adams
2011-10-18 19:45 ` Stefan Monnier
2013-02-14 8:32 ` Glenn Morris
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).