From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martyhiatt@riseup.net Newsgroups: gmane.emacs.bugs Subject: bug#69457: unable to place two menu-choice widgets on same line Date: Thu, 29 Feb 2024 11:37:35 +0100 Message-ID: References: <5f95b89c-f8ee-4615-a856-aeb8deef0f8b@riseup.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1290"; mail-complaints-to="usenet@ciao.gmane.io" To: Mauro Aranda , martyhiatt@riseup.net, 69457@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 29 15:29:07 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rfhPF-000AeY-UP for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 29 Feb 2024 15:29:06 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rfhNz-0005F2-6Z; Thu, 29 Feb 2024 09:27:47 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rfhNq-0004ta-Hg for bug-gnu-emacs@gnu.org; Thu, 29 Feb 2024 09:27:38 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rfhNq-0005u1-4O for bug-gnu-emacs@gnu.org; Thu, 29 Feb 2024 09:27:38 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rfhOH-0002um-9c for bug-gnu-emacs@gnu.org; Thu, 29 Feb 2024 09:28:05 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martyhiatt@riseup.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Feb 2024 14:28:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69457 X-GNU-PR-Package: emacs Original-Received: via spool by 69457-submit@debbugs.gnu.org id=B69457.170921684411088 (code B ref 69457); Thu, 29 Feb 2024 14:28:05 +0000 Original-Received: (at 69457) by debbugs.gnu.org; 29 Feb 2024 14:27:24 +0000 Original-Received: from localhost ([127.0.0.1]:33958 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rfhNR-0002sY-CD for submit@debbugs.gnu.org; Thu, 29 Feb 2024 09:27:23 -0500 Original-Received: from mx1.riseup.net ([198.252.153.129]:45354) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rfdno-0002Lj-Su for 69457@debbugs.gnu.org; Thu, 29 Feb 2024 05:38:13 -0500 Original-Received: from fews02-sea.riseup.net (fews02-sea-pn.riseup.net [10.0.1.112]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx1.riseup.net (Postfix) with ESMTPS id 4Tlnjc1NXwzDrBV; Thu, 29 Feb 2024 10:37:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1709203060; bh=icum3VTNNA+yNGcEajMTwTAReNtM2Q6suIbAw8ymYK0=; h=Date:Subject:To:References:From:In-Reply-To:From; b=SIZTHioMZyQQTmAVvs61GJ+5m1b5P9tSjfZtUwk+OQ+lj7MKifPwLfWA6/EoKixSO xteIk+ZhRM0uuEcRnufzf/V9QUyiZPJBdB1Urs+k9sQI8wW9CZ2wcZAQ13s7YPfHIe 65AHuhhEw12mfGexBh+twJZHZt4j1bGEu9rT9/GY= X-Riseup-User-ID: 40408E86FA0FA6F63803C818345CA57F3F28759E01F75459322BFC7AED845B6C Original-Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews02-sea.riseup.net (Postfix) with ESMTPSA id 4TlnjZ66RqzFrsJ; Thu, 29 Feb 2024 10:37:38 +0000 (UTC) Content-Language: en-US In-Reply-To: X-Mailman-Approved-At: Thu, 29 Feb 2024 09:26:59 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:280788 Archived-At: hi mauro, thanks a lot for your response. On 2/29/24 01:17, Mauro Aranda wrote: > Yes, you need to control the :format for the choices to accomplish this, at least. > >> some example code i have: >> >> (defun lem-ui-return-item-widgets (list) >>    "Return a list of item widgets for each item, a string, in LIST." >>    (cl-loop for x in list >>             collect `(choice-item :value ,x))) > > So, how about adding something like: > :format "%[%t%] " > here? > > Did you try that? thanks a lot, this works. i see now i had been shedding tears fighting with the menu-choice :format, not realizing i needed to wrangle the children elements instead. glad i asked the widget expert. %v also seems to work here, right? > >> (defun lem-ui-widget-format (str &optional binding) >>    "Return a widget format string for STR, its name. >> BINDING is a string of a keybinding to cycle the widget's value." >>    (concat "%[" (propertize str >>                             'face 'lem-ui-widget-face >>                             'lem-tab-stop t) >>            "%]: %v" >>            binding)) >> >> ;; then within a buffer display function: >>   (widget-create 'menu-choice >>                       :tag "Listing" >>                       :value type >>                       :args (lem-ui-return-item-widgets lem-listing-types) >>                       :help-echo "Select a listing type" >>                       :format (lem-ui-widget-format "Listing") ; "C-c C-c") > > What's the intention with the "C-c C-c"? Could it go at the end of the :format suggestion I gave above? yes, with the above :format it should work. thanks again for chiming in and helping me out! marty