From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#11148: 23.3; x-popup-menu not behaving as documented Date: Sun, 1 Apr 2012 09:19:29 -0700 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1333297203 7052 80.91.229.3 (1 Apr 2012 16:20:03 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 1 Apr 2012 16:20:03 +0000 (UTC) To: "'Dino Chiesa'" , <11148@debbugs.gnu.org> Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Apr 01 18:20:02 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 1SENVW-0003aO-3u for geb-bug-gnu-emacs@m.gmane.org; Sun, 01 Apr 2012 18:19:58 +0200 Original-Received: from localhost ([::1]:57674 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SENVV-0008RY-Cg for geb-bug-gnu-emacs@m.gmane.org; Sun, 01 Apr 2012 12:19:57 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34844) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SENVR-0008R0-Ni for bug-gnu-emacs@gnu.org; Sun, 01 Apr 2012 12:19:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SENVP-0002K3-I2 for bug-gnu-emacs@gnu.org; Sun, 01 Apr 2012 12:19:53 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38430) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SENVP-0002Iy-Bm for bug-gnu-emacs@gnu.org; Sun, 01 Apr 2012 12:19:51 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SENVZ-0002id-QF for bug-gnu-emacs@gnu.org; Sun, 01 Apr 2012 12:20:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 Apr 2012 16:20: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.133329719510435 (code B ref 11148); Sun, 01 Apr 2012 16:20:01 +0000 Original-Received: (at 11148) by debbugs.gnu.org; 1 Apr 2012 16:19:55 +0000 Original-Received: from localhost ([127.0.0.1]:34968 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SENVT-0002iG-80 for submit@debbugs.gnu.org; Sun, 01 Apr 2012 12:19:55 -0400 Original-Received: from acsinet15.oracle.com ([141.146.126.227]:45769) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SENVQ-0002i8-NJ for 11148@debbugs.gnu.org; Sun, 01 Apr 2012 12:19:53 -0400 Original-Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by acsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q31GJen7013300 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 1 Apr 2012 16:19:40 GMT Original-Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q31GJdLX015966 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 1 Apr 2012 16:19:39 GMT Original-Received: from abhmt101.oracle.com (abhmt101.oracle.com [141.146.116.53]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q31GJduQ002342; Sun, 1 Apr 2012 11:19:39 -0500 Original-Received: from dradamslap1 (/10.159.53.220) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 01 Apr 2012 09:19:38 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: Ac0QHor1i+jFKsueSoaeU+LmWESzswAAhgUw X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090204.4F78801D.000F,ss=1,re=0.000,fgs=0 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:58437 Archived-At: > (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.