From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#41130: bug#41198: 27.0.60; [PATCH] heading cycling command for outline Date: Mon, 18 May 2020 19:45:10 -0700 Message-ID: References: <452A6049-893A-4E7E-8349-541D276FAD19@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="39588"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 41130@debbugs.gnu.org, 41198@debbugs.gnu.org To: Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 19 04:46:11 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 1jasGh-000AD3-7c for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 19 May 2020 04:46:11 +0200 Original-Received: from localhost ([::1]:53332 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jasGg-0003qr-7g for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 18 May 2020 22:46:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46170) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jasGY-0003qS-OO for bug-gnu-emacs@gnu.org; Mon, 18 May 2020 22:46:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37186) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jasGY-0006rR-Ei for bug-gnu-emacs@gnu.org; Mon, 18 May 2020 22:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jasGY-0000cc-CA for bug-gnu-emacs@gnu.org; Mon, 18 May 2020 22:46:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 19 May 2020 02:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41130 X-GNU-PR-Package: emacs Original-Received: via spool by 41130-submit@debbugs.gnu.org id=B41130.15898563192339 (code B ref 41130); Tue, 19 May 2020 02:46:02 +0000 Original-Received: (at 41130) by debbugs.gnu.org; 19 May 2020 02:45:19 +0000 Original-Received: from localhost ([127.0.0.1]:48732 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jasFr-0000bZ-Gq for submit@debbugs.gnu.org; Mon, 18 May 2020 22:45:19 -0400 Original-Received: from mail-qk1-f179.google.com ([209.85.222.179]:39611) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jasFo-0000b2-IQ; Mon, 18 May 2020 22:45:16 -0400 Original-Received: by mail-qk1-f179.google.com with SMTP id 142so766984qkl.6; Mon, 18 May 2020 19:45:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc :content-transfer-encoding; bh=yMP9pSpYCmjovbXMPU5h2jN+wT3Torh3x6JBeslYFcs=; b=KKLx/xo25ZH/QAg2RZzUq/dc6nw+WwU7UqKfSxEOJpiO4Gky7s3BFVBn99XZ5EYUey FrkHJaCau1PVeWQYbGX+XjWFv6cpOyE9p7jHJMPN5hoVyzFJMRfeoNKPpBfypIhghNuo UY+qnXgCPOaW3HxJFX9e34dcnjbNaxav0S8ANYS4cmuhWTelgd/oIM3fvQkqjoQ6JCxt 5YOUoSpCeW1mMR+Hg86BLGQjq4lfQ0VB+FHKqC5p8CbovHLlJaP+Dg2+WIqRXEE4Q/so hcXpDLcSP5Emie7BEOdl1ouGrg94vqV7dyNLi5dXmdaqW1AJk+9hAofkEfRaS52E0xoE eTCw== X-Gm-Message-State: AOAM533HvBoAwk7bhdqv8oucHLqq0SLrhC0wC+nJTsWM6HxZubmHaBJ1 A6KKiJQo1xeqgZ22NpCf9qZ1k/my+TvLxo0Vfxg= X-Google-Smtp-Source: ABdhPJznylKBxdpMaBRXhOKWmBtMfymHgk2ZgRZI+NBfq6DRk97rJRkS9teSs3Y+SwSkYbf3OfqJhYlcjKL5iISKsew= X-Received: by 2002:a25:9304:: with SMTP id f4mr19287903ybo.309.1589856310837; Mon, 18 May 2020 19:45:10 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Mon, 18 May 2020 19:45:10 -0700 In-Reply-To: <452A6049-893A-4E7E-8349-541D276FAD19@gmail.com> (Yuan Fu's message of "Mon, 11 May 2020 21:52:25 -0400") 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:180574 Archived-At: forcemerge 41130 41198 thanks Yuan Fu writes: > Add two commands that cycles a heading (like that in Org mode) in outline= -mode: > > - outline-cycle: cycles between =E2=80=9Chide all=E2=80=9D, =E2=80=9Csub = headings=E2=80=9D and =E2=80=9Cshow all=E2=80=9D state. They are called =E2= =80=9CFOLDED=E2=80=9D, =E2=80=9CCHILDREN=E2=80=9D, =E2=80=9CSUBTREE=E2=80= =9D in Org mode. > - outline-cycle-buffer: cycles between =E2=80=9Conly top level headings= =E2=80=9D, =E2=80=9Call headings=E2=80=9D, =E2=80=9Cshow all=E2=80=9D state= s Thanks for working on this. I've tested your patch, and it seems to work as advertised. > Could this be useful? I think it could. I have previously sent the wishlist Bug#41130, which I have now merged with this bug. I have seen no objections to that proposal, so I hope that it is uncontroversial. 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? I think we also need ChangeLog in the commit message, an entry in NEWS, and updates to the manual. > +(defun outline-cycle () > + "Cycle between =E2=80=9Chide all=E2=80=9D, =E2=80=9Cheadings only=E2= =80=9D and =E2=80=9Cshow all=E2=80=9D. > + > +=E2=80=9CHide all=E2=80=9D means hide all subheadings and their bodies. > +=E2=80=9CHeadings only=E2=80=9D means show sub headings but not their bo= dies. > +=E2=80=9CShow all=E2=80=9D means show all subheadings and their bodies." I can't remember seeing double quotes used like that before in doc strings. Correct me if I'm wrong, but wouldn't we normally use `single-quotes' for something like this? Best regards, Stefan Kangas