From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Gerd_M=C3=B6llmann?= Newsgroups: gmane.emacs.devel Subject: Re: Tip: tty mode-line popup menus Date: Tue, 10 Dec 2024 10:32:10 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1969"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Emacs Devel To: Stefan Kangas Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Dec 10 10:32:31 2024 Return-path: Envelope-to: ged-emacs-devel@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 1tKwbX-0000QC-N9 for ged-emacs-devel@m.gmane-mx.org; Tue, 10 Dec 2024 10:32:31 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tKwbL-0005Lm-Qr; Tue, 10 Dec 2024 04:32:20 -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 1tKwbI-0005Kq-RC for emacs-devel@gnu.org; Tue, 10 Dec 2024 04:32:18 -0500 Original-Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tKwbH-00089P-4I for emacs-devel@gnu.org; Tue, 10 Dec 2024 04:32:16 -0500 Original-Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-434acf1f9abso51331315e9.2 for ; Tue, 10 Dec 2024 01:32:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733823132; x=1734427932; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=emi81vx2OJwwY/7hpkSY7TbfIckB4WNbKBHsm15xza0=; b=dKAw9IeVu9O7NFFYuG8S2wtBhsLRJf7V+csT4tjxGI7K/UzPe8Iny1ut5sCfEm6Y08 dhiNYr9NfDe2nIZeu8U5cD3ebc2CbxUjLtKYcIC8ot5jKEtGOKQlUxrBSE63+8LfysO/ rM8WeSmrJ4VBrUsyk8hgxCOUUgR8/TyUWh8hBg2ijLyFaORdsPS1i5lKCnCRhvSdCAT+ ftCjV5/EvudFotSEbUiccTkb1apua8ZtH16z0GKkkmNgpQ9xYI++xL3AzlRMvTye2SDv VyTOFdWG9+0caJfmjLyakb9tDPxPzq1/9igvAugzXPdtpSWcWVL7mSmqlLwFmq5qv46V MKcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733823132; x=1734427932; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=emi81vx2OJwwY/7hpkSY7TbfIckB4WNbKBHsm15xza0=; b=Vj+EB4g5huFFw6eu1inhFKffsNC1rRlEzfp+HrBBBnyP7VJX0GCnclvBBJ+Hfl62TS 4fe7t+hWOn09fWK7gZvSE6gSIHO/+MR7eMUbDjjBwSlGNEgn8pgMF/7KnGRGx28aH8DY XLYLBrKInRSCgX/4qO9dv7niThNkUHlGef15iDo/EnK6MNcJ9G7YZ4sxH0HzypmAW3l3 mBR3LDOYcX6YhW7skNSFtDlPZodJxFyhgZpUMvtEsk474KZOqWu/w6UGf8ScyxYTy0jl ubHazCrgTws8R8w0utYbADJm+6xm1Axd51JNfzxZz2nh+5NhERw7QsmXYSRRDweIJU0s 5RzA== X-Gm-Message-State: AOJu0YwegNi5zsbjmUpF3a+eOO7o9mVxLRWfCnJHpaF6kKdYlsuDJ1S8 1RtKYUIf0RguKvMo2vHdm5aFf+9Fp7kYNoniDl1q7j+9L7aopkDy1fo2AA== X-Gm-Gg: ASbGncuwAlNdjy+ZTQWz+FnosF15QtB/YDl1Quo/IIMdK83S9Mh2gzTitPhQmwJyIbx FPfNgHof4kId7eJgj0C+nP7Y8+htfZslijb/u0XgK/jtRZdBwdBHQXLERYLwZlk7zh2QVC9OUqQ E3gAoREPotfzAjVrhXqoaGAkmFTipUcC7X4b2HFkIJh9+T9LefZq6E0k1xvnpsnBH5HZ1BDJPF3 MNdQMeLXr8Vz1M3eMT8M1M10BY9JudzxHT9r6g7DKPeeRfwfgJfmQ5qwnvBK/CiqD+ZATi0EzJP Gya4zm1b59v6iza9XKSfFFewIYVRDpjxnkGoKoWs936aHe7VWnudwI6HMLCat58= X-Google-Smtp-Source: AGHT+IFP4rP4DGVRiJvh2uejFN3C3RWoPT8cdWBuUSO55EV9SHh1GsU50EV4HtzlgESwgy3Oo2+k8w== X-Received: by 2002:a05:600c:3550:b0:434:e9ee:c2d with SMTP id 5b1f17b1804b1-434fff9c1femr26902355e9.26.1733823132223; Tue, 10 Dec 2024 01:32:12 -0800 (PST) Original-Received: from pro2 (p200300e0b73a150089512521f002ebd0.dip0.t-ipconnect.de. [2003:e0:b73a:1500:8951:2521:f002:ebd0]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-435aab63baesm12226735e9.38.2024.12.10.01.32.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Dec 2024 01:32:11 -0800 (PST) In-Reply-To: ("Gerd =?utf-8?Q?M=C3=B6llmann=22'?= =?utf-8?Q?s?= message of "Tue, 10 Dec 2024 07:14:31 +0100") Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=gerd.moellmann@gmail.com; helo=mail-wm1-x330.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:326277 Archived-At: Gerd M=C3=B6llmann writes: > Stefan Kangas writes: > >> Gerd M=C3=B6llmann writes: >> >>> I don't like the tty behavior. It is fiddly with a track pad, which I >>> normally use, leading to inadvertent menu selections. Furthermore, >>> keyboard operation of the menu seems impossible. >>> >>> To fix this, I've added this in my init.el: >>> >>> (defun my-fix-mode-line-map (map) >>> (let* ((down-mouse (kbd " ")) >>> (mouse (kbd " ")) >>> (def (lookup-key map down-mouse))) >>> (when def >>> (define-key map down-mouse nil) >>> (define-key map mouse def)))) >>> >>> (my-fix-mode-line-map mode-line-major-mode-keymap) >>> (my-fix-mode-line-map mode-line-minor-mode-keymap) >> >> How about adding a defcustom for this behavior? > > Maybe, don't know. One problem is that I don't know where else something > similar is done. I know only the two places above plus one in the > Minions package, which probably simply mimicked what Emacs does in > bindings.el. Or in other words, I don't have enough of an overview to > design something that's really useful. > >> I guess many users are on laptops with trackpads these days, and would >> find that convenient. > > I guess so, especially if they use tap-to-click like I do. BTW,=20 (my-fix-mode-line-map mode-line-major-mode-keymap) in combination with using the persistent-scratch package somehow seems to mess up the major-mode mode-line menu. I don't yet understand how, so be warned.