* bug#49346: headings when using sh-mode
@ 2021-07-03 0:19 lisa-asket
2021-07-04 13:54 ` Lars Ingebrigtsen
0 siblings, 1 reply; 5+ messages in thread
From: lisa-asket @ 2021-07-03 0:19 UTC (permalink / raw)
To: 49346
[-- Attachment #1: Type: text/plain, Size: 666 bytes --]
Have been reviewing some functionality in a bash script that I use with my .bashrc.
I enabled `outline-minor-mode` and found that by default `sh-script` uses `*`, `**`, `***`
as headings. Because the headings are not part of comments, my bash script breaks
if I use headings in this way. Headings normally start with the comment character.
Also realised that the same colour is used for all heading levels, making it difficult to
individualise the level structure. The colours seem to change by mode, whereas it would
be more appreciated if outline-minor-mode utilises tho same set of heading level colouring
in all modes.
[-- Attachment #2: Type: text/html, Size: 755 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#49346: headings when using sh-mode
2021-07-03 0:19 bug#49346: headings when using sh-mode lisa-asket
@ 2021-07-04 13:54 ` Lars Ingebrigtsen
2021-07-04 17:18 ` lisa-asket
0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2021-07-04 13:54 UTC (permalink / raw)
To: lisa-asket; +Cc: 49346
lisa-asket@perso.be writes:
> I enabled `outline-minor-mode` and found that by default `sh-script`
> uses `*`, `** `, `***` as headings. Because the headings are not part
> of comments, my bash script breaks if I use headings in this way.
> Headings normally start with the comment character.
`sh-mode' has no support for outlining, so `outline-minor-mode' just
uses the default values for `outline-regexp'. So I guess this is a
wishlist item for adding support for outlining in `sh-mode'?
Does anybody have a suggestion for what that should be in `sh-mode', or
whether this doesn't really make sense for `sh-mode'?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#49346: headings when using sh-mode
2021-07-04 13:54 ` Lars Ingebrigtsen
@ 2021-07-04 17:18 ` lisa-asket
2021-07-04 18:38 ` lisa-asket
0 siblings, 1 reply; 5+ messages in thread
From: lisa-asket @ 2021-07-04 17:18 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 49346
[-- Attachment #1: Type: text/plain, Size: 1168 bytes --]
I have been using
# h1
# h2
# h3
This is similar to defining headers in html without ending up using long repeating symbols
such as `#####` or `*******`. The number at the end defines the headline level.
From: Lars Ingebrigtsen <larsi@gnus.org>
To: lisa-asket@perso.be
Subject: bug#49346: headings when using sh-mode
Date: 04/07/2021 15:54:55 Europe/Paris
Cc: 49346@debbugs.gnu.org
lisa-asket@perso.be writes:
> I enabled `outline-minor-mode` and found that by default `sh-script`
> uses `*`, `** `, `***` as headings. Because the headings are not part
> of comments, my bash script breaks if I use headings in this way.
> Headings normally start with the comment character.
`sh-mode' has no support for outlining, so `outline-minor-mode' just
uses the default values for `outline-regexp'. So I guess this is a
wishlist item for adding support for outlining in `sh-mode'?
Does anybody have a suggestion for what that should be in `sh-mode', or
whether this doesn't really make sense for `sh-mode'?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
[-- Attachment #2: Type: text/html, Size: 1550 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#49346: headings when using sh-mode
2021-07-04 17:18 ` lisa-asket
@ 2021-07-04 18:38 ` lisa-asket
2021-08-10 15:52 ` Lars Ingebrigtsen
0 siblings, 1 reply; 5+ messages in thread
From: lisa-asket @ 2021-07-04 18:38 UTC (permalink / raw)
To: lisa-asket, Lars Ingebrigtsen; +Cc: 49346
[-- Attachment #1: Type: text/plain, Size: 1541 bytes --]
After thinking a bit more about this, it would be better to use two ## at the beginning for headings,
such that single # is for normal headings.
## h1
## h2
## h3
From: lisa-asket@perso.be
To: Lars Ingebrigtsen <larsi@gnus.org>
Subject: bug#49346: headings when using sh-mode
Date: 04/07/2021 19:18:08 Europe/Paris
Cc: 49346@debbugs.gnu.org
I have been using
# h1
# h2
# h3
This is similar to defining headers in html without ending up using long repeating symbols
such as `#####` or `*******`. The number at the end defines the headline level.
From: Lars Ingebrigtsen <larsi@gnus.org>
To: lisa-asket@perso.be
Subject: bug#49346: headings when using sh-mode
Date: 04/07/2021 15:54:55 Europe/Paris
Cc: 49346@debbugs.gnu.org
lisa-asket@perso.be writes:
> I enabled `outline-minor-mode` and found that by default `sh-script`
> uses `*`, `** `, `***` as headings. Because the headings are not part
> of comments, my bash script breaks if I use headings in this way.
> Headings normally start with the comment character.
`sh-mode' has no support for outlining, so `outline-minor-mode' just
uses the default values for `outline-regexp'. So I guess this is a
wishlist item for adding support for outlining in `sh-mode'?
Does anybody have a suggestion for what that should be in `sh-mode', or
whether this doesn't really make sense for `sh-mode'?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
[-- Attachment #2: Type: text/html, Size: 2125 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#49346: headings when using sh-mode
2021-07-04 18:38 ` lisa-asket
@ 2021-08-10 15:52 ` Lars Ingebrigtsen
0 siblings, 0 replies; 5+ messages in thread
From: Lars Ingebrigtsen @ 2021-08-10 15:52 UTC (permalink / raw)
To: lisa-asket; +Cc: 49346
lisa-asket@perso.be writes:
> After thinking a bit more about this, it would be better to use two ## at the
> beginning for headings,
This has now been added to Emacs 28.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-08-10 15:52 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-03 0:19 bug#49346: headings when using sh-mode lisa-asket
2021-07-04 13:54 ` Lars Ingebrigtsen
2021-07-04 17:18 ` lisa-asket
2021-07-04 18:38 ` lisa-asket
2021-08-10 15:52 ` Lars Ingebrigtsen
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.