all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#11672: 23.3; info menu-bar acts on wrong window
@ 2012-06-11  9:14 Gerhard Kahl
  2012-06-12  6:54 ` martin rudalics
  0 siblings, 1 reply; 6+ messages in thread
From: Gerhard Kahl @ 2012-06-11  9:14 UTC (permalink / raw)
  To: 11672

--- Bug Description: -----------
The bug occurs when displaying two windows with different info buffers
and navigating by clicking in the menu-bar with the mouse: when the first 
window is active and you click the menu bar of the second window the change
of nodes takes place in the first window, not in the second.

Steps to reproduce the bug:

-start emacs
-start info
-clone-buffer
-activate the 1st window (e.g by clicking in the window)
-open a node in the first window (e.g by hitting '3')
-activate the 2nd window (e.g. by clicking in the window)
-open a node in the 2nd window (e.g. by clicking '5')
-click the "Up: (dir)" link in the menu-bar of the first window 
 without activating the window first

As you see, the node changes in the second window, not in the first one.

The same happens with emacs started in a text mode terminal with gpm
mouse support.

--------------------------------



In GNU Emacs 23.3.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.10)
 of 2012-03-25 on allspice, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11103000
configured using `configure  '--build' 'x86_64-linux-gnu' '--build' 'x86_64-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.3/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.3/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.3/leim' '--with-crt-dir=/usr/lib/x86_64-linux-gnu' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS=-D_FORTIFY_SOURCE=2''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: de_DE.UTF-8
  value of $LC_CTYPE: de_DE.UTF-8
  value of $LC_MESSAGES: de_DE.UTF-8
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: de_DE.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Info

Minor modes in effect:
  show-paren-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t
  abbrev-mode: t

Recent input:
<triple-down-mouse-4> <triple-mouse-4> <triple-down-mouse-4> 
<triple-mouse-4> <help-echo> <help-echo> <help-echo> 
<help-echo> <down-mouse-1> <mouse-1> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> 1 <down-mouse-4> 
<mouse-4> <double-down-mouse-4> <double-mouse-4> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <down-mouse-1> 
<mouse-1> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <down-mouse-1> <mouse-1> <help-echo> <down-mouse-1> 
<mouse-1> <down-mouse-4> <mouse-4> <double-down-mouse-4> 
<double-mouse-4> <triple-down-mouse-4> <triple-mouse-4> 
<triple-down-mouse-4> <triple-mouse-4> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<down-mouse-1> <mouse-1> <help-echo> <help-echo> <down-mouse-1> 
<mouse-1> <help-echo> <down-mouse-1> <mouse-1> <help-echo> 
<help-echo> <help-echo> <down-mouse-1> <mouse-1> <help-echo> 
<down-mouse-1> <mouse-1> <down-mouse-4> <mouse-4> <double-down-mouse-4> 
<double-mouse-4> <triple-down-mouse-4> <triple-mouse-4> 
<down-mouse-4> <mouse-4> <double-down-mouse-4> <double-mouse-4> 
<triple-down-mouse-4> <triple-mouse-4> <triple-down-mouse-4> 
<triple-mouse-4> <help-echo> <down-mouse-4> <mouse-4> 
<double-down-mouse-4> <double-mouse-4> <down-mouse-5> 
<mouse-5> <down-mouse-5> <mouse-5> <down-mouse-5> <mouse-5> 
<down-mouse-5> <mouse-5> <double-down-mouse-5> <double-mouse-5> 
<down-mouse-5> <mouse-5> <help-echo> <down-mouse-4> 
<mouse-4> <double-down-mouse-4> <double-mouse-4> <triple-down-mouse-4> 
<triple-mouse-4> <down-mouse-4> <mouse-4> <double-down-mouse-4> 
<double-mouse-4> <triple-down-mouse-4> <triple-mouse-4> 
<down-mouse-4> <mouse-4> <double-down-mouse-4> <double-mouse-4> 
<triple-down-mouse-4> <triple-mouse-4> <help-echo> 
<down-mouse-4> <mouse-4> <double-down-mouse-4> <double-mouse-4> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<down-mouse-1> <mouse-1> 1 <help-echo> <help-echo> 
<down-mouse-1> <mouse-1> <help-echo> <help-echo> <down-mouse-1> 
<mouse-1> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <down-mouse-1> <mouse-1> <help-echo> <down-mouse-1> 
<mouse-1> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<down-mouse-1> <mouse-2> <help-echo> <help-echo> <help-echo> 
<down-mouse-1> <mouse-1> <help-echo> <down-mouse-1> 
<mouse-1> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <menu-bar> 
<help-menu> <about-emacs> <help-echo> <help-echo> <down-mouse-5> 
<mouse-5> <double-down-mouse-5> <double-mouse-5> <down-mouse-4> 
<mouse-4> <down-mouse-4> <mouse-4> <double-down-mouse-4> 
<double-mouse-4> <help-echo> <help-echo> <help-echo> 
<down-mouse-1> <mouse-movement> <mouse-movement> <drag-mouse-1> 
<help-echo> <down-mouse-5> <mouse-5> <down-mouse-4> 
<mouse-4> <down-mouse-1> <mouse-movement> <mouse-movement> 
<help-echo> <mouse-movement> <mouse-movement> <mouse-movement> 
<mouse-movement> <mouse-movement> <drag-mouse-1> <help-echo> 
<down-mouse-3> <help-echo> <help-echo> <drag-mouse-3> 
<help-echo> <down-mouse-3> <mouse-3> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <menu-bar> 
<edit> <copy> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <down-mouse-1> 
<mouse-1> <help-echo> <help-echo> <help-echo> <help-echo> 
<down-mouse-5> <mouse-5> <help-echo> <double-down-mouse-5> 
<double-mouse-5> <triple-down-mouse-5> <triple-mouse-5> 
<triple-down-mouse-5> <triple-mouse-5> <down-mouse-3> 
<mouse-3> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <menu-bar> <help-menu> 
<send-emacs-bug-report>

