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: Wed, 28 Feb 2024 14:26:35 +0100 Message-ID: <5f95b89c-f8ee-4615-a856-aeb8deef0f8b@riseup.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4483"; mail-complaints-to="usenet@ciao.gmane.io" To: 69457@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 28 16:26:27 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 1rfLpC-0000pp-6n for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 28 Feb 2024 16:26:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rfLnj-0007Lh-3D; Wed, 28 Feb 2024 10:24:55 -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 1rfLnb-0006tQ-6W for bug-gnu-emacs@gnu.org; Wed, 28 Feb 2024 10:24:49 -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 1rfLnQ-00066g-U5 for bug-gnu-emacs@gnu.org; Wed, 28 Feb 2024 10:24:39 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rfLnr-00070L-7C for bug-gnu-emacs@gnu.org; Wed, 28 Feb 2024 10:25:03 -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: Wed, 28 Feb 2024 15:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 69457 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.170913387426814 (code B ref -1); Wed, 28 Feb 2024 15:25:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 Feb 2024 15:24:34 +0000 Original-Received: from localhost ([127.0.0.1]:48528 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rfLnJ-0006yF-Kk for submit@debbugs.gnu.org; Wed, 28 Feb 2024 10:24:33 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:46084) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rfK1l-0006wZ-10 for submit@debbugs.gnu.org; Wed, 28 Feb 2024 08:31:22 -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 1rfJxZ-0003sQ-0j for bug-gnu-emacs@gnu.org; Wed, 28 Feb 2024 08:26:58 -0500 Original-Received: from mx1.riseup.net ([198.252.153.129]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rfJxU-0006HZ-Fr for bug-gnu-emacs@gnu.org; Wed, 28 Feb 2024 08:26:56 -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 4TlFWF5SnCzDr0j for ; Wed, 28 Feb 2024 13:26:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1709126809; bh=w4iC+qEBnNALfsVrDo0asPkAW/ilW8ZbeaSMep7Uudw=; h=Date:To:From:Subject:From; b=e/DpxN8mModH0s5BdyigTWkR9QBwGl4zMxCbccBANiMs0jy7Qdtj8MP42vUqH6P3O WZ7Jo4S8NwJHITX9gatrc5HuN0ROrj4BpoTZ1KkSyfgufcg/L02UlpdjJY//bWk8hr 46kvU7gtZ/M8qw8yjF0SVS2c+vaq7tT3JrI1FAYQ= X-Riseup-User-ID: 65F91376D87C1BE308BCF8A378C7E89BA177F9EF2EE111B3D5B447F9CC2D8E24 Original-Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews02-sea.riseup.net (Postfix) with ESMTPSA id 4TlFW21sgVzFsSw for ; Wed, 28 Feb 2024 13:26:38 +0000 (UTC) Content-Language: en-US Received-SPF: pass client-ip=198.252.153.129; envelope-from=martyhiatt@riseup.net; helo=mx1.riseup.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 28 Feb 2024 10:24:27 -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:280762 Archived-At: hi emacs, not sure if this is a bug or not, i'm a widget novice, but i'd like to place two or more menu-choice widgets on the same line and am unable to. some other widgets do not enforce a newline after them, as can be seen from the example code in the emacs widgets manual. is it possible to have multiple menu-choice widgets on the one line? if the current library doesn't allow it, would someone know how/where i might patch it? i also noticed that i cant place any annotation string following the menu widgets displayed value (see the commented argument to the :format function below, if included the binding appears after a newline). i did some poking around and realized it is the one issue. i'm not sure, but i suspect the issue is with the rendering of the item widget (the children), not the menu-choice widget. 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))) (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") :notify (lem-ui-widget-notify-fun :sort)) (widget-create 'menu-choice :tag "Sort" :value sort :args (lem-ui-return-item-widgets lem-sort-types) :help-echo "Select a sort type" :format (lem-ui-widget-format "Sort") ; "C-c C-s") :notify (lem-ui-widget-notify-fun :listing-type)) (lem-widget-minor-mode) the two widgets appear on separate lines. also asked on online, to no avail: https://emacs.stackexchange.com/questions/80453/avoid-newlines-after-menu-choice-widget-and-or-after-v regards, marty