unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: bug#11672: 23.3; info menu-bar acts on wrong window
       [not found]   ` <4FDF1EA4.9000408@abara.de>
@ 2012-06-20  9:05     ` martin rudalics
  2012-06-22 10:21       ` martin rudalics
  0 siblings, 1 reply; 4+ messages in thread
From: martin rudalics @ 2012-06-20  9:05 UTC (permalink / raw)
  To: Gerhard; +Cc: emacs-devel

 > Proposition for a bugfix:

Please keep emacs-devel cc'd.

 > Change the call to the interactive-function in Info-up, Info-next, and
 > Info-prev in the source file "info.el"
 >
 > from
 >     (interactive)
 > to
 >     (interactive "@")
 >
 > I think that's all. Or is that too simple? What do you think?
 >
 > I tested the bugfix by loading a file with the redefined functions
 > (load-file "bugfix.el") and it seems to work. For emacs in a text
 > console with gpm mouse support navigating by mouse in an inactive window
 > seems to be not possible.
 >
 > Maybe the save-window-excursion in the function source, that seems to be
 > provided for the case that another window is selected, is not really
 > necessary, because selecting the window with the menu-bar

To avoid confusion, this is "the window with the header line".

 > is most
 > probably intended by the user.

When he used the mouse.  In any case the

     (or (eq major-mode 'Info-mode) (switch-to-buffer "*info*"))

in `Info-up' and friends means that we do have to make current the
buffer of the window where the mouse click happened.  So I think using
(interactive "@") is TRT.  Any objections?

martin



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

* Re: bug#11672: 23.3; info menu-bar acts on wrong window
  2012-06-20  9:05     ` bug#11672: 23.3; info menu-bar acts on wrong window martin rudalics
@ 2012-06-22 10:21       ` martin rudalics
  2012-06-23 12:53         ` Dr. Gerhard Kahl
  2012-06-23 13:33         ` Chong Yidong
  0 siblings, 2 replies; 4+ messages in thread
From: martin rudalics @ 2012-06-22 10:21 UTC (permalink / raw)
  To: Gerhard; +Cc: emacs-devel

 > So I think using
 > (interactive "@") is TRT.  Any objections?

Apparently there are no objections.  Gerhard could you please provide a
patch and a ChangeLog entry?

Thanks, martin



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

* Re: bug#11672: 23.3; info menu-bar acts on wrong window
  2012-06-22 10:21       ` martin rudalics
@ 2012-06-23 12:53         ` Dr. Gerhard Kahl
  2012-06-23 13:33         ` Chong Yidong
  1 sibling, 0 replies; 4+ messages in thread
From: Dr. Gerhard Kahl @ 2012-06-23 12:53 UTC (permalink / raw)
  To: martin rudalics; +Cc: emacs-devel

Am 22.06.2012 12:21, schrieb martin rudalics:
> Gerhard could you please provide a
> patch and a ChangeLog entry?
>
> Thanks, martin


as a ChangeLog entry I would suggest:


	* info.el (Info-next, Info-prev, Info-up): Select the window
	with the header that was clicked, so that the node gets changed
	in the right window in case there is another info buffer
	in another window that is still active (Bug #11672).


and here is the patch:


--- emacs-24.1/lisp/info.el	2012-05-14 14:00:02.000000000 +0200
+++ modified/lisp/info.el	2012-06-22 17:09:04.672818093 +0200
@@ -2036,7 +2036,7 @@

  (defun Info-next ()
    "Go to the next node of this node."
-  (interactive)
+  (interactive "@")
    ;; In case another window is currently selected
    (save-window-excursion
      (or (eq major-mode 'Info-mode) (switch-to-buffer "*info*"))
@@ -2044,7 +2044,7 @@

  (defun Info-prev ()
    "Go to the previous node of this node."
-  (interactive)
+  (interactive "@")
    ;; In case another window is currently selected
    (save-window-excursion
      (or (eq major-mode 'Info-mode) (switch-to-buffer "*info*"))
@@ -2053,7 +2053,7 @@
  (defun Info-up (&optional same-file)
    "Go to the superior node of this node.
  If SAME-FILE is non-nil, do not move to a different Info file."
-  (interactive)
+  (interactive "@")
    ;; In case another window is currently selected
    (save-window-excursion
      (or (eq major-mode 'Info-mode) (switch-to-buffer "*info*"))


Gerhard



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

* Re: bug#11672: 23.3; info menu-bar acts on wrong window
  2012-06-22 10:21       ` martin rudalics
  2012-06-23 12:53         ` Dr. Gerhard Kahl
@ 2012-06-23 13:33         ` Chong Yidong
  1 sibling, 0 replies; 4+ messages in thread
From: Chong Yidong @ 2012-06-23 13:33 UTC (permalink / raw)
  To: martin rudalics; +Cc: emacs-devel, Gerhard

martin rudalics <rudalics@gmx.at> writes:

>> So I think using
>> (interactive "@") is TRT.  Any objections?
>
> Apparently there are no objections.  Gerhard could you please provide a
> patch and a ChangeLog entry?

I committed a few other changes to the code (it doesn't make sense to
use four almost-identical keymaps for those buttons), and included the @
interactive spec along the way.  Thanks for the bug report and the fix
suggestion, Gerhard.




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

end of thread, other threads:[~2012-06-23 13:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <877gvefbwh.fsf@abara.de>
     [not found] ` <4FD6E793.4050808@gmx.at>
     [not found]   ` <4FDF1EA4.9000408@abara.de>
2012-06-20  9:05     ` bug#11672: 23.3; info menu-bar acts on wrong window martin rudalics
2012-06-22 10:21       ` martin rudalics
2012-06-23 12:53         ` Dr. Gerhard Kahl
2012-06-23 13:33         ` Chong Yidong

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