From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Duplicated outline-cycle binding, and problems with the new one Date: Sun, 02 Jan 2022 14:07:46 -0500 Message-ID: References: <9DFDAD07-DBC0-4FAE-A565-D1EE6045E7D8@gmail.com> <86ilv25714.fsf@mail.linkov.net> 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="36748"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Yuan Fu , Emacs developers To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jan 02 20:11:16 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 1n46GA-0009MX-SQ for ged-emacs-devel@m.gmane-mx.org; Sun, 02 Jan 2022 20:11:15 +0100 Original-Received: from localhost ([::1]:53158 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n46G8-0000Hk-W1 for ged-emacs-devel@m.gmane-mx.org; Sun, 02 Jan 2022 14:11:13 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:36730) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n46D2-00076v-RG for emacs-devel@gnu.org; Sun, 02 Jan 2022 14:08:00 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:64261) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n46Cz-00087P-Hk for emacs-devel@gnu.org; Sun, 02 Jan 2022 14:07:58 -0500 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 3D1FF8030F; Sun, 2 Jan 2022 14:07:56 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 93780803F7; Sun, 2 Jan 2022 14:07:47 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1641150467; bh=dl7kCeY+Q+l/Mpfdd0c26TogBMVs+n2aHILsuLh+1FI=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=KvMY0Nki6TZTDNDQMmhnz/lcp/MruguLWA8WN9eFUmLHVlmM0W/BCdstFx4Ukc7vM /cA4TU+godqh8dTFQDpqN6OB6SrwwZ1hNZFkGaNcEb9fEfULt2cdRjTc45BD710H4F COXkUTkQxWu9dxbxLji40GpTWfEAH6uvLBUNEYA8LwtS3crrJd6OsoOXA1CHDvfyi5 XblNgeJZENa8IkHy0CHu2AHhKYmKWTIBZbNd2xfqSFJTronhbFUGWH3ib8L7k4e/ct 1mMl0YcKpBndHHTLCTMvkjq4ZtQ+yrdQTGI8m3rn/wfkh1WfSV5cy56JYyJSaCApKZ 8Q/memFQ28Kow== Original-Received: from pastel (unknown [216.154.30.173]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 617BD1201A4; Sun, 2 Jan 2022 14:07:47 -0500 (EST) In-Reply-To: <86ilv25714.fsf@mail.linkov.net> (Juri Linkov's message of "Sun, 02 Jan 2022 20:25:43 +0200") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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" Xref: news.gmane.io gmane.emacs.devel:283961 Archived-At: >> Overall, from my limited knowledge, I think the old approach is more >> reliable: I wouldn=E2=80=99t have this problem with the old approach. A= nd the >> new functionality added by the new approach and >> outline-minor-mode-cycle-filter can be easily implemented in the old >> approach. We don=E2=80=99t need to fiddle with font-lock-keywords with = the >> old approach, either. How about we go back to the old approach? > > Some time ago we discussed this possibility, but it will require writing > too many wrappers for different modes, for example, for diff-mode: > > (defvar-keymap diff-mode-shared-map > "TAB" (lambda () (interactive) > (if (and outline-minor-mode (outline-on-heading-p)) > (outline-cycle) > (diff-hunk-next))) > ... Why? The old approach used a conditional binding, so it should "just work" without the major modes knowing about it. Stefan