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?K=C3=A9vin_Le_Gouguec?= Newsgroups: gmane.emacs.devel Subject: Re: Thought: Group Minor Modes Into Logical "Bundles"? Date: Fri, 25 Nov 2022 09:51:09 +0100 Message-ID: <87bkovl8n6.fsf@gmail.com> 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="33193"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: "T.V Raman" , emacs-devel@gnu.org To: Daniel =?utf-8?Q?Mart=C3=ADn?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Nov 25 09:52:28 2022 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 1oyURf-0008PC-Ho for ged-emacs-devel@m.gmane-mx.org; Fri, 25 Nov 2022 09:52:27 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oyUQg-0004Ug-F1; Fri, 25 Nov 2022 03:51:26 -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 1oyUQc-0004Ta-UW for emacs-devel@gnu.org; Fri, 25 Nov 2022 03:51:24 -0500 Original-Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oyUQZ-0005dQ-Va for emacs-devel@gnu.org; Fri, 25 Nov 2022 03:51:21 -0500 Original-Received: by mail-wm1-x32b.google.com with SMTP id 83-20020a1c0256000000b003d03017c6efso4973629wmc.4 for ; Fri, 25 Nov 2022 00:51:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=fEpOdjflnVmdycSe7Ejka4vZdiSv9mIBZdXt0SabYO0=; b=Q2NSYnjKeURZ2n+GzXB9TbcSKY+dcPl84uKgTpdOgkqEUk/Esu0tBCj9WpO99ayHvS KlsbGqkL0d4DykFtPShkMPTy7tj6W2zixv9Bqz0xNePvWsMLduIwX0nJ+TKAusL1TTNs VOajeePDmIwMpdn6iopJ1WY0A3GEEMk3gQd5X5Q5XEgCtqttovZ4Bhql0BsB2d+7EaFz dAowxmnZPeHBoOPaZ0fwesGrS6SVffj4u1xCVFkC5mhkS42MXVkIxBvo+EOb4ZxN3s/K WTP5xmNNKY+17IEpmKJHfcVnU4MS6rE0eFtvpWPBMMei2b1VkadggsS49rku7BIGCgGc i6mQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=fEpOdjflnVmdycSe7Ejka4vZdiSv9mIBZdXt0SabYO0=; b=ztDg4+YXFtXu/SDuCpQBGS9hW/BODVV4Nsx+EFctR+BL3Ctfuv54H6Q1C573UwMP+i mLL58HEmtR0NrypIK6Yp2UP5+/HOoT+odRW8vjTIiWfisj4DrwkxnCTi31mkaGQAXF8x 7igEd7zD6TWdtYJePU2cevr/Oj0Palsj8aqSxj9jTefHSW8MBj3thDgWlEuqqjtI01TA uWwBIDKF+X3K74sK73YpYKqeZ+yAaE9txvS9zAQ8uzu2nSoxbUX2e76Y0THnuNBXhNl6 QG7jN0kBrchH1dkAfJ84a33kT5WY2H96FddW0nebIV3CswUDAnN9oCJId9DRwL944tkG NH/Q== X-Gm-Message-State: ANoB5plrJ10tpj3iIe87pKbSiyvhzrT6qTgBm4GgKEalsvaxh+j6dFxU BNyVlx239Y7BcjkQeq1piSmZPZ/LFzI= X-Google-Smtp-Source: AA0mqf7tPVkuUg6NrxWQVrSYbTxI6GyOvaUB5f7XhNtXftTyNO4eJXHrpLh7j5pqYqyYUnnY5NRUXQ== X-Received: by 2002:a1c:f003:0:b0:3cf:e87a:806a with SMTP id a3-20020a1cf003000000b003cfe87a806amr29672795wmb.58.1669366271870; Fri, 25 Nov 2022 00:51:11 -0800 (PST) Original-Received: from amdahl30 ([2a01:e0a:253:fe0:2ef0:5dff:fed2:7b49]) by smtp.gmail.com with ESMTPSA id c4-20020adfef44000000b00241ebd3c221sm3711590wrp.27.2022.11.25.00.51.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Nov 2022 00:51:10 -0800 (PST) In-Reply-To: ("Daniel =?utf-8?Q?Mart=C3=ADn=22's?= message of "Thu, 24 Nov 2022 10:42:08 +0100") Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=kevin.legouguec@gmail.com; helo=mail-wm1-x32b.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:300471 Archived-At: Daniel Mart=C3=ADn writes: > "T.V Raman" writes: > >> The minor mode indicators in the modeline are getting to be too many >> -- and though :lighter for shorter indicators help, I'm still finding >> them overly heavy to consume --- it's painful to listen to :-) though >> I suspect they also place a level of cognitive load on users who can >> that we might be able to reduce. >> >> For instance, in programming language modes, I suspect it's >> increasingly common to have autofill, abbrev, -- perhaps company etc >> turned on; would be nice if a user could: >> >> 1. Define a "logical bundle of minor modes " that are specific to >> various tasks, and then have a modeline indicater for that "bundle" >> defined -- so the Modeline would indicate "prog" for the user to >> know and remember that a preferred set of programming affordances >> are turned on. Thoghts? > > There is the Diminish package in GNU ELPA: > https://elpa.gnu.org/packages/diminish.html I don't know if it already > supports the "bundling" feature that you propose, or something > equivalent. AFAIK Diminish (and delight, and rich-minority, and maybe others) simply let the user redefine (or disable) the lighter for individual minor modes. Off the top of my head, if I wanted to implement Raman's proposal today (as I undertand it) through user code, I guess I'd replace mode-line-modes in mode-line-format with an :eval form that hrm=E2=80=A6 ru= ns through a list of {PRED =E2=86=A6 LIGHTER} functions, where each PRED is fe= d (or looks up) the list of enabled minor modes, and outputs a short LIGHTER for a logical bundle? E.g. (defvar my/prog-minor-modes '(auto-fill-function abbrev-mode)) (defun my/prog-lighters () (and (derived-mode-p 'prog-mode) (seq-every-p 'identity my/prog-minor-modes) " prog")) =E2=80=A6 and then append my/prog-lighters to another list variable that the :eval form will go through=E2=80=A6 hm, it's clearly half-baked (e.g. if a= ny of the modes are disabled, then the lighter won't be shown, so should my/prog-lighters fall back to listing all enabled modes? =F0=9F=A4=B7), and= /or over-engineered. I'm mostly posting this to see if my understanding of Raman's proposal is correct.