From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Dino Chiesa" Newsgroups: gmane.emacs.bugs Subject: bug#11148: 23.3; x-popup-menu not behaving as documented Date: Sun, 1 Apr 2012 13:36:48 -0700 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1333312626 13491 80.91.229.3 (1 Apr 2012 20:37:06 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 1 Apr 2012 20:37:06 +0000 (UTC) To: "Drew Adams" , <11148@debbugs.gnu.org> Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Apr 01 22:37:05 2012 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 1SERWK-0003dV-2S for geb-bug-gnu-emacs@m.gmane.org; Sun, 01 Apr 2012 22:37:04 +0200 Original-Received: from localhost ([::1]:32986 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SERWJ-0007zv-Dq for geb-bug-gnu-emacs@m.gmane.org; Sun, 01 Apr 2012 16:37:03 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:40572) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SERW8-0007lW-SS for bug-gnu-emacs@gnu.org; Sun, 01 Apr 2012 16:36:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SERW6-0007LC-Tf for bug-gnu-emacs@gnu.org; Sun, 01 Apr 2012 16:36:52 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38571) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SERW6-0007L1-QB for bug-gnu-emacs@gnu.org; Sun, 01 Apr 2012 16:36:50 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SERWH-0000Zn-T0 for bug-gnu-emacs@gnu.org; Sun, 01 Apr 2012 16:37:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Dino Chiesa" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 Apr 2012 20:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11148 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11148-submit@debbugs.gnu.org id=B11148.13333126032188 (code B ref 11148); Sun, 01 Apr 2012 20:37:01 +0000 Original-Received: (at 11148) by debbugs.gnu.org; 1 Apr 2012 20:36:43 +0000 Original-Received: from localhost ([127.0.0.1]:35109 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SERVy-0000ZE-J0 for submit@debbugs.gnu.org; Sun, 01 Apr 2012 16:36:42 -0400 Original-Received: from blu0-omc3-s5.blu0.hotmail.com ([65.55.116.80]:32961) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SERVv-0000Z6-Q2 for 11148@debbugs.gnu.org; Sun, 01 Apr 2012 16:36:41 -0400 Original-Received: from BLU159-DS19 ([65.55.116.74]) by blu0-omc3-s5.blu0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Sun, 1 Apr 2012 13:36:26 -0700 X-Originating-IP: [50.46.119.2] X-Originating-Email: [dpchiesa@hotmail.com] In-Reply-To: X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Mailer: Microsoft Windows Live Mail 15.4.3538.513 X-MimeOLE: Produced By Microsoft MimeOLE V15.4.3538.513 X-OriginalArrivalTime: 01 Apr 2012 20:36:26.0701 (UTC) FILETIME=[1C4AF7D0:01CD1047] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:58450 Archived-At: K, thanks for the reply. I'll let you guys figure out what you want to do about 11138; It may be that doc changes are the way to fix 11148.\ -Dino -----Original Message----- From: Drew Adams Sent: Sunday, April 01, 2012 9:19 AM To: 'Dino Chiesa' ; 11148@debbugs.gnu.org Subject: RE: bug#11148: 23.3; x-popup-menu not behaving as documented > (x-popup-menu > t > (list "TITLE" > (list "PANE" (list "menu item 1" nil) > (list "menu item 2" nil)))) > ...shows a menu in which both items are selectable. > > This bug may be relevant to bug #11138. One of the proposed fixes for > #11138 at the time of this report is to render a multi-line dialog box > as a menu, with each "line" in the message displayed as an unselectable > menu item. > > But this brief test seems to indicate that the "unselectable" > menu items are not really unselectable, at least on Windows. > In that case the proposed fix would be unsatisfactory. First, I don't really care how bug #11138 is fixed. My point in suggesting splitting a message at \n chars was that the bug can be fixed - even if in a rudimentary way by treating the message's separate lines as separate menu lines (since the code on MS Windows currently treats a `message-box' as a popup menu). Here is what I mean (one way), using the bug report's multiline message: (defun foo (event) (interactive "e") (let ((choice (x-popup-menu event '("Message" ("" "First line in a long-ish message.") ("" "This is line number 2 in the message.") ("" ("OK")))))) (and choice (call-interactively choice)))) (global-set-key [double-mouse-2] 'foo) (global-set-key [mouse-2] nil) Double-click mouse-2. The message's lines are indeed handled as unselectable menu items (yes, on MS Windows). Is that the best looking implementation of a message dialog box? Not IMO. But given the desire to implement a message box using `x-popup-menu', that shows at least that it can be done. Is that better than the current implementation, which jams the multiple lines of the message together? Maybe. Certainly we can hope for a better implementation. Stefan suggested using a tooltip frame, for instance. And maybe (?) at least some of the implementation could be moved from C to Lisp. > I'd like to also raise a documentation bug, as well: there ought to be > examples showing how to use x-popup-menu, on the page I cited above. > A few simple examples will make this method much more usable. Agreed, especially since there are a few different ways to use `x-popup-menu': keymap, list of keymaps, or menu of multiple panes, the last of these being radically different from the first two and unique wrt the rest of Emacs.