From: Christopher Dimech <dimech@gmx.com>
To: Christopher Dimech <dimech@gmx.com>
Cc: Tim Cross <theophilusx@gmail.com>,
emacs-orgmode@gnu.org, Ihor Radchenko <yantar92@gmail.com>
Subject: Re: Highlighting and Background Colour for Source Code
Date: Wed, 12 May 2021 14:27:41 +0200 [thread overview]
Message-ID: <trinity-1ab3a4ba-453b-4614-ab6d-8d156f011644-1620822461538@3c-app-mailcom-bs13> (raw)
In-Reply-To: <trinity-4a6b4c51-ed9d-4789-ad68-239f287034a1-1620821509086@3c-app-mailcom-bs13>
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" <dimech@gmx.com>
> To: "Ihor Radchenko" <yantar92@gmail.com>
> Cc: "Tim Cross" <theophilusx@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" <yantar92@gmail.com>
> > To: "Christopher Dimech" <dimech@gmx.com>
> > Cc: "Tim Cross" <theophilusx@gmail.com>, emacs-orgmode@gnu.org
> > Subject: Re: Highlighting and Background Colour for Source Code
> >
> > Christopher Dimech <dimech@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
> >
> >
>
>
prev parent reply other threads:[~2021-05-12 12:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-10 3:48 Highlighting and Background Colour for Source Code Christopher Dimech
2021-05-11 4:50 ` Tim Cross
2021-05-11 5:13 ` Christopher Dimech
2021-05-11 5:50 ` Tim Cross
2021-05-11 6:39 ` Christopher Dimech
2021-05-12 12:08 ` Ihor Radchenko
2021-05-12 12:11 ` Christopher Dimech
2021-05-12 12:27 ` Christopher Dimech [this message]
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.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=trinity-1ab3a4ba-453b-4614-ab6d-8d156f011644-1620822461538@3c-app-mailcom-bs13 \
--to=dimech@gmx.com \
--cc=emacs-orgmode@gnu.org \
--cc=theophilusx@gmail.com \
--cc=yantar92@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 public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
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).