all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: lisa-asket@perso.be
To: "Yuri Khan" <yuri.v.khan@gmail.com>,
	"Emanuel Berg" <moasenwood@zoho.eu>,
	"help-gnu-emacs" <help-gnu-emacs@gnu.org>
Subject: headings in sh-mode
Date: Fri,  2 Jul 2021 22:32:39 +0200 (CEST)	[thread overview]
Message-ID: <ea-mime-60df77e7-8e8-30d5064b@www-8.mailo.com> (raw)
In-Reply-To: <CAP_d_8U34BzR+JocYPG+Fb1f+_5mufyN3mEEQvb-_8Vva4KmPA@mail.gmail.com>

>From: Yuri Khan <yuri.v.khan@gmail.com>
>To: Emanuel Berg <moasenwood@zoho.eu>;
>   help-gnu-emacs <help-gnu-emacs@gnu.org>
>Subject: Re: headings in sh-mode
>Date: 02/07/2021 22:02:57 Europe/Paris

>On Sat, 3 Jul 2021 at 01:34, Emanuel Berg via Users list for the GNU
>Emacs text editor <help-gnu-emacs@gnu.org> wrote:

>> But honestly... you don't need a header hierarchy like this
>> for a shell script, they should be simple and short (well, as
>> short as possible, and long scripts aren't advanced, really,
>> they are just long).

>This. If your shell script is so long and/or nested that you want
>folding, then you’re much better served by rewriting in a proper
>programming language. My personal rule of thumb is, rewrite if you
>want to do any arithmetics, or arrays, or the script no longer fits in
>a single screenful.



I am not arguing on the merits or otherwise of header folding.



Only pointing out that headings using outline-minor-mode should be

made to work correctly as expected by the minor mode, irrespective

of whether a user ultimately uses the functionality or not.



Such rational does make sense actually.  



>A similar point goes for other programming languages: If you want to
>fold parts of a function, the part you want to fold is a candidate for
>extraction. If you want to hide some functions while looking at
>others, maybe split your module.

>A working folding facility can be a painkiller when working with
>existing code. But don’t become addicted to painkillers.




  reply	other threads:[~2021-07-02 20:32 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-02  1:46 headings in sh-mode lisa-asket
2021-07-02  2:07 ` Stefan Monnier via Users list for the GNU Emacs text editor
2021-07-02  3:13   ` lisa-asket
2021-07-02 13:52     ` Stefan Monnier
2021-07-02 17:54       ` lisa-asket
2021-07-02 18:34         ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-02 19:58           ` lisa-asket
2021-07-02 20:44             ` Stefan Monnier via Users list for the GNU Emacs text editor
2021-07-02 20:56               ` lisa-asket
2021-07-03  1:08                 ` Stefan Monnier
2021-07-02 20:02           ` Yuri Khan
2021-07-02 20:32             ` lisa-asket [this message]
2021-07-02 23:11             ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-02 20:43           ` Stefan Monnier via Users list for the GNU Emacs text editor
2021-07-02 20:53             ` lisa-asket
2021-07-02 23:14               ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-07-08 20:56               ` Nick Dokos
2021-07-02 23:13             ` Emanuel Berg via Users list for the GNU Emacs text editor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ea-mime-60df77e7-8e8-30d5064b@www-8.mailo.com \
    --to=lisa-asket@perso.be \
    --cc=help-gnu-emacs@gnu.org \
    --cc=moasenwood@zoho.eu \
    --cc=yuri.v.khan@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.