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 03:49:20 +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="16575"; 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 03:50:25 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 1lfv3w-00049k-VG for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 10 May 2021 03:50:25 +0200 Original-Received: from localhost ([::1]:58604 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lfv3v-0001KN-Kh for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 09 May 2021 21:50:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49452) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lfv3T-0001KC-Rw for help-gnu-emacs@gnu.org; Sun, 09 May 2021 21:49:55 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:42201) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lfv3R-0006Mc-QF for help-gnu-emacs@gnu.org; Sun, 09 May 2021 21:49:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1620611360; bh=j7aZ+0I6ZZvcEeeJ1yGPZkgIhLrdmgY7k6RoOQEknPc=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=TfmWGjvMf/1Rg5XxXYsfSX7o3DoRr67jCrEyu0pP0CjwVAlJlADqxsZXa1Nm/HGxw FLuXhLQnhAhiuFej6gP4Vds8z7dH50thsm9ZikfyLHEM1c3SdvMiZwo/0HlM96k3EA cAU0rQLQjeuarooP58X1076s7dEicLtCbsGNSWGs= 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 03:49:20 +0200 Importance: normal Sensitivity: Normal In-Reply-To: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:cDjNbjTegXVMaI2k2EA4vJVXThNPkUYEYl8ui40wCC0n2tdInbNz7PHk3tPeJhaLoIGpZ QYyZwKXELBwvUPZQjPfg0w+fuAGxrgFfE4HUg0wi0m9i7pogYQ884DeVR/40VuEW+ZOK5bBOi/ye kzM2FEPHC6dyR9/8XkRjv2fAahnuoZ6eJZr9xN7KAxp9UpqHz9n+nBbbSy35VrMAOHS9n8q42IYY vzQ7RKQ7bqt7Xz8x0IYfTH2GrjdPjpQzYe/jC3ZCNSAlp7L0qsqYNQXECjEWuX+3QhANCTXOybJb 9Q= X-UI-Out-Filterresults: notjunk:1;V03:K0:RoW1Px9OuBI=:ol1H3grwt0ucrjjqro/VoV waMWYkgNArTQaPTG0q8P9aXLQT8fel4b8N3UNUbGSsNezpKWbZ+LKSUiLs4pv+/3xRAzJS7k5 DrAcZ7j+cbp0dvY/UsZ1i8pb0DA7+uBshOFoBItOTntmEmU7yoaAtgyJ91+DN/fMtlWV8JrOt waSz174DrVJCNhhVfAH68uroFXfEHcUaDn04R14ADn18UUlAjzRmJdcNXEAzFcueAwIrOAFJ/ RIYUkM6jJtRL/cCr2H12OQ7YSsLknK/Wy91cnCdAlrq3uIR05/34pTEfr0CogrUIQjlNrJmYr TiIhCv3gGftXeTDsjf8nyjgpI4g7RgakKZzL09+st8GGR8lo3KP6gAJJNuf1LNeA9FL+WZC9I ys2dqjsGq0CSdWMYCikUuHda+ZzIIhr/AN5kAxRGkJXcchiDujfL71nVezOh3uvWirjbKcM1z olQkDk87BYOoZd5cm8g2ghKGvCzPfsbwSXdkew6FguKkxiAtkPBtBn7jjKt4NAolAX9sgvvyd rR5ozBEmnL7SYji9YEp7EIfG5JTKuDqEw0uikVeOdmdycvjfMSwbRU8eH+/5wvJTyc3DMrieZ 1XPIt5ILJDs6LSpR6DTPXgMQpTswVkVSRb87gm5mGCbMGOQ9e755uKrcBwKfe2/mvf5UMnMNm 7lLDKeGoEV6PNpEZLMngOlNItvGYx46l3l55gyetqZTolLsbA1uqrATB/P3zaCFPQwUr5BxPF JjjXN7nQwAK6D/iN4HtKYhCK1UMWuzCBQ28c90c8wWFQzKonwwcgQ/drVcHLn4HH+49TCV3/ Received-SPF: pass client-ip=212.227.15.18; 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:129644 Archived-At: > Sent: Monday, May 10, 2021 at 5:50 AM > From: "Jean Louis" > To: help-gnu-emacs@gnu.org > Subject: Re: outline-minor-mode and org-mode capabilities for programmin= g languages > > * Emanuel Berg via Users list for the GNU Emacs text editor [2021-05-09 20:36]> > I can think that you barely use TAB in = Emacs Lisp, but I use > > > it very frequently to indent the lines, including to indent > > > lines when region is active, and often I may use it on the > > > whole marked buffer. > > > > You barely use it, but you use it all the time ... and so do > > I :) > > Correction tip: when outline-minor-mode-cycle is TRUE, as functions > are usually anyway on the beginning of the line, the TAB works just > well to open and close the function. Here you mention a different capability, that of function hide/show. But then there is a different capability most prominent in org-mode, where you hide/show by heading. In programming languages which do not allow multi-line comments, one can use a function so that when you call it you put the asterisk on the first column of the next line, so it can be treated as a heading. Referring back to , I come from fortran where we used to hit just as we do with elisp. Fortran managed te get out of using the tab during its development of free-format. Indentation is handled by using the key, it gets you to the corr= ect indent column. you can also use enter at the beginning of the line. fortran-mode also allows you to set different indentations according to an= y fortran structure you use. For instance: (defcustom f90-do-indent 2 "Extra indentation applied to `do' region." :type 'integer :group 'f90-indent) (defcustom f90-if-indent 2 "Indentation for `if', `select', `where' and `forall' region." :type 'integer :group 'f90-indent) (defcustom f90-type-indent 2 "Indentation for `type', `interface' and `block' region." :type 'integer :group 'f90-indent) I will tell you what I have been doing regarding . As yourself, I wo= uld use when in emacs-lisp-mode, where I also introduce org type headings. I woul= d then switch to org-mode when I need to. And use in the context of org-mode, not= emacs-lisp-mode. But this switching over has downsides because 1) there is no code highligh= ting; and 2) there is no function folding. Whilst I agree that programming language modes do their thing well, and or= g-mode does its things well, the idea of headings and folding could be made to wo= rk much better for programming languages. Additionally, there could be org-minor-= mode that is specific for programming languages. The people at org-mode would = know best about the capabilities and functionalities that would entail. We cou= ld also take some information out on their implementation. We can ask what capabilities would be valuable to add, and do some more wo= rd on outline-minor-mode and possibly emacs-lisp mode. outline-minor-mode can b= e made much much better. And we can learn from other languages such as fortran f= or things like indentation. Regards Christopher > Try it. > > It is addictive. It gives clarity when working. > > Interesting is "Hide others" it hides everything else but the function > you are editing, not bad and similar to narrowing. > > > -- > Jean > > Take action in Free Software Foundation campaigns: > https://www.fsf.org/campaigns > > Sign an open letter in support of Richard M. Stallman > https://stallmansupport.org/ > https://rms-support-letter.github.io/ > > >