unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#10454: 23.3; Different result from `C-h k' and `C-h ? k'
@ 2012-01-08 11:36 David Röthlisberger
  2012-01-09 18:19 ` martin rudalics
  0 siblings, 1 reply; 10+ messages in thread
From: David Röthlisberger @ 2012-01-08 11:36 UTC (permalink / raw)
  To: 10454

If I have ido-mode enabled, the output of `C-h k C-x C-f' is:

> C-x C-f runs the command ido-find-file, which is an interactive
> compiled Lisp function in `ido.el'.


But if I'm just learning Emacs and I do `C-h ? k C-x C-f', the output is for (non-ido) find-file:

> C-x C-f runs the command find-file, which is an interactive compiled
> Lisp function in `files.el'.


I'm not sure what causes this. `help-for-help' in `help.el' seems to use the same `help-map' that binds `C-h k' to `describe-key'; I couldn't understand the `make-help-screen' macro so that's as far as I got with my investigation.

I reproduced this on Emacs 23.3 and a 2012-01-08 nightly build of 24.0.92.1 (revno: 106821).

Recipe starting from `emacs -Q':

M-: (ido-mode t)
C-h k C-x C-f
C-h ? k C-x C-f

Thanks,
Dave.






^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#10454: 23.3; Different result from `C-h k' and `C-h ? k'
  2012-01-08 11:36 bug#10454: 23.3; Different result from `C-h k' and `C-h ? k' David Röthlisberger
@ 2012-01-09 18:19 ` martin rudalics
  2012-01-17 19:12   ` Glenn Morris
  2012-01-19  8:20   ` David Röthlisberger
  0 siblings, 2 replies; 10+ messages in thread
From: martin rudalics @ 2012-01-09 18:19 UTC (permalink / raw)
  To: David Röthlisberger; +Cc: 10454

 > If I have ido-mode enabled, the output of `C-h k C-x C-f' is:
 >
 >> C-x C-f runs the command ido-find-file, which is an interactive
 >> compiled Lisp function in `ido.el'.
 >
 >
 > But if I'm just learning Emacs and I do `C-h ? k C-x C-f', the output is for (non-ido) find-file:
 >
 >> C-x C-f runs the command find-file, which is an interactive compiled
 >> Lisp function in `files.el'.

FWIW this is due to `make-help-screen' binding `minor-mode-map-alist' to
nil.  Applying the patch below seems to fix it, but maybe someone more
knowledgeable has a better solution.  (If you want to try the patch,
make sure to recompile help.el after compiling help-macro.el).

martin


*** lisp/help-macro.el	2011-01-25 04:08:28 +0000
--- lisp/help-macro.el	2012-01-09 18:05:39 +0000
***************
*** 186,192 ****
   			       (setq config nil))
   			     ;; `defn' must make sure that its frame is
   			     ;; selected, so we won't iconify it below.
! 			     (call-interactively defn)
   			     (when new-frame
   			       ;; Do not iconify the selected frame.
   			       (unless (eq new-frame (selected-frame))
--- 186,193 ----
   			       (setq config nil))
   			     ;; `defn' must make sure that its frame is
   			     ;; selected, so we won't iconify it below.
