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: master 6458e16: New mode outline-cycle-minor-mode with Orgmode-like TAB cycling on headings Date: Thu, 04 Mar 2021 14:07:55 -0500 Message-ID: References: <20210303191236.24697.93201@vcs0.savannah.gnu.org> <20210303191237.2B2D720E1B@vcs0.savannah.gnu.org> <87zgzkug5d.fsf@mail.linkov.net> <87a6rj5jdl.fsf@mail.linkov.net> <87o8fy7os5.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4958"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Mar 04 20:09:45 2021 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 1lHtM1-0001CK-P9 for ged-emacs-devel@m.gmane-mx.org; Thu, 04 Mar 2021 20:09:45 +0100 Original-Received: from localhost ([::1]:41684 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lHtM0-0003qf-PO for ged-emacs-devel@m.gmane-mx.org; Thu, 04 Mar 2021 14:09:44 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42506) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHtKR-0003I4-KC for emacs-devel@gnu.org; Thu, 04 Mar 2021 14:08:07 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:12696) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHtKL-0000za-Uy for emacs-devel@gnu.org; Thu, 04 Mar 2021 14:08:06 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 426C1100236; Thu, 4 Mar 2021 14:07:59 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 7B8EA1000C9; Thu, 4 Mar 2021 14:07:57 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1614884877; bh=CjZLv+Sd1HB0YudGZFGB2UJbzNyHKx4OqcovEyhYPhU=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=lmhrEJ9+/cIqKuHVnuZv52KeI01fgyX96GYEzDOFmCLRKWl4ewqdI0Oba6DbOtALU K0gPe40hPO3rTvII6KD3oDDYh8SY5s/++OslUOt6wv+7Ke+b+TUjintd9emFbsQklu A8MdmhvyvgR0B/h9dhT1U2+zpeUGsBYgSsidgeZAgtqO28D1W4W4ksRV+ZBR26tWEY FYb90ePG+/dzel/X1avGFrab+uOfmjqCiLCc1FDdeFRA7qtBAn704q5g91u3AsZtVT PXJQ6rZ41ZRNFT22HU/mAtlPIUsRPFJAlnCQ4t/RoSIOTDsiagE8ZhY/SfuQvTmpsC 25ph2126Vmj9w== Original-Received: from alfajor (unknown [216.154.43.249]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 573A0120230; Thu, 4 Mar 2021 14:07:57 -0500 (EST) In-Reply-To: <87o8fy7os5.fsf@mail.linkov.net> (Juri Linkov's message of "Thu, 04 Mar 2021 20:12:42 +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: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, 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=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:265980 Archived-At: >> [ As for how to resolve it (in terms of behavior rather than in terms >> of code), I think the cycling should only kick after trying >> indentation and the indentation function did not change the buffer. >> This is the kind of refinement in behavior which can't be obtained >> just by key bindings but is (barely) obtainable via `add-function`. ] > > This fallback-on-no-op logic works for indentation, but not for e.g. > diff-hunk-next (works only at the last hunk where TAB is no-op). Indeed, it's no silver bullet. In the case of `diff-hunk-next` and `outline-minor-mode-cycle` we really have an irreconcilable conflict, AFAICT. > Another idea is to put the cycling keymap only at the beginning of the > outline heading line. Then at the beginning of the line TAB will cycle, > while on the rest of the line TAB will fall back to the default binding > to indent/navigate etc. It might be a good idea to restrict the cycling behavior to the case where we're at BOL, indeed (of course, it still won't help for `diff-hunk-next`). > Ah, this explains everything. Now I tried to put it in the OVERRIDE part, > and the result is angry fruit salad. ;-) Stefan