From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#16565: 24.3.50; x-popup-menu just returns nil Date: Tue, 28 Jan 2014 05:47:25 +0200 Message-ID: <83sis8938y.fsf@gnu.org> References: <87r47urvcy.fsf@web.de> <83d2jd9zig.fsf@gnu.org> <874n4ptfhy.fsf@web.de> <87ppnc7qc1.fsf@web.de> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1390880898 29968 80.91.229.3 (28 Jan 2014 03:48:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Jan 2014 03:48:18 +0000 (UTC) Cc: 16565@debbugs.gnu.org To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jan 28 04:48:24 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1W7zey-000848-4m for geb-bug-gnu-emacs@m.gmane.org; Tue, 28 Jan 2014 04:48:24 +0100 Original-Received: from localhost ([::1]:35164 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W7zex-0007aP-5i for geb-bug-gnu-emacs@m.gmane.org; Mon, 27 Jan 2014 22:48:23 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49353) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W7zen-0007a9-Lu for bug-gnu-emacs@gnu.org; Mon, 27 Jan 2014 22:48:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W7zec-0003Rn-SW for bug-gnu-emacs@gnu.org; Mon, 27 Jan 2014 22:48:13 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52830) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W7zec-0003Ri-OP for bug-gnu-emacs@gnu.org; Mon, 27 Jan 2014 22:48:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1W7zec-0008HM-7d for bug-gnu-emacs@gnu.org; Mon, 27 Jan 2014 22:48:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 28 Jan 2014 03:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16565 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16565-submit@debbugs.gnu.org id=B16565.139088085731790 (code B ref 16565); Tue, 28 Jan 2014 03:48:02 +0000 Original-Received: (at 16565) by debbugs.gnu.org; 28 Jan 2014 03:47:37 +0000 Original-Received: from localhost ([127.0.0.1]:38616 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W7zeC-0008Gf-SR for submit@debbugs.gnu.org; Mon, 27 Jan 2014 22:47:37 -0500 Original-Received: from mtaout29.012.net.il ([80.179.55.185]:38569) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W7ze8-0008GS-IX for 16565@debbugs.gnu.org; Mon, 27 Jan 2014 22:47:34 -0500 Original-Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il (HyperSendmail v2007.08) id <0N0300K00ECF5F00@mtaout29.012.net.il> for 16565@debbugs.gnu.org; Tue, 28 Jan 2014 05:48:58 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout29.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N0300EI2ELM2F70@mtaout29.012.net.il>; Tue, 28 Jan 2014 05:48:58 +0200 (IST) In-reply-to: <87ppnc7qc1.fsf@web.de> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:84153 Archived-At: > From: Michael Heerdegen > Cc: 16565@debbugs.gnu.org > Date: Tue, 28 Jan 2014 04:11:42 +0100 > > Ok, I tried to do my best to understand the C code and GUD. > > If I understand correctly, this is executed for me: > > selection = xmenu_show (f, xpos, ypos, for_click, > keymaps, title, &error_name); > > In the good case, SELECTION is bound to different integers, in the bad > case, it is always the same integer, which seems to mean "nil". If you start GDB in the src directory, or let it otherwise read the file src/.gdbinit, you can know for sure: the "xtype" command will tell you what kind of Lisp data is in 'selection': (gdb) p selection (gdb) xtype If "xtype" says it's a Lisp symbol, another command "xsymbol" will tell you what symbol is that, it will say "nil" if it is nil. > But there is a difference in the arguments of the xmenu_show call. In > the bad case calling with an event: > > (x-popup-menu event (mouse-menu-bar-map)) > > FOR_CLICK is bound to true. In the good case with > > (x-popup-menu t (mouse-menu-bar-map)) > > FOR_CLICK is bound to false. > > That made me wonder what happened when I bind `foo' to a mouse-down > event. Then the bug doesn't happen, `foo' doesn't return nil. In general, as long as the menu pops up, you should see the selection made by the user. The binding should only determine whether the menu pops up or not, AFAIK.