emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Samuel Wales <samologist@gmail.com>
To: leslie@watter.net
Cc: Nick Dokos <ndokos@gmail.com>, org-mode-email <emacs-orgmode@gnu.org>
Subject: Re: How to font-lock diffs?
Date: Thu, 23 Aug 2018 15:25:06 -0700	[thread overview]
Message-ID: <CAJcAo8sCDnpRYLfUADo_7gXtGFL2Mf0VihcRpGk=Z784-3pOKw@mail.gmail.com> (raw)
In-Reply-To: <CAKoz4g=4_RV0=qwmYk8jULzbqaFSSnQddhXGhfGku3KUm=PTkg@mail.gmail.com>

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	other threads:[~2018-08-23 22:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-22  8:51 How to font-lock diffs? Marcin Borkowski
2018-08-22 12:44 ` John Kitchin
2018-08-22 12:52 ` Nick Dokos
2018-08-23 19:03   ` Marcin Borkowski
2018-08-23 20:37     ` Leslie Watter
2018-08-23 22:25       ` Samuel Wales [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='CAJcAo8sCDnpRYLfUADo_7gXtGFL2Mf0VihcRpGk=Z784-3pOKw@mail.gmail.com' \
    --to=samologist@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=leslie@watter.net \
    --cc=ndokos@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).