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#48724: Code collapsing and outline headings for elisp Date: Sun, 30 May 2021 00:57:31 +0300 Organization: LINKOV.NET Message-ID: <877djh42jg.fsf@mail.linkov.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25472"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: 48724@debbugs.gnu.org To: Christopher Dimech Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 30 00:16:45 2021 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 1ln7G8-0006SR-Rq for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 30 May 2021 00:16:44 +0200 Original-Received: from localhost ([::1]:53872 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ln7G7-0006K0-VM for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 29 May 2021 18:16:43 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38072) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ln7FT-00054Y-7G for bug-gnu-emacs@gnu.org; Sat, 29 May 2021 18:16:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46369) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ln7FS-0004t3-WA for bug-gnu-emacs@gnu.org; Sat, 29 May 2021 18:16:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ln7FS-000578-SL for bug-gnu-emacs@gnu.org; Sat, 29 May 2021 18:16:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 May 2021 22:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48724 X-GNU-PR-Package: emacs Original-Received: via spool by 48724-submit@debbugs.gnu.org id=B48724.162232652819582 (code B ref 48724); Sat, 29 May 2021 22:16:02 +0000 Original-Received: (at 48724) by debbugs.gnu.org; 29 May 2021 22:15:28 +0000 Original-Received: from localhost ([127.0.0.1]:57910 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ln7Eu-00055m-Cd for submit@debbugs.gnu.org; Sat, 29 May 2021 18:15:28 -0400 Original-Received: from relay7-d.mail.gandi.net ([217.70.183.200]:42715) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ln7Ed-00054N-BS for 48724@debbugs.gnu.org; Sat, 29 May 2021 18:15:11 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 756DC20003; Sat, 29 May 2021 22:15:03 +0000 (UTC) In-Reply-To: (Christopher Dimech's message of "Fri, 28 May 2021 22:59:17 +0200") 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:207556 Archived-At: > Currently, outline-minor-mode has the capability to treat "defun" constructs > as heading, allowing one to choose to hide some code from view by collapsing > the region of code. It would be beneficial for the actual major mode itself > (i.e. emacs-lisp-mode) to handle the code collapsing, leaving the code highlighting > intact. Code collapsing could also be extended beyond not only collapsing > functions and variables ((defun, defvar), but also to additional constructs that could > be indented (e.g. lists '(...), let, let*, pcase) and other constructs users could > find useful (e.g. if, when, ). > > And for outline-minor-mode, the mode could then be used to further enhance the structuring > of larger chunks of code (e.g. a collection of functions) using outline headings. Outlining > would then be a separate capability different from code collapsing. Currently everything is customizable in outline-minor-mode by just two variables: outline-regexp and outline-level. So when necessary, emacs-lisp-mode could provide an option that will set different values of these variables, one of which could set outline-regexp to a regexp that matches: lists, '(...), let, let*, pcase, if, when, etc…