Recent messages:
byte-code: Beginning of buffer [13 times]
uncompressing cpio.info.gz...done
Info-extract-pointer: Node has no Up [2 times]
uncompressing ed.info.gz...done
uncompressing ed.info.gz...done
uncompressing ed.info.gz...done
Info-extract-pointer: Node has no Up
For information about GNU Emacs and the GNU system, type C-h C-a.
Mark set
byte-code: End of buffer
byte-code: End of buffer

Load-path shadows:
/usr/share/emacs23/site-lisp/css-mode/css-mode hides /usr/share/emacs/site-lisp/css-mode/css-mode
/usr/share/emacs/23.3/site-lisp/auctex/multi-prompt hides /usr/share/emacs/site-lisp/auctex/multi-prompt
/usr/share/emacs/23.3/site-lisp/auctex/tex-buf hides /usr/share/emacs/site-lisp/auctex/tex-buf
/usr/share/emacs/23.3/site-lisp/auctex/toolbar-x hides /usr/share/emacs/site-lisp/auctex/toolbar-x
/usr/share/emacs/23.3/site-lisp/auctex/tex-fold hides /usr/share/emacs/site-lisp/auctex/tex-fold
/usr/share/emacs/23.3/site-lisp/auctex/tex-font hides /usr/share/emacs/site-lisp/auctex/tex-font
/usr/share/emacs/23.3/site-lisp/auctex/tex hides /usr/share/emacs/site-lisp/auctex/tex
/usr/share/emacs/23.3/site-lisp/auctex/context-nl hides /usr/share/emacs/site-lisp/auctex/context-nl
/usr/share/emacs/23.3/site-lisp/auctex/tex-jp hides /usr/share/emacs/site-lisp/auctex/tex-jp
/usr/share/emacs/23.3/site-lisp/auctex/tex-fptex hides /usr/share/emacs/site-lisp/auctex/tex-fptex
/usr/share/emacs/23.3/site-lisp/auctex/latex hides /usr/share/emacs/site-lisp/auctex/latex
/usr/share/emacs/23.3/site-lisp/auctex/bib-cite hides /usr/share/emacs/site-lisp/auctex/bib-cite
/usr/share/emacs/23.3/site-lisp/auctex/tex-bar hides /usr/share/emacs/site-lisp/auctex/tex-bar
/usr/share/emacs/23.3/site-lisp/auctex/texmathp hides /usr/share/emacs/site-lisp/auctex/texmathp
/usr/share/emacs/23.3/site-lisp/auctex/tex-mik hides /usr/share/emacs/site-lisp/auctex/tex-mik
/usr/share/emacs/23.3/site-lisp/auctex/tex-style hides /usr/share/emacs/site-lisp/auctex/tex-style
/usr/share/emacs/23.3/site-lisp/auctex/tex-info hides /usr/share/emacs/site-lisp/auctex/tex-info
/usr/share/emacs/23.3/site-lisp/auctex/context-en hides /usr/share/emacs/site-lisp/auctex/context-en
/usr/share/emacs/23.3/site-lisp/auctex/context hides /usr/share/emacs/site-lisp/auctex/context
/usr/share/emacs/23.3/site-lisp/auctex/font-latex hides /usr/share/emacs/site-lisp/auctex/font-latex
/usr/share/emacs23/site-lisp/html-helper-mode/hhm-config hides /usr/share/emacs/site-lisp/html-helper-mode/hhm-config
/usr/share/emacs23/site-lisp/html-helper-mode/visual-basic-mode hides /usr/share/emacs/site-lisp/html-helper-mode/visual-basic-mode
/usr/share/emacs23/site-lisp/html-helper-mode/tempo hides /usr/share/emacs/site-lisp/html-helper-mode/tempo
/usr/share/emacs23/site-lisp/html-helper-mode/html-helper-mode hides /usr/share/emacs/site-lisp/html-helper-mode/html-helper-mode
/usr/share/emacs/23.3/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup
/usr/share/emacs23/site-lisp/html-helper-mode/tempo hides /usr/share/emacs/23.3/lisp/tempo
/usr/share/emacs23/site-lisp/dictionaries-common/flyspell hides /usr/share/emacs/23.3/lisp/textmodes/flyspell
/usr/share/emacs23/site-lisp/css-mode/css-mode hides /usr/share/emacs/23.3/lisp/textmodes/css-mode
/usr/share/emacs23/site-lisp/dictionaries-common/ispell hides /usr/share/emacs/23.3/lisp/textmodes/ispell

