GNU bug report logs - #9669
24.0.50; `tramp-compat.el' in *Help* when it doesn't belong (?)

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Tue, 4 Oct 2011 16:58:01 UTC

Severity: minor

Tags: wontfix

Found in version 24.0.50

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 9669 in the body.
You can then email your comments to 9669 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#9669; Package emacs. (Tue, 04 Oct 2011 16:58:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Drew Adams" <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 04 Oct 2011 16:58:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: <bug-gnu-emacs <at> gnu.org>
Subject: 24.0.50; `tramp-compat.el' in *Help* when it doesn't belong (?)
Date: Tue, 4 Oct 2011 09:55:54 -0700
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'
 





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9669; Package emacs. (Tue, 04 Oct 2011 17:03:02 GMT) Full text and rfc822 format available.

Message #8 received at 9669 <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: <9669 <at> debbugs.gnu.org>
Subject: RE: bug#9669: 24.0.50;
	`tramp-compat.el' in *Help* when it doesn't belong (?)
Date: Tue, 4 Oct 2011 10:00:27 -0700
FWIW, in Emacs 23.3, the same problem occurs, but the file cited is `tramp.el',
not `tramp-compat.el'.  HTH.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9669; Package emacs. (Tue, 04 Oct 2011 17:54:01 GMT) Full text and rfc822 format available.

Message #11 received at 9669 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 9669 <at> debbugs.gnu.org
Subject: Re: bug#9669: 24.0.50;
	`tramp-compat.el' in *Help* when it doesn't belong (?)
Date: Tue, 04 Oct 2011 13:52:17 -0400
> 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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9669; Package emacs. (Tue, 04 Oct 2011 17:59:02 GMT) Full text and rfc822 format available.

Message #14 received at 9669 <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Stefan Monnier'" <monnier <at> iro.umontreal.ca>
Cc: 9669 <at> debbugs.gnu.org
Subject: RE: bug#9669: 24.0.50;
	`tramp-compat.el' in *Help* when it doesn't belong (?)
Date: Tue, 4 Oct 2011 10:56:22 -0700
> 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.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9669; Package emacs. (Tue, 04 Oct 2011 21:43:02 GMT) Full text and rfc822 format available.

Message #17 received at 9669 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 9669 <at> debbugs.gnu.org
Subject: Re: bug#9669: 24.0.50;
	`tramp-compat.el' in *Help* when it doesn't belong (?)
Date: Tue, 04 Oct 2011 17:41:15 -0400
>> 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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9669; Package emacs. (Tue, 04 Oct 2011 22:17:02 GMT) Full text and rfc822 format available.

Message #20 received at 9669 <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Stefan Monnier'" <monnier <at> iro.umontreal.ca>
Cc: 9669 <at> debbugs.gnu.org
Subject: RE: bug#9669: 24.0.50;
	`tramp-compat.el' in *Help* when it doesn't belong (?)
Date: Tue, 4 Oct 2011 15:15:00 -0700
> 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.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9669; Package emacs. (Wed, 05 Oct 2011 01:09:02 GMT) Full text and rfc822 format available.

Message #23 received at 9669 <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Stefan Monnier'" <monnier <at> iro.umontreal.ca>
Cc: 9669 <at> debbugs.gnu.org
Subject: RE: bug#9669: 24.0.50;
	`tramp-compat.el' in *Help* when it doesn't belong (?)
Date: Tue, 4 Oct 2011 18:03:24 -0700
> 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'.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9669; Package emacs. (Wed, 05 Oct 2011 01:45:02 GMT) Full text and rfc822 format available.

Message #26 received at 9669 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 9669 <at> debbugs.gnu.org
Subject: Re: bug#9669: 24.0.50;
	`tramp-compat.el' in *Help* when it doesn't belong (?)
Date: Tue, 04 Oct 2011 20:30:34 -0400
>> 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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9669; Package emacs. (Wed, 05 Oct 2011 16:36:02 GMT) Full text and rfc822 format available.

Message #29 received at 9669 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 9669 <at> debbugs.gnu.org
Subject: Re: bug#9669: 24.0.50;
	`tramp-compat.el' in *Help* when it doesn't belong (?)
Date: Wed, 05 Oct 2011 12:34:54 -0400
>> 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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9669; Package emacs. (Wed, 05 Oct 2011 17:08:02 GMT) Full text and rfc822 format available.

Message #32 received at 9669 <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Stefan Monnier'" <monnier <at> iro.umontreal.ca>
Cc: 9669 <at> debbugs.gnu.org
Subject: RE: bug#9669: 24.0.50;
	`tramp-compat.el' in *Help* when it doesn't belong (?)
Date: Wed, 5 Oct 2011 10:06:55 -0700
> > 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)





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9669; Package emacs. (Wed, 05 Oct 2011 17:42:02 GMT) Full text and rfc822 format available.

Message #35 received at 9669 <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Stefan Monnier'" <monnier <at> iro.umontreal.ca>
Cc: 9669 <at> debbugs.gnu.org
Subject: RE: bug#9669: 24.0.50;
	`tramp-compat.el' in *Help* when it doesn't belong (?)
Date: Wed, 5 Oct 2011 10:41:14 -0700
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.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9669; Package emacs. (Tue, 18 Oct 2011 19:47:01 GMT) Full text and rfc822 format available.

Message #38 received at 9669 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 9669 <at> debbugs.gnu.org
Subject: Re: bug#9669: 24.0.50;
	`tramp-compat.el' in *Help* when it doesn't belong (?)
Date: Tue, 18 Oct 2011 15:45:42 -0400
> 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




Reply sent to Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility. (Thu, 14 Feb 2013 08:34:02 GMT) Full text and rfc822 format available.

Notification sent to "Drew Adams" <drew.adams <at> oracle.com>:
bug acknowledged by developer. (Thu, 14 Feb 2013 08:34:03 GMT) Full text and rfc822 format available.

Message #43 received at 9669-done <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 9669-done <at> debbugs.gnu.org
Subject: Re: bug#9669: 24.0.50;
	`tramp-compat.el' in *Help* when it doesn't belong (?)
Date: Thu, 14 Feb 2013 03:32:45 -0500
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.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 14 Mar 2013 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 151 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.