emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] How to font-lock diffs?


From: Samuel Wales
Subject: Re: [O] How to font-lock diffs?
Date: Thu, 23 Aug 2018 15:25:06 -0700

i ran into this type of thing years ago and wrote this summary in
comments to remind myself of the issues.  maybe it will be useful to
somebody.

;; when you edit a source or data block, org will by default
;; remove some leading whitespace and then add 2 spaces, so the
;; whole block in org is indented by 2.
;;
;; (the deleted rectangle seems to be the maximum amount of
;; whitespace common to all lines in each block.)
;;
;; initial tabs get converted to spaces, which breaks things.
;; example blocks get unindented during export incorrectly.
;; mistakes are possible.
;;
;; this as non-nil prevents all that.
;;
;; we EITHER unindent all and set this non-nil, OR put up with
;; stripping of leading whitespace from blocks.
;;
;; /i prefer t./ it is not possible in babel to indent without
;; having the special feature of removing the whitespace
;; rectangle.
;;
;; you can use -i to locally do t.  there isn't the reverse of
;; -i.  there are no long options.
;;
;; source blocks might actually work without indentation even
;; with the default value, but then when you edit it indents.
(setq org-src-preserve-indentation t)

-- 
The Kafka Pandemic: <http://thekafkapandemic.blogspot.com>

The disease DOES progress. MANY people have died from it. And ANYBODY
can get it at any time.

"You’ve really gotta quit this and get moving, because this is murder
by neglect." ---
<http://www.meaction.net/2017/02/03/pwme-people-with-me-are-being-murdered-by-neglect>.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]