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 12:01:25 +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="33083"; 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 12:03:20 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 1lg2kx-0008Ux-7R for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 10 May 2021 12:03:19 +0200 Original-Received: from localhost ([::1]:47258 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lg2kw-0001Ef-83 for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 10 May 2021 06:03:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38468) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lg2jj-0000di-LE for help-gnu-emacs@gnu.org; Mon, 10 May 2021 06:02:04 -0400 Original-Received: from mout.gmx.net ([212.227.17.21]:39599) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lg2je-0001EZ-IA for help-gnu-emacs@gnu.org; Mon, 10 May 2021 06:02:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1620640885; bh=H4Hh/PyTs/YB/6lv6PLAcH60HgsKUXqIIENZiK27u5o=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=SlyYJV4/tSbnZewoG/5xNN0Gnj2yvclDnGTUnyF4kGlkaJozHqccicxtQO/dG7MlR e2oYsPHlIDD/fjSTYPKTsLeYVpJ8azFHWkIRIfwOF911ql3MpIWelP2ofHTzIjx4gO tv3hkFRnObTQEiPWN7wt97Yc9PB+FqZyGOsrnf+E= 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-bs03.server.lan [172.19.170.169]) (via HTTP); Mon, 10 May 2021 12:01:25 +0200 Importance: normal Sensitivity: Normal In-Reply-To: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:4/BHYOowNp2SvkHfjLf2elNT+2pFw10EOFvDRMfGBIoAkNhsL+uLx1SxE1b13GsaPXnTn Fj+vJRXHFRHycK6izvIChUUEHy48stPdCp9cGcY3Mz3MECspXKddDLwixV0Ih1/tag5pcEKDq9KW vJmhWjvD7eiKbL0BKu0uxBcBgzGajx5SR3/89zSTD7b+UtMXhPzliLTK8lK7Ku2TFA31U93Bl8or WrbhJFgx5WBQ7L4rL8dY3M9lDu4GrmzuQ4phcg/uFFiNvEE8j5UgMbNkT8Sy0g8Un8c3JbRGLWpQ HU= X-UI-Out-Filterresults: notjunk:1;V03:K0:nafCt7MG1Dk=:FAVe70rWgF0mQJQTIF7/zw fMZOcUbCtxXH/4ZfkiSciRpS1tKXLOfJL4h+31lFH7gNfSRvZp8sf/zS0T6RQglaf/W8PUHOW lOlihtJH24QcK/1cVqej2BBxJXogFKXrNSa/kCYBC5TTVYaOO80iU76+14y/9fIb8bZ4J40u4 8w9DNUGK+wA3Kx+kpuCesUDODbyAeWum4qAj+7NYD8w1kD3I0VgLoMsI1ZJhvBratlyLHMY+t UaOJjqjkwSYHxK8vmAoFWxFROlj+PBO/+360biC71k7J5MSKii460simMc2+zaaCoOqZbwOAM KZdwDH/Uycprn4SZsK0pFsb0K1lq9ulB4l5V4H/yfDB4/aXfXOe/I3j6l98alHQLozEZ4Km6n MLzXl9FSOoEPdf7VItOsuDRrWhi1ylwL7pmfgRyRceoKPWF+XeU0+7WwPtxfFFKip+mkCAKo3 vok5ODPWGDGwGMrzXE0KG9mmdeHtw8XEG79y70Y5bKl1drY0zpCh43hUsoHvfJAvRWvss3/NN zG8aA8eXL7bTEV8aYPIdORj0AtJja18q6v3DOyfjWhM+jV1nkrciDj2umeDe89+pgYNJFnQUx meAHJAt8CN3tNcCisv2YRays2s/+hu+h8fbGSN9ShTjL82AmFNxUWEtj3VSXVqTKm4IXlmYkk E8DNFTL8bRVECZVwumi0YxzcHpySBuBiVbxyZ22hsww7ho6deCS7QRN6T+ByTh+q//4XSs/0f omtnkcz2CSFoRnNT1XQyFGKpYo7rejx4wsk2qxMGt7xGqAfHs9XKX5UcQiJaLOLxLm0DZE/f Received-SPF: pass client-ip=212.227.17.21; 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:129659 Archived-At: > Sent: Monday, May 10, 2021 at 9:31 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 11:32]: > > > There are already other packages, I have been testing it, and they > > > worked similar to outline-minor-mode and could fold things=2E > >=20 > > Folding of functions is good, folding by headings not so good=2E =20 >=20 > I still think you have to verify outline-heading-alist as that is > where you define headings=2E I just did it on my side and it works > well=2E=20 >=20 > ;;;; =E2=86=9D THIS IS MY STYLE OF A HEADING in Emacs Lisp >=20 > I like it that way, and I have only defined one level, as I don't need > more in that mode=2E >=20 > In that mode it is: >=20 > outline-heading-alist =E2=87=92 '((";;;; =E2=86=9D" =2E 2)) >=20 > As simple as that=2E >=20 > See my video demonstration here below=2E >=20 > The Power of Outline Minor Mode for Emacs > https://hyperscope=2Elink/3/7/2/7/9/The-Power-of-Outline-Minor-Mode-for-= Emacs-37279=2Ehtml >=20 > > How about extending it to subheadings like org-mode=2E It is a good i= dea > > to use the comment declaration for defining headings, and also use * f= or > > heading levels as in org-mode=2E For languages with multiline comment= s > > I simply used *, then changed to org-mode=2E In elisp I made a multil= ine > > comment function=2E > >=20 > > For texinfo, which has multi-line comment capability I have been doing > >=20 > > @ignore > > * Heading > > @end ignore > >=20 > > @ignore > > ** Subheading > > @end ignore >=20 > No need for that, please just see description of variable: > 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 > Also, when I need re-numbering of lists like in Org mode, invoke > orgalist-mode when I need that=2E In general, many Org functions could > be useful in other modes, would they be split into separate packages=2E >=20 > > They should always go with the comment declaration for the language=2E > > Most likely good, but then one cannot easily switch to org-mode=2E > > Then again, if the topics of discussion are resolved, there wauld > > not me much need to change to org-mode for certain org-mode > > operations=2E >=20 > I don't believe Org mode is solution for everything=2E In my Hyperscope > system and also Website Revision System specific system, I have no > limitation on what mode or text processor to use=2E=20 No, only when one wants org-like features=2E The plan should be that outl= ine-minor-mode handles them, which you have outlined=2E > Org mode IS bloated=2E It has everything what one needs and much more > what I don't need=2E It is based on Outline mode and thus I like often > invoking Outline mode as that satisfies basic needs without fiddling > with Org mode keybindings and whatever other additional not necessary > functions=2E Surely I do use Org mode, but when it is needed=2E Isee that org-mode should not have handled programming languages=2E That should have been a new programming major mode for multi-language coding=2E I much like the original idea of org-mode and keeping close to that=2E =20 > When you mention "Org" I think of bloated number of Org packages and > functions=2E That is why I asked, what do you think you need? You said > highlighting, headings, folding, so that is about all available in > outline-minor-mode I found a number of packages that extend outline-mode, making things=20 complicated=2E =20 > > I agree with you up to a point=2E For starters let's just clean > > things up with the capabilities that are already implemented=2E > > Literate schemes are good for organisational purposes, but for > > programming, literate schemes make everything much more cumbersome, > > and ultimately yield to total disaster in terms of efficiency in > > going through the code base=2E One thing that does help is self > > documuntation if kept brief within the code file=2E >=20 > Disaster comes with inefficient or non-integrated implementation=2E How > I see Emacs in general, it is a pile of useful stuff, on which pile, > more piles are added on top, with more stuff on top of the top, of the > top of the piles of piles=2E=20 >=20 > We have all function well described, indexed, findable, locatable, > usable in programming, we have it all, but IMHO integration is not > adequate for my standard=2E I have expected more of computing in 21st > century=2E Welcome to the club of forward thinking=2E There is so much work to do and so much planning=2E I have agreed with Eric Raymond when he said that even an idiot can code=2E > I would expect something like, to tell by speech to computer: >=20 > "=2E=2E=2ETHEN GIVE ME ALL BUFFER AS A STRING=2E=2E=2E" which would inte= rpolate > into necessary functions=2E >=20 > "=2E=2E=2ETHEN REPLACE ALL OCCURENCES OF THE FOLLOWING=2E=2E=2E" (type t= he string) > and computer asks "With what do you want to replace it?" then type the > replacement=2E And then computer would ask for various possible > mischievous effects, and would correct programmer, and in the same > time find similar functions in other 10000 Emacs packages or for any > kind of programming language that could be related to it=2E It would > conduct database queries locally and remotely=2E >=20 > How about tag based programming? Just think what you want to do, and > other tags appear=2E Like STRING --- CUT, FIRST PART, LAST PART, FIND > ANYWHERE IN THE STRING, SPLIT, CONVERT TO LIST, CHARS, or LIST -- > REMOVE DUPLICATES, REVERSE etc=2E Tags could be shown on screen, user > just clicks on it and decides relations, something similar to=20 > https://scratch=2Emit=2Eedu -- where children program animations=2E More > literate, more meanings, just ideas and intentions that result in a > program=2E=20 Too much literate and you loose conciseness=2E As in mathematics, if thin= gs become too literate you would not be able to see a proof you can understan= d in a few pages=2E A more mathematical approach to things would help in dr= amatic ways=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 >=20 >