Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn on org-indent in a chunk, when it is globally enabled #6

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions poly-org.el
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@
(or (cdr (assoc lang org-src-lang-modes))
lang))))

(defun poly-org--maybe-enable-org-indent (_)
(when (and (boundp 'org-indent-mode)
org-startup-indented)
(org-indent-mode)))

(define-hostmode poly-org-hostmode
:mode 'org-mode
:protect-syntax nil
Expand All @@ -59,6 +64,7 @@
:head-matcher "^[ \t]*#\\+begin_src .*\n"
:tail-matcher "^[ \t]*#\\+end_src"
:head-adjust-face nil
:init-functions '(poly-org--maybe-enable-org-indent)
:mode-matcher #'poly-org-mode-matcher
:indent-offset org-edit-src-content-indentation)

Expand Down