Features:
(shadow sort mail-extr message ecomplete rfc822 mml mml-sec
password-cache mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231
rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util netrc
time-date mm-util mail-prsvr gmm-utils wid-edit mailheader canlock sha1
hex-util hashcash mail-utils emacsbug jka-compr info help-mode view
paredit easy-mmode edmacro kmacro html-mode jsp-html-helper-mode
asp-html-helper-mode php-html-helper-mode html-helper-mode advice
help-fns advice-preload tempo cc-mode cc-fonts easymenu cc-menus cc-cmds
cc-styles cc-align cc-engine cc-vars cc-defs paren cus-start cus-load
mmm-auto mmm-vars mmm-compat regexp-opt cl cl-19 devhelp preview-latex
tex-site auto-loads tooltip ediff-hook vc-hooks lisp-float-type mwheel
x-win x-dnd font-setting tool-bar dnd fontset image fringe lisp-mode
register page menu-bar rfn-eshadow timer select scroll-bar mldrag mouse
jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
loaddefs button minibuffer faces cus-face files text-properties overlay
md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
system-font-setting font-render-setting gtk x-toolkit x multi-tty emacs)





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

* bug#11672: 23.3; info menu-bar acts on wrong window
  2012-06-11  9:14 bug#11672: 23.3; info menu-bar acts on wrong window Gerhard Kahl
@ 2012-06-12  6:54 ` martin rudalics
       [not found]   ` <4FDF1EA4.9000408@abara.de>
  0 siblings, 1 reply; 6+ messages in thread
From: martin rudalics @ 2012-06-12  6:54 UTC (permalink / raw)
  To: Gerhard Kahl; +Cc: 11672

 > Steps to reproduce the bug:
 >
 > -start emacs
 > -start info
 > -clone-buffer
 > -activate the 1st window (e.g by clicking in the window)
 > -open a node in the first window (e.g by hitting '3')
 > -activate the 2nd window (e.g. by clicking in the window)
 > -open a node in the 2nd window (e.g. by clicking '5')
 > -click the "Up: (dir)" link in the menu-bar of the first window
 >  without activating the window first
 >
 > As you see, the node changes in the second window, not in the first one.
 >
 > The same happens with emacs started in a text mode terminal with gpm
 > mouse support.

I'd define things like

(defun Info-header-up ()
   (interactive)
   (let* ((mouse-position (mouse-position))
	 (window
	  (ignore-errors
	    (window-at (cadr mouse-position) (cddr mouse-position)
		       (car mouse-position)))))
     (if window
	(with-selected-window window
	  (Info-up))
       (Info-up))))

together with

     (define-key keymap [header-line mouse-1] 'Info-header-up)
     (define-key keymap [header-line mouse-2] 'Info-header-up)

martin





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

* 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; 6+ 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] 6+ messages in thread

* Re: bug#11672: 23.3; info menu-bar acts on wrong window
  2012-06-20  9:05     ` 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; 6+ 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] 6+ 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; 6+ 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] 6+ 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; 6+ 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] 6+ messages in thread

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

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-11  9:14 bug#11672: 23.3; info menu-bar acts on wrong window Gerhard Kahl
2012-06-12  6:54 ` martin rudalics
     [not found]   ` <4FDF1EA4.9000408@abara.de>
2012-06-20  9:05     ` 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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.