From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christopher Dimech Newsgroups: gmane.emacs.bugs Subject: bug#48724: Code collapsing and outline headings for elisp Date: Sun, 30 May 2021 01:55:33 +0200 Message-ID: References: <877djh42jg.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="22481"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 48724@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 30 01:56:19 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 1ln8oV-0005eB-MQ for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 30 May 2021 01:56:19 +0200 Original-Received: from localhost ([::1]:41016 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ln8oU-0005KW-Mo for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 29 May 2021 19:56:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47516) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ln8oD-0005KE-Uv for bug-gnu-emacs@gnu.org; Sat, 29 May 2021 19:56:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46422) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ln8oD-0001YZ-NG for bug-gnu-emacs@gnu.org; Sat, 29 May 2021 19:56:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ln8oD-0001Ks-KY for bug-gnu-emacs@gnu.org; Sat, 29 May 2021 19:56:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Christopher Dimech Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 May 2021 23:56:01 +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.16223325465112 (code B ref 48724); Sat, 29 May 2021 23:56:01 +0000 Original-Received: (at 48724) by debbugs.gnu.org; 29 May 2021 23:55:46 +0000 Original-Received: from localhost ([127.0.0.1]:57968 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ln8nx-0001KN-Qr for submit@debbugs.gnu.org; Sat, 29 May 2021 19:55:46 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:57387) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ln8ns-0001K6-7X for 48724@debbugs.gnu.org; Sat, 29 May 2021 19:55:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1622332533; bh=VHW/FO1xYCaUeQHsL0bPgP8ReCIuwzK6AYBCCzarnl4=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=W2HN93mElxWYMZ/WKH8BqCKlS/bvIxNKs2ImR4qBAgUsgsi/eXvjaPJcDX9bT/y99 jrVApo+ZOZSVklf16lVwxW0oImGJlVdFxoJHFL3qlmCVZdS/W+fxiQVR14GncznvLQ juPSPEr+/mPz3/rkaz7TEQ8UHGJX0Ckqb4bJpZsI= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [213.165.168.94] ([213.165.168.94]) by web-mail.gmx.net (3c-app-mailcom-bs16.server.lan [172.19.170.184]) (via HTTP); Sun, 30 May 2021 01:55:33 +0200 Importance: normal Sensitivity: Normal In-Reply-To: <877djh42jg.fsf@mail.linkov.net> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:wXHTAy5HkpsJFs/1F0NF/bJqvzF5Km8PTWnW5k4HvlFNbCpYiLvDxWzdH/w2wXQpjdYr3 1KExLODr/rnaaRVHH0p5MYVqLsds55AGriTjgzBFUJ/cwOqgk823PWj4dseYB4eNQWU6amnfzus0 H81g2PRlo138raMXJLg1uJrtVycUk+1C1aMRAEWDTrtGccKkmJ4tywJy/wPRHsrG6ubaBhVFJYYM lpGwTIy8iiOCaai0+cSOyHQ1p0+RPj9BJjcLGgnF7H0lyoeGqZAwQ0OxFiBk4AwWr9OBQ59qoa9I MY= X-UI-Out-Filterresults: notjunk:1;V03:K0:oW/n7KwtIpE=:FtSIkWEkTrrmCKhQa5N05v 3nY9KfIAdvCuSZNfFGjHxjK6F651va1x+ismQPspJr9VUrpiMA9kt617F7nbpmVNTkGtQn0E6 OWnx+2knzCRfv62k+DXq8ZRTGYg3pU9AC8BtJDaS6VIEw/jnWh6tJ+I9hWVikWVFAIp/S4gmF xo/uknJ5O7kjrkSw7zacLbCPFiwlfqRLR7PlHc06XOzVsYmFSFR/0nbr2kGYVzcL7tXzUdt9m Knk68+clCcgvOMYZA0Q8nOT7YXs3zYJi7KAwHOnIKmv8upInr+elodrbbmVJBYeRsb09G6Ia7 gwjEukG8ldFG8BLo5DUhOGg7GiWKZBUseBa/iBXnt+O4CPU1DZmhuffdz23SunfTQzZz2Cy4N pTxZ9M4XK7sKX+ILR8FZrFOQ/MS3qcgKB0IUUOhoUEIPepVSUEJ0K1Xo7nRO0gVu6PWyFfDFv w2BmChaQpqxeyfqD0Wscgo28OJoOrFeY5jgG3ln4vMSVd3lghW8K4F86kFGTiGSLIWyv9IysW MiuIrfGma8RRnJHrbO1XEWqMWeKUto27GqU7OAbpqjeKruxN0Mm3miKqWFQ5fjgWPe/SIPoU0 v1ylc1U344Pz3MLOxapTX1L1x/f62xO5li9Yhb3VEVzAz/Ko4yMkbbcK0EWuOoF7T8fggbU4e 3Ie1mYa/q0CbLaQjraAYrvZYuEosf6qNqOQB8oiztrcCQsfIIMONbEUjMZWTVRaDTjRlGlnPZ KFZUcDbkn7WyMuGi1At2NXLw6Y8akzue9BKJFys4jq7mYEp4/btv73irClRP3u8blIwQxw7p 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:207561 Archived-At: > Sent: Sunday, May 30, 2021 at 9:57 AM > From: "Juri Linkov" > To: "Christopher Dimech" > Cc: 48724@debbugs=2Egnu=2Eorg > Subject: Re: bug#48724: Code collapsing and outline headings for elisp > > > Currently, outline-minor-mode has the capability to treat "defun" cons= tructs > > as heading, allowing one to choose to hide some code from view by coll= apsing > > the region of code=2E It would be beneficial for the actual major mod= e itself > > (i=2Ee=2E emacs-lisp-mode) to handle the code collapsing, leaving the = code highlighting > > intact=2E Code collapsing could also be extended beyond not only coll= apsing > > functions and variables ((defun, defvar), but also to additional const= ructs that could > > be indented (e=2Eg=2E lists '(=2E=2E=2E), let, let*, pcase) and other = constructs users could > > find useful (e=2Eg=2E if, when, )=2E > > > > And for outline-minor-mode, the mode could then be used to further enh= ance the structuring > > of larger chunks of code (e=2Eg=2E a collection of functions) using ou= tline headings=2E Outlining > > would then be a separate capability different from code collapsing=2E >=20 > Currently everything is customizable in outline-minor-mode by just > two variables: outline-regexp and outline-level=2E 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, '(=2E=2E=2E), let, let*, pcase, if, when, etc=E2=80= =A6 The general impression is that outline-minor-mode is a general mode for customisable headings that are then handled by the respective major mode=2E General settings could be better, because some variables are not customiza= ble=2E Serious problem is that the two important variables: `outline-regexp' and `outline-heading-alist' are not customizable by using "M-x customize-group= "=2E Additionally both of them should be customizable per mode=2E Don't you th= ink so? There has been a discussion today about outline-minor-mode settings for fo= rtran (both fixed and free form)=2E Have had a go at using "!" and "!!", but "H= ide Body" did not hide the body=2E There could be some default headings for fortran when outline-minor-mode i= s enabled=2E One could follow the current setup for emacs-lisp-mode, for fortran=2E !! for heading level 1 !!! for subheading level 2 !!!! for subsubheading level 3 Together with "Hide Body" for lines beginning with "subroutine" and "funct= ion"=2E