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

2018-08-23 Thread Samuel Wales
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

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

2018-08-23 Thread Leslie Watter
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

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

2018-08-23 Thread Marcin Borkowski
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™, i.e., the diff would be

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

2018-08-22 Thread John Kitchin
This does Just Work™ for me if I remove the two spaces at the front of each line. I never use the indentation, so I am not sure what the interplay there is. John --- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon

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

2018-08-22 Thread Nick Dokos
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™, i.e., the diff would be font-locked like in > diff-mode. Well, it is not. How do I convince

[O] How to font-lock diffs?

2018-08-22 Thread Marcin Borkowski
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? Best, -- Marcin Borkowski