Did some more thinking on this and trying to set up outline-heading-alist for texinfo, so I can get headlines similar to org mode.
Have seen people trying to do this lately but there is some problem with it that I cannot understand right now. (defvar gilgamesh-texinfo-hdlevels '( ("@chapter" . 2) ("@section" . 3) ("@subsection" . 4) ("@subsubsection" . 5) ;; -------------------------------------------------- ("@unnumbered" . 2) ("@unnumberedsec" . 3) ("@unnumberedsubsec" . 4) ("@unnumberedsubsubsec" . 5) ;; -------------------------------------------------- ("@appendix" . 2) ("@appendixsec" . 3) ("@appendixsubsec" . 4) ("@appendixsubsubsec" . 5) ;; -------------------------------------------------- ("majorheading" 2) ;; -------------------------------------------------- ("chapheading" 2) ("heading" 3) ("subheading" 4) ("subsubheading" 5) ;; -------------------------------------------------- ("@uchap" . 2) ("@usec" . 3) ("@usubsec" . 4) ("@usubsubsec" . 5) )) (setq-local outline-heading-alist ;; We should merge `outline-heading-alist' and ;; `texinfo-section-list'. But in the mean time, let's ;; just generate one from the other. (mapcar (lambda (x) (cons (concat "@" (car x)) (cadr x))) gilgamesh-texinfo-hdlevels)) ;;(defun gilgamesh-faddeev-texinfo () ;; "todo" ;; (add-hook 'texinfo-mode-hook #'gilgamesh-texinfo-hdlevels) ) > Sent: Thursday, May 13, 2021 at 12:11 AM > From: "Christopher Dimech" <dim...@gmx.com> > To: "Ihor Radchenko" <yanta...@gmail.com> > Cc: "Tim Cross" <theophil...@gmail.com>, emacs-orgmode@gnu.org > Subject: Re: Highlighting and Background Colour for Source Code > > Have been looking at texinfo-mode a bit to see how to set > outline-heading-alist. > But not been very successful. Could need some help. > > > Sent: Thursday, May 13, 2021 at 12:08 AM > > From: "Ihor Radchenko" <yanta...@gmail.com> > > To: "Christopher Dimech" <dim...@gmx.com> > > Cc: "Tim Cross" <theophil...@gmail.com>, emacs-orgmode@gnu.org > > Subject: Re: Highlighting and Background Colour for Source Code > > > > Christopher Dimech <dim...@gmx.com> writes: > > > Suppose I have an elisp file and I change to org-mode by hitting "M-x > > > org-mode". > > > The code does not get highlighted because it is not embedded within > > > org-babel > > > construct. > > > > > > If I have a programming language file with some org-mode heading commands > > > in it, > > > and change to org-mode, it would be neat to have language highlighting > > > available. > > > > Hmm. What about polymode [1]? > > > > [1] https://github.com/polymode/polymode > > > > > >