From: Heime <heimeborgia@protonmail.com>
To: Heime via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org>
Subject: Setting up new patterns for outline-minor-mode
Date: Sat, 30 Mar 2024 21:13:17 +0000 [thread overview]
Message-ID: <pNmthdBE4gwOpshO8HHI4af38e7E3yRr7QiBljTbUlxOVj1rAwiCpjJUG_fjCVbNeKSYD3H8TxCXFeSMFyW9ZHBmVr4wpgKCWAsxDtA2klQ=@protonmail.com> (raw)
How can I change outline-minor-mode with new heading patterns using
HN where N is the heading level.
Allowing Zero or more spaces before ;;;
Allowing one or more spaces between ;;; and HN.
Allowing one or more spaces between HN and TITLE
;;; H1 TITLE LEVEL 1
;;; H2 TITLE LEVEL 2
Have done the following, which works well
(defvar hglevels
'( (";;; H1" . 1) (";;; H2" . 2) (";;; H3" . 3) (";;; H4" . 4)
(";;; H5" . 5) (";;; H6" . 6) (";;; H7" . 7) (";;; H8" . 8) ))
(setq outline-regexp
(concat (regexp-opt (mapcar 'car hglevels)) "\\>"))
(setq outline-heading-alist hglevels)
(setq-local outline-level 'outline-level)))
But as soon as I apply this variation
(defvar hglevels
'( ("[ ]*;;;[ ]+H1" . 1) ("[ ]*;;; +H2" . 2) ("[ ]*;;; H3[ ]+" . 3) ("[ ]*;;;[]+H4" . 4)
("[ ]*;;;[ ]+H5" . 5) ("[ ]*;;; +H6" . 6) ("[ ]*;;; H7[ ]+" . 7) ("[ ]*;;;[]+H8" . 8) ))
reply other threads:[~2024-03-30 21:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='pNmthdBE4gwOpshO8HHI4af38e7E3yRr7QiBljTbUlxOVj1rAwiCpjJUG_fjCVbNeKSYD3H8TxCXFeSMFyW9ZHBmVr4wpgKCWAsxDtA2klQ=@protonmail.com' \
--to=heimeborgia@protonmail.com \
--cc=help-gnu-emacs@gnu.org \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).