From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Howard Melman Newsgroups: gmane.emacs.bugs Subject: bug#41130: bug#41198: 27.0.60; [PATCH] heading cycling command for outline Date: Wed, 20 May 2020 10:12:23 -0400 Message-ID: References: <452A6049-893A-4E7E-8349-541D276FAD19@gmail.com> <92D944EF-6BF9-4635-AC05-4B51B386D5C7@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="107799"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (darwin) To: 41130@debbugs.gnu.org Cancel-Lock: sha1:05Hv94cfZU3v1o0yhe26e3MFuF8= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 20 16:18:42 2020 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 1jbPYP-000RuQ-9P for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 20 May 2020 16:18:41 +0200 Original-Received: from localhost ([::1]:49402 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbPYO-0005eW-9X for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 20 May 2020 10:18:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56152) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbPSw-0004Y3-Sb for bug-gnu-emacs@gnu.org; Wed, 20 May 2020 10:13:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42326) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbPSw-0003H7-Is for bug-gnu-emacs@gnu.org; Wed, 20 May 2020 10:13:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jbPSw-0002Me-DW for bug-gnu-emacs@gnu.org; Wed, 20 May 2020 10:13:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Howard Melman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 20 May 2020 14:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41130 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15899839559048 (code B ref -1); Wed, 20 May 2020 14:13:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 20 May 2020 14:12:35 +0000 Original-Received: from localhost ([127.0.0.1]:53872 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jbPSV-0002Ls-Hv for submit@debbugs.gnu.org; Wed, 20 May 2020 10:12:35 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:53714) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jbPSU-0002Lk-4I for submit@debbugs.gnu.org; Wed, 20 May 2020 10:12:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56112) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbPST-0003FC-Tt for bug-gnu-emacs@gnu.org; Wed, 20 May 2020 10:12:33 -0400 Original-Received: from ciao.gmane.io ([159.69.161.202]:47274) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbPST-0003E0-5k for bug-gnu-emacs@gnu.org; Wed, 20 May 2020 10:12:33 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1jbPSQ-000KdV-3d for bug-gnu-emacs@gnu.org; Wed, 20 May 2020 16:12:30 +0200 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=159.69.161.202; envelope-from=geb-bug-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/20 10:12:30 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: 3 X-Spam_score: 0.3 X-Spam_bar: / X-Spam_report: (0.3 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NML_ADSP_CUSTOM_MED=0.9, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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" Xref: news.gmane.io gmane.emacs.bugs:180654 Archived-At: Yuan Fu writes: >> On May 19, 2020, at 6:36 PM, Stefan Kangas wrote: >> >> Yuan Fu writes: >> >>>> In Bug#41130, I also suggest to add the same keybinding as in org-mode: >>>> TAB and S-TAB. Could you add such keybindings to outline-mode-map in >>>> your patch? >>> >>> It seems that the outline-mode bindings all live under C-c. Maybe C-c >>> TAB and C-c S-TAB? Should I ask on emacs-devel for for suggestions? >> >> I think it is better to use the same keys as org-mode, since one >> important motivation for this feature is precisely to align the >> outline-mode keybindings with org-mode. This aspect would be >> significantly diminished by using other keys, IMHO. >> >> My impression was that also there was consensus around (or at least no >> objections to) that idea the last time we discussed it. I would >> therefore propose to just add TAB and S-TAB to the patch, but allow a >> week or two before pushing to give others a chance to comment here. My original motivation was just to use org's cycling concept to avoid having to remember all of outlines various commands and bindings. So regardless of where these commands end up, I think just having them is a big win. Of course if they exist, aligning them with org bindings would be very nice. The idea was to use this for code folding in programming modes. S-TAB doesn't typically have a binding so it's safe to use and aligns with org-mode. TAB is more problematic as it's typically bound to indenting commands. I don't think context awareness would solve the issue as you could want to indent or cycle when point is on a "heading". But if the other bindings (I think from bug#41198) for M-right and M-left were included they could substitute for indenting. So in a programming mode with outline-minor-mode enabled: - S-TAB can be used anywhere for global cycling - TAB on a heading is used for cycling - TAB not on a heading is used to indent - M-right and M-left anywhere can be used to indent/unindent I think this aligns with org-mode ('m not an org mode user). If someone is bothered by having to use M-arrows for indentation in this case, the answer is to not use outline-minor-mode in a programming mode or rebind outline-cycle. > A minor thing: if the motivation is to align with Org mode, should I > change the text message to align with Org mode? It prints “show all”, > “hide all”, etc (because they make sense), but Org mode prints stuff > like “CHILDREN”, “SUBTREE”, etc. IMHO consistency with outline terms is more important here. It would be helpful if outline and org agreed on terms. If they don't, then perhaps this could use both with org terms in parenthesis. -- Howard