From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#60426: 29.0.60; Binding to outline-minor-mode-cycle-map correctly is unintuitive and hard Date: Thu, 05 Jan 2023 19:45:37 +0200 Organization: LINKOV.NET Message-ID: <861qo95fzi.fsf@mail.linkov.net> References: <871qohm8ht.fsf@zohomail.eu> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36844"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: 60426@debbugs.gnu.org To: Rah Guzar Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 05 18:57:55 2023 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 1pDUV0-0009SS-70 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 05 Jan 2023 18:57:54 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pDUUF-0002VE-O0; Thu, 05 Jan 2023 12:57:07 -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 1pDUUC-0002Qs-9m for bug-gnu-emacs@gnu.org; Thu, 05 Jan 2023 12:57:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pDUUC-0005VM-1z for bug-gnu-emacs@gnu.org; Thu, 05 Jan 2023 12:57:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pDUUB-0008EF-Uu for bug-gnu-emacs@gnu.org; Thu, 05 Jan 2023 12:57:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 05 Jan 2023 17:57:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60426 X-GNU-PR-Package: emacs Original-Received: via spool by 60426-submit@debbugs.gnu.org id=B60426.167294138031518 (code B ref 60426); Thu, 05 Jan 2023 17:57:03 +0000 Original-Received: (at 60426) by debbugs.gnu.org; 5 Jan 2023 17:56:20 +0000 Original-Received: from localhost ([127.0.0.1]:52812 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDUTU-0008CH-Bg for submit@debbugs.gnu.org; Thu, 05 Jan 2023 12:56:20 -0500 Original-Received: from relay3-d.mail.gandi.net ([217.70.183.195]:50401) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDUTR-0008Bl-LI for 60426@debbugs.gnu.org; Thu, 05 Jan 2023 12:56:18 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 424DB60002; Thu, 5 Jan 2023 17:56:10 +0000 (UTC) In-Reply-To: <871qohm8ht.fsf@zohomail.eu> (Rah Guzar via's message of "Fri, 30 Dec 2022 12:12:15 +0100") 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:252620 Archived-At: > Looking around I found that it was because the implementation had > changed, it no longer used `outline-minor-mode-cycle-map` as > the value of keymap text property on headings but rather used an > extended menu item. After looking through the source I finally > figured that the way to achieve what I wanted was to bind > > `(menu-item "" outline-cycle :filter ,(lambda (cmd) (when (outline-on-heading-p) cmd)))` > > to ``. > > I think this is very confusing and is going to lead to some head > scratching for people who might have other keys bound on > `outline-minor-mode-cycle-map` since that map is now the parent > of `outline-minor-mode-map`. I think with the current approach it > will be better to entirely remove `outline-minor-mode-cycle-map` > and bind the extended menu items directly on `outline-minor-mode-map` > (the bindings are actually already on the `outline-minor-mode-map`). > Another way can be to not make `outline-minor-mode-cycle-map` make > a parent of `outline-minor-mode-map`, obsolete it and add to its > docstring a description of how to achieve the same effect using > extended menu items. We expected this change to be backwards-compatible assuming that users would define keys in outline-minor-mode-cycle-map using the same helper as is seen in the default definition: (outline-minor-mode-cycle--bind map (kbd "TAB") #'outline-cycle) Maybe this requirement should be documented in the docstring and mentioned in NEWS?