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.help Subject: Re: outline-minor-mode and org-mode capabilities for programming languages Date: Mon, 10 May 2021 10:46:04 +0200 Message-ID: References: <87zgx3zu6e.fsf@zoho.eu> 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="18588"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Jean Louis Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 10 10:48:46 2021 Return-path: Envelope-to: geh-help-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 1lg1ao-0004fd-0v for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 10 May 2021 10:48:46 +0200 Original-Received: from localhost ([::1]:33002 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lg1am-0001fZ-G4 for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 10 May 2021 04:48:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53610) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lg1Yu-0001fA-9m for help-gnu-emacs@gnu.org; Mon, 10 May 2021 04:46:50 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:33495) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lg1Yk-0006GF-EX for help-gnu-emacs@gnu.org; Mon, 10 May 2021 04:46:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1620636365; bh=D26uTgrD+yGG5j2lG0zQCjQvE9uGUpP7LA0oP2G2V4Q=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=hVxNXIZeP56y7N6maLb3Q4hFIeHQcXRAwS7OSWQ9ltiQ5wKddTmafoKL6QMgjr46Q b3BTqIXyR2WPtmuCEXBIeDRq2X8LbsVQrY/PYKgpUXQyvNDkp8e143jvkvCVQLbktS l7r52IutmP52EFMWFDuHZEk4diZ1paqHK5yqiAbI= 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-bs04.server.lan [172.19.170.170]) (via HTTP); Mon, 10 May 2021 10:46:04 +0200 Importance: normal Sensitivity: Normal In-Reply-To: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:tpZMrhiWWc2Ei1XspEu8Nq1MdF//t/hUHjmFKahGaiNIuttKUz3z78OrPf6cLI4rfwcWT rpi+kOWiFN6X99Sdo2bdcq/xCIsiORSEg8M1tCy97biKowAAHJljilqaw+U6mDcpYzhnjMR9ML3X 2yRht+HoOLpZueMPunO83kDJw9AQ6yN86Kru2dTxufJzkV5NtpjcHmLKDMMobkKiYqg1deWqx/5Z FZSYT7amGTIDOmwgne03EcVPwbLwfsezZsoZDShgLgdbpU2nZSoVp853uKoO7WjVNdlOvmjBX2US Dc= X-UI-Out-Filterresults: notjunk:1;V03:K0:rRo1tTDH6Q0=:wDPIWb+i6gymn7eMnsOY0x NL094XHXAUuduZBos2r4XGRKIgC+pzc8nlpXqv3nc8R+EH0vWaKxg5l1tBTtdriub9ppksbch oOQaaYmsA1p2WP9bjiW/CzXH1qIBK71uvwk/oiGuC8j0mI4afZukHANbkbbg4lgcJDUJ0e9Qd 0wPh4UxT1apSGV0ZoZHhkBwf+UOyrUIlD74qQK+RrFTXoNMSP6RljWJC/vzgG4Go+gsrau4z1 daFxC/rYJu4kwUlXqm/h0O0ZIGMXbII+RF9nS+EnDNX84aJ/+GyOz0kiX88AfvrtNmp2Z4XdP XaAbvT0Uk9HQsW4hmcReMNkkFoGJ/CDJfnviyxn2FkdzXDNel/KsthbVdDBVnpj+eWOR8gmmg IIE2yLQYyZpEgi+acTn+JhpOt9xqkGCnypNCV86X6kWp40UwwGdCt09+HFfRuKVUH3mnRgXgU xnWOS3fzBLz4PHZQwCUd+a0+Lr3fN/iunp3RobbD+04SUgHq8vQJM3iOFTmjRrPJZt0+Z5JQj sCSDtjv4NsQIW/vjQqg6PvQi02tW0MDuqSYMYbrAKr36Czp7kpkR0KLtR4WWvIW2E9G6w+rZr nI6953SJ9TVHvXPaW2EJJOpKk1CsvtL8a6Vr6uRnmyKaPzW9u258HSc4JlNq0Oyt13nvK+iUB TNTXOuY4O6x1SSXNSJ7kqsxcONAfZxcTfwAyoDMEOtLUELSZ6dK20Nd/MmBgYnjz52biXsmML l+YqmJcTAbkg+RIP1uw4ABdBzwPKtbEe2hIwT/M9ElzG3rYYZ4fpp3SVP1p2GqE9SGgSv7/O Received-SPF: pass client-ip=212.227.15.19; envelope-from=dimech@gmx.com; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:129654 Archived-At: Do you know the possibilities for outline-minor-mode for texinfo files (=2E= texi)?=20 What is the tag for entering headings? Regards Christopher > Sent: Monday, May 10, 2021 at 7:32 PM > From: "Jean Louis" > To: "Christopher Dimech" > Cc: help-gnu-emacs@gnu=2Eorg > Subject: Re: outline-minor-mode and org-mode capabilities for programmin= g languages > > * Christopher Dimech [2021-05-10 09:53]: > > Mainly catering for highligting, headlines and folding to start > > with=2E >=20 > Isn't that what outline-minor-mode is for? >=20 > There are already other packages, I have been testing it, and they > worked similar to outline-minor-mode and could fold things=2E >=20 > How you want to designate headlines? It has to have some key > string=2E Maybe with 5 ;;;;; on beginning? >=20 > ;;;;; Headline >=20 > Evaluate this, and you get highlighting of headlines: > (highlight-regexp "^;;;;;=2E*$" 'hi-yellow) >=20 > But I think you have to first play with:=20 > {M-x customize-group RET outline RET} >=20 > as there is highlighting already included=2E >=20 > For headings, I think each mode need different definition on what is > heading=2E=20 >=20 > So you can define heading with `outline-heading-alist' >=20 > outline-heading-alist is a variable defined in =E2=80=98outline=2Eel=E2= =80=99=2E >=20 > Its value is nil >=20 > Automatically becomes buffer-local when set=2E >=20 > Alist associating a heading for every possible level=2E > Each entry is of the form (HEADING =2E LEVEL)=2E > This alist is used two ways: to find the heading corresponding to > a given level and to find the level of a given heading=2E > If a mode or document needs several sets of outline headings (for exampl= e > numbered and unnumbered sections), list them set by set and sorted by le= vel > within each set=2E For example in texinfo mode: >=20 > (setq outline-heading-alist > '(("@chapter" =2E 2) ("@section" =2E 3) ("@subsection" =2E 4) > ("@subsubsection" =2E 5) > ("@unnumbered" =2E 2) ("@unnumberedsec" =2E 3) > ("@unnumberedsubsec" =2E 4) ("@unnumberedsubsubsec" =2E 5) > ("@appendix" =2E 2) ("@appendixsec" =2E 3)=2E=2E=2E > ("@appendixsubsec" =2E 4) ("@appendixsubsubsec" =2E 5) =2E=2E= )) >=20 > Instead of sorting the entries in each set, you can also separate the > sets with nil=2E >=20 > You asked for: >=20 > - highligting,=20 > - headlines; and=20 > - folding >=20 > And I have demonstrated that more or less, that already exists in > outline-minor-mode, play with highlighting options, folding already > exists, and headings you may define yourself=2E >=20 > Let us say I have this comment and I keep just one space after ;;;; >=20 > ;;;; =E2=9F=A6=E2=9F=A6 LIST FUNCTIONS =E2=9F=A7=E2=9F=A7 >=20 > Folded text >=20 > ;;;; =E2=9F=A6=E2=9F=A6=E2=9F=A6 MORE LIST FUNCTIONS =E2=9F=A7=E2=9F=A7= =E2=9F=A7 >=20 > (setq outline-heading-alist > '((";;;; =E2=9F=A6" =2E 1) (";;;; =E2=9F=A6=E2=9F=A6" =2E 2) (";;;; =E2= =9F=A6=E2=9F=A6=E2=9F=A6" =2E 3))) >=20 > this appears to work on my side in Emacs Lisp mode, but not in > fundamental=2E I can fold those headings and they remain visible=2E >=20 > > > Like should I mark functions with TODO/DONE? > >=20 > > No >=20 > Those mentioned meta level features can look abstract to you, but they > are very real to me so far=2E It leans to subject of literate > programming, similar to programming by using Org Babel and embedded > functions that are described and later interpolated into the > script=2E Just that I can do that on the higher level rich attributes > and references and relations to other functions=2E As humans we are so > late with literate programming=2E That would help so many other people= =2E >=20 > > I suggest that outline-minor-mode be also refactored and revamped, as = I have > > seen much additional code on top of it (outline-magic, orgstruct, > > outshine)=2E >=20 > For now, those features which you asked for, already exist, you may > try customizations, you are just few minutes away from having > highlighting, folding is already there, and defining headlines=2E >=20 >=20 > --=20 > Jean >=20 > Take action in Free Software Foundation campaigns: > https://www=2Efsf=2Eorg/campaigns >=20 > Sign an open letter in support of Richard M=2E Stallman > https://stallmansupport=2Eorg/ > https://rms-support-letter=2Egithub=2Eio/ >=20 >