GNU bug report logs - #49346
headings when using sh-mode

Previous Next

Package: emacs;

Reported by: lisa-asket <at> perso.be

Date: Sat, 3 Jul 2021 03:53:02 UTC

Severity: wishlist

Tags: moreinfo

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 49346 in the body.
You can then email your comments to 49346 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#49346; Package emacs. (Sat, 03 Jul 2021 03:53:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to lisa-asket <at> perso.be:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 03 Jul 2021 03:53:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: lisa-asket <at> perso.be
To: bug-gnu-emacs <at> gnu.org
Subject: headings when using sh-mode
Date: Sat,  3 Jul 2021 02:19:25 +0200 (CEST)
[Message part 1 (text/plain, inline)]
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.


[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49346; Package emacs. (Sun, 04 Jul 2021 13:56:01 GMT) Full text and rfc822 format available.

Message #8 received at 49346 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: lisa-asket <at> perso.be
Cc: 49346 <at> debbugs.gnu.org
Subject: Re: bug#49346: headings when using sh-mode
Date: Sun, 04 Jul 2021 15:54:55 +0200
lisa-asket <at> 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




Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 04 Jul 2021 13:56:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49346; Package emacs. (Sun, 04 Jul 2021 17:19:02 GMT) Full text and rfc822 format available.

Message #13 received at 49346 <at> debbugs.gnu.org (full text, mbox):

From: lisa-asket <at> perso.be
To: "Lars Ingebrigtsen" <larsi <at> gnus.org>
Cc: 49346 <at> debbugs.gnu.org
Subject: bug#49346: headings when using sh-mode
Date: Sun,  4 Jul 2021 19:18:08 +0200 (CEST)
[Message part 1 (text/plain, inline)]
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 <at> gnus.org>
To: lisa-asket <at> perso.be
Subject: bug#49346: headings when using sh-mode
Date: 04/07/2021 15:54:55 Europe/Paris
Cc: 49346 <at> debbugs.gnu.org

lisa-asket <at> 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




[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49346; Package emacs. (Sun, 04 Jul 2021 18:40:01 GMT) Full text and rfc822 format available.

Message #16 received at 49346 <at> debbugs.gnu.org (full text, mbox):

From: lisa-asket <at> perso.be
To: lisa-asket <at> perso.be,
 "Lars Ingebrigtsen" <larsi <at> gnus.org>
Cc: 49346 <at> debbugs.gnu.org
Subject: bug#49346: headings when using sh-mode
Date: Sun,  4 Jul 2021 20:38:56 +0200 (CEST)
[Message part 1 (text/plain, inline)]
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 <at> perso.be
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Subject: bug#49346: headings when using sh-mode
Date: 04/07/2021 19:18:08 Europe/Paris
Cc: 49346 <at> 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 <at> gnus.org>
To: lisa-asket <at> perso.be
Subject: bug#49346: headings when using sh-mode
Date: 04/07/2021 15:54:55 Europe/Paris
Cc: 49346 <at> debbugs.gnu.org

lisa-asket <at> 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




[Message part 2 (text/html, inline)]

Severity set to 'wishlist' from 'normal' Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 06 Jul 2021 19:37:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#49346; Package emacs. (Tue, 10 Aug 2021 15:54:01 GMT) Full text and rfc822 format available.

Message #21 received at 49346 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: lisa-asket <at> perso.be
Cc: 49346 <at> debbugs.gnu.org
Subject: Re: bug#49346: headings when using sh-mode
Date: Tue, 10 Aug 2021 17:52:51 +0200
lisa-asket <at> 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




bug marked as fixed in version 28.1, send any further explanations to 49346 <at> debbugs.gnu.org and lisa-asket <at> perso.be Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 10 Aug 2021 15:54:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 08 Sep 2021 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 230 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.