emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Leslie Watter <leslie@watter.net>
To: Marcin Borkowski <mbork@mbork.pl>
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 17:37:25 -0300	[thread overview]
Message-ID: <CAKoz4g=4_RV0=qwmYk8jULzbqaFSSnQddhXGhfGku3KUm=PTkg@mail.gmail.com> (raw)
In-Reply-To: <87ftz4ucqf.fsf@mbork.pl>

[-- Attachment #1: Type: text/plain, Size: 1181 bytes --]

Hi Marcin,

You can configure this behaviour of org-mode (setting the identation of
source blocks to 0) using the following code: (put it in your emacs config
file)

(setq org-edit-src-content-indentation 0)

Hope it helps.

Cheers,

LEslie


On Thu, Aug 23, 2018 at 4:05 PM Marcin Borkowski <mbork@mbork.pl> wrote:

>
> On 2018-08-22, at 14:52, Nick Dokos <ndokos@gmail.com> wrote:
>
> > Marcin Borkowski <mbork@mbork.pl> writes:
> >
> >> Hi all,
> >>
> >> I hoped this:
> >>
> >> #+begin_src diff
> >>   @@ -1,5 +1,5 @@
> >>   -lorem
> >>   +Lorem
> >>    ipsum
> >>    dolor
> >>    sit
> >>   -amet
> >>   +amet.
> >> #+end_src
> >>
> >> would Just Work™, i.e., the diff would be font-locked like in
> >> diff-mode.  Well, it is not.  How do I convince Org-mode to color my
> >> diffs?
> >>
> >
> > By somehow elimintating the indentation perhaps?
>
> Thanks Nick (and John, in previous message).  This works indeed.
>
> However, double C-c ' on the source block reintroduces the
> indentation...
>
> Still, I can live with it as-is.
>
> Best,
>
> --
> Marcin Borkowski
> http://mbork.pl
>
>

-- 
Leslie H. Watter

[-- Attachment #2: Type: text/html, Size: 2166 bytes --]

  reply	other threads:[~2018-08-23 20:44 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 [this message]
2018-08-23 22:25       ` Samuel Wales

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='CAKoz4g=4_RV0=qwmYk8jULzbqaFSSnQddhXGhfGku3KUm=PTkg@mail.gmail.com' \
    --to=leslie@watter.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=mbork@mbork.pl \
    --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).