polymode / poly-org

Polymode for org-mode
57 stars 12 forks source link

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

Closed dvzubarev closed 5 years ago

dvzubarev commented 5 years ago

Otherwise source code would be misaligned with other text around. There is a case when org-indent is disabled globally, i.e. org-startup-indented is nil, but org-indent is enabled per file via org-header #+STARTUP: indent. I don't know how to handle this case, since I can't get local variables of the host buffer from the hook poly-org--maybe-enable-org-indent.

vspinu commented 5 years ago

Sorry, I missed this pull.

Could you provide an example of the problem? What does it mean miss-aligned?

There is a case when org-indent is disabled globally, i.e. org-startup-indented is nil, but org-indent is enabled per file via org-header #+STARTUP: indent.

The way this should be done is by simply adding org-indent-mode to the polymode-move-these-minor-modes-from-base-buffer.

vspinu commented 5 years ago

Nevermind, I figured it out. Will fix in a minute.