From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leslie Watter Subject: Re: How to font-lock diffs? Date: Thu, 23 Aug 2018 17:37:25 -0300 Message-ID: References: <87muteg4xm.fsf@mbork.pl> <87zhxek1hk.fsf@alphaville.usersys.redhat.com> <87ftz4ucqf.fsf@mbork.pl> Reply-To: leslie@watter.net Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000bc5c580574203a3d" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58005) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fswSg-0002mF-Nu for emacs-orgmode@gnu.org; Thu, 23 Aug 2018 16:44:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fswML-00053h-SF for emacs-orgmode@gnu.org; Thu, 23 Aug 2018 16:37:40 -0400 Received: from mail-it0-f44.google.com ([209.85.214.44]:35559) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fswML-00053S-N4 for emacs-orgmode@gnu.org; Thu, 23 Aug 2018 16:37:37 -0400 Received: by mail-it0-f44.google.com with SMTP id 139-v6so9339529itf.0 for ; Thu, 23 Aug 2018 13:37:37 -0700 (PDT) In-Reply-To: <87ftz4ucqf.fsf@mbork.pl> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Marcin Borkowski Cc: Nick Dokos , org-mode-email --000000000000bc5c580574203a3d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 wrote: > > On 2018-08-22, at 14:52, Nick Dokos wrote: > > > Marcin Borkowski 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=E2=84=A2, 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 > > --=20 Leslie H. Watter --000000000000bc5c580574203a3d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Marcin,

You can configure this behav= iour of org-mode (setting the identation of source blocks to 0) using the f= ollowing 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 Bo= rkowski <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
>>=C2=A0 =C2=A0@@ -1,5 +1,5 @@
>>=C2=A0 =C2=A0-lorem
>>=C2=A0 =C2=A0+Lorem
>>=C2=A0 =C2=A0 ipsum
>>=C2=A0 =C2=A0 dolor
>>=C2=A0 =C2=A0 sit
>>=C2=A0 =C2=A0-amet
>>=C2=A0 =C2=A0+amet.
>> #+end_src
>>
>> would Just Work=E2=84=A2, i.e., the diff would be font-locked like= in
>> diff-mode.=C2=A0 Well, it is not.=C2=A0 How do I convince Org-mode= to color my
>> diffs?
>>
>
> By somehow elimintating the indentation perhaps?

Thanks Nick (and John, in previous message).=C2=A0 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://mbo= rk.pl



--
Leslie H. Wat= ter
--000000000000bc5c580574203a3d--