! 			     (let ((minor-mode-map-alist new-minor-mode-map-alist))
! 			       (call-interactively defn))
   			     (when new-frame
   			       ;; Do not iconify the selected frame.
   			       (unless (eq new-frame (selected-frame))






^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#10454: 23.3; Different result from `C-h k' and `C-h ? k'
  2012-01-09 18:19 ` martin rudalics
@ 2012-01-17 19:12   ` Glenn Morris
  2012-01-20  9:20     ` martin rudalics
  2012-01-19  8:20   ` David Röthlisberger
  1 sibling, 1 reply; 10+ messages in thread
From: Glenn Morris @ 2012-01-17 19:12 UTC (permalink / raw)
  To: martin rudalics; +Cc: 10454, David Röthlisberger

martin rudalics wrote:

> FWIW this is due to `make-help-screen' binding `minor-mode-map-alist' to
> nil.  Applying the patch below seems to fix it, but maybe someone more
> knowledgeable has a better solution.

I'm no more knowledgeable, but it must be something to do with
minor-mode-map-alist, so FWIW if your solution makes it work I suggest
installing it and closing this.





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#10454: 23.3; Different result from `C-h k' and `C-h ? k'
  2012-01-09 18:19 ` martin rudalics
  2012-01-17 19:12   ` Glenn Morris
@ 2012-01-19  8:20   ` David Röthlisberger
  2012-01-19  8:29     ` Andreas Schwab
  1 sibling, 1 reply; 10+ messages in thread
From: David Röthlisberger @ 2012-01-19  8:20 UTC (permalink / raw)
  To: martin rudalics; +Cc: 10454

martin rudalics wrote:

> (If you want to try the patch, make sure to recompile help.el
> after compiling help-macro.el).

The patch doesn't work for me -- am I doing something wrong?

I'm finding "help.el.gz" by going `C-h k C-h k' and clicking on
the `help.el' link in the help buffer.

Then I open help-macro.el.gz in the same directory; apply the
patch; then
M-x byte-compile-file help-macro.el.gz
M-x byte-compile-file help.el.gz
and restart Emacs.

Thanks!
Dave.






^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#10454: 23.3; Different result from `C-h k' and `C-h ? k'
  2012-01-19  8:20   ` David Röthlisberger
@ 2012-01-19  8:29     ` Andreas Schwab
  2012-01-19  9:07       ` David Röthlisberger
  0 siblings, 1 reply; 10+ messages in thread
From: Andreas Schwab @ 2012-01-19  8:29 UTC (permalink / raw)
  To: David Röthlisberger; +Cc: 10454

David Röthlisberger <david@rothlis.net> writes:

> Then I open help-macro.el.gz in the same directory; apply the
> patch; then
> M-x byte-compile-file help-macro.el.gz
> M-x byte-compile-file help.el.gz

You need to reload help-macro inbetween.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#10454: 23.3; Different result from `C-h k' and `C-h ? k'
  2012-01-19  8:29     ` Andreas Schwab
@ 2012-01-19  9:07       ` David Röthlisberger
  2012-01-19 16:48         ` Glenn Morris
  0 siblings, 1 reply; 10+ messages in thread
From: David Röthlisberger @ 2012-01-19  9:07 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: 10454

Andreas Schwab wrote:

>> Then I open help-macro.el.gz in the same directory; apply the
>> patch; then
>> M-x byte-compile-file help-macro.el.gz
>> M-x byte-compile-file help.el.gz
> 
> You need to reload help-macro inbetween.


Good point. I have now tried that, as well as trying the following:
* Deleting help.elc & help-macro.elc altogether, then restarting Emacs
* M-x eval-buffer on help-macro.el.gz before & after byte-compiling it, then M-x eval-buffer on help.el.gz before byte-compiling it, then restarting Emacs.
* M-x load-file help-macro.el.gz before & after byte-compiling it, then M-x load-file help.el.gz before byte-compiling it, then restarting Emacs.
* Restarting Emacs after byte-compiling help-macro.el.gz, then byte-compiling help.el.gz, then restarting Emacs.

In all cases the patch still doesn't work for me.






^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#10454: 23.3; Different result from `C-h k' and `C-h ? k'
  2012-01-19  9:07       ` David Röthlisberger
@ 2012-01-19 16:48         ` Glenn Morris
  2012-01-19 17:08           ` David Röthlisberger
  0 siblings, 1 reply; 10+ messages in thread
From: Glenn Morris @ 2012-01-19 16:48 UTC (permalink / raw)
  To: David Röthlisberger; +Cc: Andreas Schwab, 10454

David Röthlisberger wrote:

> * Deleting help.elc & help-macro.elc altogether, then restarting Emacs
> * M-x eval-buffer on help-macro.el.gz before & after byte-compiling it, then M-x eval-buffer on help.el.gz before byte-compiling it, then restarting Emacs.
> * M-x load-file help-macro.el.gz before & after byte-compiling it, then M-x load-file help.el.gz before byte-compiling it, then restarting Emacs.
> * Restarting Emacs after byte-compiling help-macro.el.gz, then byte-compiling help.el.gz, then restarting Emacs.

help.el is dumped into the Emacs image, so restarting Emacs defeats all
your good work. You either need to rebuild Emacs, or (should work),
explicitly load help-macro.el and then load help.el, then try it in the
same Emacs session.





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#10454: 23.3; Different result from `C-h k' and `C-h ? k'
  2012-01-19 16:48         ` Glenn Morris
@ 2012-01-19 17:08           ` David Röthlisberger
  2012-01-20  9:19             ` martin rudalics
  0 siblings, 1 reply; 10+ messages in thread
From: David Röthlisberger @ 2012-01-19 17:08 UTC (permalink / raw)
  To: Glenn Morris; +Cc: Andreas Schwab, 10454

Glenn Morris wrote:

> help.el is dumped into the Emacs image, so restarting Emacs defeats all
> your good work. You either need to rebuild Emacs, or (should work),
> explicitly load help-macro.el and then load help.el, then try it in the
> same Emacs session.

Heheh, no wonder. I can now confirm that Martin's patch does work
for me. :-)

Thank you all for all your help.
Dave.






^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#10454: 23.3; Different result from `C-h k' and `C-h ? k'
  2012-01-19 17:08           ` David Röthlisberger
@ 2012-01-20  9:19             ` martin rudalics
  0 siblings, 0 replies; 10+ messages in thread
From: martin rudalics @ 2012-01-20  9:19 UTC (permalink / raw)
  To: 10454-done; +Cc: David Röthlisberger

 > I can now confirm that Martin's patch does work
 > for me. :-)

Installed in revision 106895 on trunk.

 > Thank you all for all your help.

Thank you for the precise report.

martin





^ permalink raw reply	[flat|nested] 10+ messages in thread

* bug#10454: 23.3; Different result from `C-h k' and `C-h ? k'
  2012-01-17 19:12   ` Glenn Morris
@ 2012-01-20  9:20     ` martin rudalics
  0 siblings, 0 replies; 10+ messages in thread
From: martin rudalics @ 2012-01-20  9:20 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 10454, David Röthlisberger

 > I'm no more knowledgeable, but it must be something to do with
 > minor-mode-map-alist, so FWIW if your solution makes it work I suggest
 > installing it and closing this.

Done.

martin





^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-01-20  9:20 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-08 11:36 bug#10454: 23.3; Different result from `C-h k' and `C-h ? k' David Röthlisberger
2012-01-09 18:19 ` martin rudalics
2012-01-17 19:12   ` Glenn Morris
2012-01-20  9:20     ` martin rudalics
2012-01-19  8:20   ` David Röthlisberger
2012-01-19  8:29     ` Andreas Schwab
2012-01-19  9:07       ` David Röthlisberger
2012-01-19 16:48         ` Glenn Morris
2012-01-19 17:08           ` David Röthlisberger
2012-01-20  9:19             ` martin rudalics

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).