* Changing org-block background with org-src-fontify-natively
@ 2015-12-26 19:09 Karl Voit
2015-12-26 21:17 ` Karl Voit
0 siblings, 1 reply; 25+ messages in thread
From: Karl Voit @ 2015-12-26 19:09 UTC (permalink / raw)
To: emacs-orgmode
Hi!
,----[ my current settings for org-block ]
| (defface org-block
| ;; defface org-block-background was removed from org:
| ;; http://emacs.stackexchange.com/questions/14824/org-block-background-font-not-having-effect
| '((t (:background "#000000")))
| "Face used for the source block background.")
|
| (setq org-src-fontify-natively t)
`----
With this, I get the #000000 background for blocks like example,
quote, and src. If I do specify a src type like "sh", I guess that
org-src-fontify-natively overrides my setting. At least I get the
effect that with a given src type, the background is not #000000 but
the pre-defined background of my theme (wombat).
So, is there a way to modify (only) the background colour also for
source blocks with a given type and active org-src-fontify-natively?
Thanks!
--
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
> get Memacs from https://github.com/novoid/Memacs <
https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Changing org-block background with org-src-fontify-natively
2015-12-26 19:09 Changing org-block background with org-src-fontify-natively Karl Voit
@ 2015-12-26 21:17 ` Karl Voit
2015-12-27 5:55 ` Xebar Saram
0 siblings, 1 reply; 25+ messages in thread
From: Karl Voit @ 2015-12-26 21:17 UTC (permalink / raw)
To: emacs-orgmode
* Karl Voit <devnull@Karl-Voit.at> wrote:
>
> So, is there a way to modify (only) the background colour also for
> source blocks with a given type and active org-src-fontify-natively?
Addendum:
https://stackoverflow.com/a/30139612 shows my situation whereas the
setup of John Kitchin https://www.youtube.com/watch?v=N7AaKHRd9uw
seems to have solved my issue: org-src-fontify-natively combined
with a different background colour.
--
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
> get Memacs from https://github.com/novoid/Memacs <
https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Changing org-block background with org-src-fontify-natively
2015-12-26 21:17 ` Karl Voit
@ 2015-12-27 5:55 ` Xebar Saram
2015-12-27 9:42 ` Karl Voit
0 siblings, 1 reply; 25+ messages in thread
From: Xebar Saram @ 2015-12-27 5:55 UTC (permalink / raw)
To: Karl Voit; +Cc: org mode
[-- Attachment #1: Type: text/plain, Size: 1165 bytes --]
Hi all
so i have zero technical skills or knowledge, but i have been looking for a
way to have a different background in org-src blocks so that bash
backgrounds will have a black color, lisp a white color etc.
from what i understand (but i may be totally off here) Karl, thats what
your trying to achieve? did you succeed in that?
does any one have this working in his config and willing to share?
thx!
Z
On Sat, Dec 26, 2015 at 11:17 PM, Karl Voit <devnull@karl-voit.at> wrote:
> * Karl Voit <devnull@Karl-Voit.at> wrote:
> >
> > So, is there a way to modify (only) the background colour also for
> > source blocks with a given type and active org-src-fontify-natively?
>
> Addendum:
>
> https://stackoverflow.com/a/30139612 shows my situation whereas the
> setup of John Kitchin https://www.youtube.com/watch?v=N7AaKHRd9uw
> seems to have solved my issue: org-src-fontify-natively combined
> with a different background colour.
>
> --
> mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
> > get Memacs from https://github.com/novoid/Memacs <
>
> https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on
> github
>
>
>
[-- Attachment #2: Type: text/html, Size: 2071 bytes --]
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Changing org-block background with org-src-fontify-natively
2015-12-27 5:55 ` Xebar Saram
@ 2015-12-27 9:42 ` Karl Voit
2016-01-03 17:06 ` John Kitchin
0 siblings, 1 reply; 25+ messages in thread
From: Karl Voit @ 2015-12-27 9:42 UTC (permalink / raw)
To: emacs-orgmode
* Xebar Saram <zeltakc@gmail.com> wrote:
>
> Hi all
Hi Xebar!
> so i have zero technical skills or knowledge, but i have been looking for a
> way to have a different background in org-src blocks so that bash
> backgrounds will have a black color, lisp a white color etc.
> from what i understand (but i may be totally off here) Karl, thats what
> your trying to achieve?
Almost: I want to set the background colour of all source blocks to
the same colour so that I can clearly distinguish non-blocks to
source code.
> did you succeed in that?
Not yet.
--
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
> get Memacs from https://github.com/novoid/Memacs <
https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Changing org-block background with org-src-fontify-natively
2015-12-27 9:42 ` Karl Voit
@ 2016-01-03 17:06 ` John Kitchin
2016-01-12 9:52 ` Karl Voit
0 siblings, 1 reply; 25+ messages in thread
From: John Kitchin @ 2016-01-03 17:06 UTC (permalink / raw)
To: Karl Voit; +Cc: emacs-orgmode@gnu.org
[-- Attachment #1: Type: text/plain, Size: 1248 bytes --]
What do you have org-block-background set to?
I use the leuven theme, which gives this a light yellow background for
me.
John
-----------------------------------
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu
On Sun, Dec 27, 2015 at 4:42 AM, Karl Voit <devnull@karl-voit.at> wrote:
> * Xebar Saram <zeltakc@gmail.com> wrote:
> >
> > Hi all
>
> Hi Xebar!
>
> > so i have zero technical skills or knowledge, but i have been looking
> for a
> > way to have a different background in org-src blocks so that bash
> > backgrounds will have a black color, lisp a white color etc.
> > from what i understand (but i may be totally off here) Karl, thats what
> > your trying to achieve?
>
> Almost: I want to set the background colour of all source blocks to
> the same colour so that I can clearly distinguish non-blocks to
> source code.
>
> > did you succeed in that?
>
> Not yet.
>
> --
> mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
> > get Memacs from https://github.com/novoid/Memacs <
>
> https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on
> github
>
>
>
[-- Attachment #2: Type: text/html, Size: 2411 bytes --]
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Changing org-block background with org-src-fontify-natively
2016-01-03 17:06 ` John Kitchin
@ 2016-01-12 9:52 ` Karl Voit
2016-01-12 11:37 ` John Kitchin
0 siblings, 1 reply; 25+ messages in thread
From: Karl Voit @ 2016-01-12 9:52 UTC (permalink / raw)
To: emacs-orgmode
* John Kitchin <jkitchin@andrew.cmu.edu> wrote:
> What do you have org-block-background set to?
There is no org-block-background in my setup: C-h v org-block-<TAB>
only offers org-block-entry-blocking and org-block-regexp.
Org-mode version 8.3.2 (release_8.3.2-200-gc2eeac)
> I use the leuven theme, which gives this a light yellow background for
> me.
Thought so.
I am using (load-theme 'wombat t) these days which I want to keep.
This is why I tried to accomplish the background colour with
separate commands and not by choosing a theme.
--
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
> get Memacs from https://github.com/novoid/Memacs <
https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Changing org-block background with org-src-fontify-natively
2016-01-12 9:52 ` Karl Voit
@ 2016-01-12 11:37 ` John Kitchin
2016-01-12 11:53 ` Karl Voit
0 siblings, 1 reply; 25+ messages in thread
From: John Kitchin @ 2016-01-12 11:37 UTC (permalink / raw)
To: Karl Voit; +Cc: emacs-orgmode
I halso have no org-block-background in my setup: C-h v org-block-<TAB>!
Are faces supposed to show as variable?
in my setup, this is defined in org-faces.
Maybe you can do something as mundane as
(set-face-background 'org-block-background "plum2")
in your init file.
Maybe
Karl Voit writes:
> * John Kitchin <jkitchin@andrew.cmu.edu> wrote:
>> What do you have org-block-background set to?
>
> There is no org-block-background in my setup: C-h v org-block-<TAB>
> only offers org-block-entry-blocking and org-block-regexp.
>
> Org-mode version 8.3.2 (release_8.3.2-200-gc2eeac)
>
>> I use the leuven theme, which gives this a light yellow background for
>> me.
>
> Thought so.
>
> I am using (load-theme 'wombat t) these days which I want to keep.
> This is why I tried to accomplish the background colour with
> separate commands and not by choosing a theme.
--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Changing org-block background with org-src-fontify-natively
2016-01-12 11:37 ` John Kitchin
@ 2016-01-12 11:53 ` Karl Voit
2016-01-12 13:26 ` John Kitchin
0 siblings, 1 reply; 25+ messages in thread
From: Karl Voit @ 2016-01-12 11:53 UTC (permalink / raw)
To: emacs-orgmode
* John Kitchin <jkitchin@andrew.cmu.edu> wrote:
> I halso have no org-block-background in my setup: C-h v org-block-<TAB>!
>
> Are faces supposed to show as variable?
I have no clue. Unfortunately, my elisp knowledge is very small.
> in my setup, this is defined in org-faces.
>
> Maybe you can do something as mundane as
> (set-face-background 'org-block-background "plum2")
> in your init file.
This results in: "set-face-attribute: Invalid face:
org-block-background"
--
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
> get Memacs from https://github.com/novoid/Memacs <
https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Changing org-block background with org-src-fontify-natively
2016-01-12 11:53 ` Karl Voit
@ 2016-01-12 13:26 ` John Kitchin
2016-01-13 4:33 ` Nick Dokos
0 siblings, 1 reply; 25+ messages in thread
From: John Kitchin @ 2016-01-12 13:26 UTC (permalink / raw)
To: Karl Voit; +Cc: emacs-orgmode@gnu.org
[-- Attachment #1: Type: text/plain, Size: 1127 bytes --]
That is pretty weird. It should be defined in org-faces.el. What org
version are you using?
John
-----------------------------------
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu
On Tue, Jan 12, 2016 at 6:53 AM, Karl Voit <devnull@karl-voit.at> wrote:
> * John Kitchin <jkitchin@andrew.cmu.edu> wrote:
> > I halso have no org-block-background in my setup: C-h v org-block-<TAB>!
> >
> > Are faces supposed to show as variable?
>
> I have no clue. Unfortunately, my elisp knowledge is very small.
>
> > in my setup, this is defined in org-faces.
> >
> > Maybe you can do something as mundane as
> > (set-face-background 'org-block-background "plum2")
> > in your init file.
>
> This results in: "set-face-attribute: Invalid face:
> org-block-background"
>
> --
> mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
> > get Memacs from https://github.com/novoid/Memacs <
>
> https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on
> github
>
>
>
[-- Attachment #2: Type: text/html, Size: 2146 bytes --]
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Changing org-block background with org-src-fontify-natively
2016-01-12 13:26 ` John Kitchin
@ 2016-01-13 4:33 ` Nick Dokos
2016-01-13 12:27 ` John Kitchin
2016-01-14 16:59 ` Karl Voit
0 siblings, 2 replies; 25+ messages in thread
From: Nick Dokos @ 2016-01-13 4:33 UTC (permalink / raw)
To: emacs-orgmode
John Kitchin <jkitchin@andrew.cmu.edu> writes:
> That is pretty weird. It should be defined in org-faces.el. What org version are you using?
>
It was deleted in this commit:
commit f8b42e8ebeeecdef59a8a7cbc4324264a5162197
Author: Bastien Guerry <bzg@altern.org>
Date: Mon Jul 28 18:54:00 2014 +0200
Don't use an overlay for src blocks backgrounds
* org-faces.el (org-block-background): Delete.
and afaict, it does not appear in org-faces any longer.
> On Tue, Jan 12, 2016 at 6:53 AM, Karl Voit <devnull@karl-voit.at> wrote:
>
> * John Kitchin <jkitchin@andrew.cmu.edu> wrote:
> > I halso have no org-block-background in my setup: C-h v org-block-<TAB>!
> >
> > Are faces supposed to show as variable?
>
I don't think so - they are in a different name space - you need e.g.
M-x describe-face RET org-block RET
to see a face.
--
Nick
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Changing org-block background with org-src-fontify-natively
2016-01-13 4:33 ` Nick Dokos
@ 2016-01-13 12:27 ` John Kitchin
2016-01-14 16:59 ` Karl Voit
1 sibling, 0 replies; 25+ messages in thread
From: John Kitchin @ 2016-01-13 12:27 UTC (permalink / raw)
To: Nick Dokos; +Cc: emacs-orgmode
I guess that gives away I am still using 8.2.10! I have never figured
out how to get a higher version of that through
elpa/melpa/http://orgmode.org/elpa/.
Nick Dokos writes:
> John Kitchin <jkitchin@andrew.cmu.edu> writes:
>
>> That is pretty weird. It should be defined in org-faces.el. What org version are you using?
>>
>
> It was deleted in this commit:
>
> commit f8b42e8ebeeecdef59a8a7cbc4324264a5162197
> Author: Bastien Guerry <bzg@altern.org>
> Date: Mon Jul 28 18:54:00 2014 +0200
>
> Don't use an overlay for src blocks backgrounds
>
> * org-faces.el (org-block-background): Delete.
>
>
> and afaict, it does not appear in org-faces any longer.
>
>> On Tue, Jan 12, 2016 at 6:53 AM, Karl Voit <devnull@karl-voit.at> wrote:
>>
>> * John Kitchin <jkitchin@andrew.cmu.edu> wrote:
>> > I halso have no org-block-background in my setup: C-h v org-block-<TAB>!
>> >
>> > Are faces supposed to show as variable?
>>
>
> I don't think so - they are in a different name space - you need e.g.
>
> M-x describe-face RET org-block RET
>
> to see a face.
--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Changing org-block background with org-src-fontify-natively
2016-01-13 4:33 ` Nick Dokos
2016-01-13 12:27 ` John Kitchin
@ 2016-01-14 16:59 ` Karl Voit
2016-01-15 0:47 ` John Kitchin
1 sibling, 1 reply; 25+ messages in thread
From: Karl Voit @ 2016-01-14 16:59 UTC (permalink / raw)
To: emacs-orgmode
* Nick Dokos <ndokos@gmail.com> wrote:
>
> M-x describe-face RET org-block RET
With this, I see that "background" is set to the colour I want to
have.
However, what's the face-variable that defines the background of
blocks with a specified language?
Or does it interfere with my "(setq org-src-fontify-natively t)"?
It would be fine to have both: org-src-fontify-natively *and* a
background colour I can set.
--
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
> get Memacs from https://github.com/novoid/Memacs <
https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Changing org-block background with org-src-fontify-natively
2016-01-14 16:59 ` Karl Voit
@ 2016-01-15 0:47 ` John Kitchin
2016-01-15 8:35 ` Andreas Leha
0 siblings, 1 reply; 25+ messages in thread
From: John Kitchin @ 2016-01-15 0:47 UTC (permalink / raw)
To: Karl Voit; +Cc: emacs-orgmode
It doesn't sounds like there is a way to do language specific colors.
Karl Voit writes:
> * Nick Dokos <ndokos@gmail.com> wrote:
>>
>> M-x describe-face RET org-block RET
>
> With this, I see that "background" is set to the colour I want to
> have.
>
> However, what's the face-variable that defines the background of
> blocks with a specified language?
>
> Or does it interfere with my "(setq org-src-fontify-natively t)"?
>
> It would be fine to have both: org-src-fontify-natively *and* a
> background colour I can set.
--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Changing org-block background with org-src-fontify-natively
2016-01-15 0:47 ` John Kitchin
@ 2016-01-15 8:35 ` Andreas Leha
2016-06-09 15:05 ` Rasmus
0 siblings, 1 reply; 25+ messages in thread
From: Andreas Leha @ 2016-01-15 8:35 UTC (permalink / raw)
To: emacs-orgmode
Hi,
John Kitchin <jkitchin@andrew.cmu.edu> writes:
> It doesn't sounds like there is a way to do language specific colors.
> Karl Voit writes:
>> * Nick Dokos <ndokos@gmail.com> wrote:
[ ... ]
>>
>> It would be fine to have both: org-src-fontify-natively *and* a
>> background colour I can set.
I'd like to 'back' this feature request.
My Org mode experience would also benefit a lot from having source block
backgrounds again and with per-language configurable background colour.
Regards,
Andreas
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Changing org-block background with org-src-fontify-natively
2016-01-15 8:35 ` Andreas Leha
@ 2016-06-09 15:05 ` Rasmus
2016-06-10 5:24 ` Samuel W. Flint
2016-06-10 23:33 ` John Kitchin
0 siblings, 2 replies; 25+ messages in thread
From: Rasmus @ 2016-06-09 15:05 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 377 bytes --]
Andreas Leha <andreas.leha@med.uni-goettingen.de> writes:
> My Org mode experience would also benefit a lot from having source block
> backgrounds again and with per-language configurable background colour.
That’s possible with the attache patch. An example of the horrors you can
subject yourself to is also attached.
--
Lasciate ogni speranza, voi che leggete questo.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-org-src-Allow-per-language-block-face.patch --]
[-- Type: text/x-diff, Size: 2357 bytes --]
From 5d39108d319dc321af95e22c6cb25164dd61e891 Mon Sep 17 00:00:00 2001
From: Rasmus <rasmus@gmx.us>
Date: Thu, 9 Jun 2016 16:52:05 +0200
Subject: [PATCH] org-src: Allow per language block face
* lisp/org-src.el (org-src-font-lock-fontify-block):
* lisp/org.el (org-fontify-meta-lines-and-blocks-1): Allow per-block
face.
---
lisp/org-src.el | 9 ++++++---
lisp/org.el | 4 +++-
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/lisp/org-src.el b/lisp/org-src.el
index 2f96fdf..d8c0541 100644
--- a/lisp/org-src.el
+++ b/lisp/org-src.el
@@ -494,7 +494,10 @@ as `org-src-fontify-natively' is non-nil."
(when (fboundp lang-mode)
(let ((string (buffer-substring-no-properties start end))
(modified (buffer-modified-p))
- (org-buffer (current-buffer)))
+ (org-buffer (current-buffer))
+ (block-faces (let ((face-name (intern (format "org-block-%s" lang))))
+ (append (and (facep face-name) (list face-name))
+ '(org-block)))))
(remove-text-properties start end '(face nil))
(with-current-buffer
(get-buffer-create
@@ -510,12 +513,12 @@ as `org-src-fontify-natively' is non-nil."
(put-text-property
(+ start (1- pos)) (1- (+ start next)) 'face
(list :inherit (append (and new-face (list new-face))
- (list 'org-block)))
+ block-faces))
org-buffer))
(setq pos next))
;; Add the face to the remaining part of the text.
(put-text-property (1- (+ start pos)) end 'face
- '(:inherit org-block) org-buffer)))
+ (list :inherit block-faces) org-buffer)))
(add-text-properties
start end
'(font-lock-fontified t fontified t font-lock-multiline t))
diff --git a/lisp/org.el b/lisp/org.el
index 206ebad..d00de1e 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -5976,7 +5976,9 @@ by a #."
(add-text-properties beg1 block-end '(src-block t)))
(quoting
(add-text-properties beg1 (min (point-max) (1+ end1))
- '(face org-block))) ; end of source block
+ (let ((face-name (intern (format "org-block-%s" lang))))
+ (append (and (facep face-name) (list face-name))
+ '(face org-block))))) ; end of source block
((not org-fontify-quote-and-verse-blocks))
((string= block-type "quote")
(add-text-properties beg1 (min (point-max) (1+ end1)) '(face org-quote)))
--
2.8.3
[-- Attachment #3: Screenshot from 2016-06-09 16-51-27.png --]
[-- Type: image/png, Size: 70940 bytes --]
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: test.org --]
[-- Type: text/org, Size: 766 bytes --]
#+BEGIN_SRC emacs-lisp :eval never
;; setup
(set-face-attribute 'org-block nil :background
(color-darken-name
(face-attribute 'default :background) 3))
(defface org-block-R
`((t (:background ,(color-lighten-name "#455EB3" 50))))
"Face for R src blocks")
(defface org-block-emacs-lisp
`((t (:background ,(color-lighten-name "#7F5AB6" 30))))
"Face for elisp src blocks")
(defface org-block-python
`((t (:background ,(color-lighten-name "#00FF00" 30))))
"Face for python blocks")
#+END_SRC
#+BEGIN_SRC emacs-lisp :var x=1
(defun x () 1 )
#+END_SRC
#+BEGIN_SRC R
x <- function () 1
#+END_SRC
#+BEGIN_SRC python
def x:
return(1)
#+END_SRC
#+BEGIN_SRC shell
echo 1
#+END_SRC
^ permalink raw reply related [flat|nested] 25+ messages in thread
* Re: Changing org-block background with org-src-fontify-natively
2016-06-09 15:05 ` Rasmus
@ 2016-06-10 5:24 ` Samuel W. Flint
2016-06-10 5:32 ` Xebar Saram
2016-06-11 11:40 ` Rasmus
2016-06-10 23:33 ` John Kitchin
1 sibling, 2 replies; 25+ messages in thread
From: Samuel W. Flint @ 2016-06-10 5:24 UTC (permalink / raw)
To: Rasmus; +Cc: emacs-orgmode
>>>>> Rasmus writes:
R> Andreas Leha <andreas.leha@med.uni-goettingen.de> writes:
>> My Org mode experience would also benefit a lot from having
>> source block backgrounds again and with per-language configurable
>> background colour.
R> That’s possible with the attache patch. An example of the
R> horrors you can subject yourself to is also attached.
How exactly do you get the pencil instead of the #+BEGIN_SRC and
#+END_SRC?
Thanks,
Sam
--
Samuel W. Flint
4096R/266596F4
(9477 D23E 389E 40C5 2F10 DE19 68E5 318E 2665 96F4)
(λs.s s) λs.s s
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Changing org-block background with org-src-fontify-natively
2016-06-10 5:24 ` Samuel W. Flint
@ 2016-06-10 5:32 ` Xebar Saram
2016-06-11 11:40 ` Rasmus
1 sibling, 0 replies; 25+ messages in thread
From: Xebar Saram @ 2016-06-10 5:32 UTC (permalink / raw)
To: Samuel W. Flint; +Cc: org mode, Rasmus
[-- Attachment #1: Type: text/plain, Size: 274 bytes --]
On Fri, Jun 10, 2016 at 8:24 AM, Samuel W. Flint <swflint@flintfam.org>
wrote:
> How exactly do you get the pencil instead of the #+BEGIN_SRC and
> #+END_SRC?
>
and the different background colors per code block type (different
background for python. lisp etc :))
thx
Z
[-- Attachment #2: Type: text/html, Size: 791 bytes --]
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Changing org-block background with org-src-fontify-natively
2016-06-09 15:05 ` Rasmus
2016-06-10 5:24 ` Samuel W. Flint
@ 2016-06-10 23:33 ` John Kitchin
1 sibling, 0 replies; 25+ messages in thread
From: John Kitchin @ 2016-06-10 23:33 UTC (permalink / raw)
To: Rasmus; +Cc: emacs-orgmode
That is some rock-star stuff! Thanks!
Rasmus writes:
> Andreas Leha <andreas.leha@med.uni-goettingen.de> writes:
>
>> My Org mode experience would also benefit a lot from having source block
>> backgrounds again and with per-language configurable background colour.
>
> That’s possible with the attache patch. An example of the horrors you can
> subject yourself to is also attached.
--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Changing org-block background with org-src-fontify-natively
2016-06-10 5:24 ` Samuel W. Flint
2016-06-10 5:32 ` Xebar Saram
@ 2016-06-11 11:40 ` Rasmus
2016-06-11 14:44 ` Samuel W. Flint
` (2 more replies)
1 sibling, 3 replies; 25+ messages in thread
From: Rasmus @ 2016-06-11 11:40 UTC (permalink / raw)
To: emacs-orgmode
swflint@flintfam.org (Samuel W. Flint) writes:
> How exactly do you get the pencil instead of the #+BEGIN_SRC and
> #+END_SRC?
Prettify-symbols-mode, I'm using the version that will be shipped with
Emacs 25.1. Details here:
https://pank.eu/blog/pretty-babel-src-blocks.html
Xebar Saram <zeltakc@gmail.com> writes:
> and the different background colors per code block type (different
> background for python. lisp etc :))
It's documented in this patch.
http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=af463605f10459ae32cd2d8ee1f9ad0a7f333eff
Let me know if something is unclear.
> That is some rock-star stuff! Thanks!
It's Emacs after all!
Rasmus
--
Bang bang
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Changing org-block background with org-src-fontify-natively
2016-06-11 11:40 ` Rasmus
@ 2016-06-11 14:44 ` Samuel W. Flint
2016-06-12 0:30 ` Ken Mankoff
2016-06-13 12:34 ` Alan Schmitt
2 siblings, 0 replies; 25+ messages in thread
From: Samuel W. Flint @ 2016-06-11 14:44 UTC (permalink / raw)
To: Rasmus; +Cc: Org-Mode
[-- Attachment #1: Type: text/plain, Size: 492 bytes --]
>>>>> Rasmus writes:
R> swflint@flintfam.org (Samuel W. Flint) writes:
>> How exactly do you get the pencil instead of the #+BEGIN_SRC and
>> #+END_SRC?
R> Prettify-symbols-mode, I'm using the version that will be shipped
R> with Emacs 25.1. Details here:
R> https://pank.eu/blog/pretty-babel-src-blocks.html
Thank you!!
Sam
--
Samuel W. Flint
4096R/266596F4
(9477 D23E 389E 40C5 2F10 DE19 68E5 318E 2665 96F4)
(λs.s s) λs.s s
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Changing org-block background with org-src-fontify-natively
2016-06-11 11:40 ` Rasmus
2016-06-11 14:44 ` Samuel W. Flint
@ 2016-06-12 0:30 ` Ken Mankoff
2016-06-12 22:06 ` Rasmus
2016-06-13 12:34 ` Alan Schmitt
2 siblings, 1 reply; 25+ messages in thread
From: Ken Mankoff @ 2016-06-12 0:30 UTC (permalink / raw)
To: Rasmus; +Cc: emacs-orgmode
On 2016-06-11 at 07:40, Rasmus <rasmus@gmx.us> wrote:
> Prettify-symbols-mode, I'm using the version that will be shipped with
> Emacs 25.1. Details here:
>
> https://pank.eu/blog/pretty-babel-src-blocks.html
That post says,
>> It might be nice to reveal the burger whenever the cursor is on the
>> same line as the burger. I tried to get this working, but I couldn’t
>> get it working property.
Would this solve it?
http://endlessparentheses.com/new-in-emacs-25-1-have-prettify-symbols-mode-reveal-the-symbol-at-point.html
-k.
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Changing org-block background with org-src-fontify-natively
2016-06-12 0:30 ` Ken Mankoff
@ 2016-06-12 22:06 ` Rasmus
0 siblings, 0 replies; 25+ messages in thread
From: Rasmus @ 2016-06-12 22:06 UTC (permalink / raw)
To: mankoff; +Cc: emacs-orgmode
Ken Mankoff <mankoff@gmail.com> writes:
> On 2016-06-11 at 07:40, Rasmus <rasmus@gmx.us> wrote:
>> Prettify-symbols-mode, I'm using the version that will be shipped with
>> Emacs 25.1. Details here:
>>
>> https://pank.eu/blog/pretty-babel-src-blocks.html
>
> That post says,
>
>>> It might be nice to reveal the burger whenever the cursor is on the
>>> same line as the burger. I tried to get this working, but I couldn’t
>>> get it working property.
>
> Would this solve it?
>
> http://endlessparentheses.com/new-in-emacs-25-1-have-prettify-symbols-mode-reveal-the-symbol-at-point.html
No, prettify-symbols-mode allow you to remove composition whenever point
is within range of the composed symbol. It does not allow to remove
composition for the whole range of the line.
Rasmus
--
Sådan en god dansk lagereddike kan man slet ikke bruge mere
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Changing org-block background with org-src-fontify-natively
2016-06-11 11:40 ` Rasmus
2016-06-11 14:44 ` Samuel W. Flint
2016-06-12 0:30 ` Ken Mankoff
@ 2016-06-13 12:34 ` Alan Schmitt
2016-06-13 17:12 ` Rasmus
2 siblings, 1 reply; 25+ messages in thread
From: Alan Schmitt @ 2016-06-13 12:34 UTC (permalink / raw)
To: Rasmus; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 732 bytes --]
On 2016-06-11 13:40, Rasmus <rasmus@gmx.us> writes:
> swflint@flintfam.org (Samuel W. Flint) writes:
>
>> How exactly do you get the pencil instead of the #+BEGIN_SRC and
>> #+END_SRC?
>
> Prettify-symbols-mode, I'm using the version that will be shipped with
> Emacs 25.1. Details here:
>
> https://pank.eu/blog/pretty-babel-src-blocks.html
This is great, thanks a lot!
One thing I don't understand is how I reveal what is hidden by the
burger symbol. I move my cursor around, including on top of the burger,
and nothing changes. Should I run some command to reveal it?
Best,
Alan
--
OpenPGP Key ID : 040D0A3B4ED2E5C7
Monthly Athmospheric CO₂, Mauna Loa Obs. 2015-05: 403.94, 2016-05: 407.70
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Changing org-block background with org-src-fontify-natively
2016-06-13 12:34 ` Alan Schmitt
@ 2016-06-13 17:12 ` Rasmus
2016-06-14 15:23 ` Alan Schmitt
0 siblings, 1 reply; 25+ messages in thread
From: Rasmus @ 2016-06-13 17:12 UTC (permalink / raw)
To: alan.schmitt; +Cc: emacs-orgmode
Hi Alan,
Alan Schmitt <alan.schmitt@polytechnique.org> writes:
>>> How exactly do you get the pencil instead of the #+BEGIN_SRC and
>>> #+END_SRC?
>>
>> Prettify-symbols-mode, I'm using the version that will be shipped with
>> Emacs 25.1. Details here:
>>
>> https://pank.eu/blog/pretty-babel-src-blocks.html
>
> This is great, thanks a lot!
>
> One thing I don't understand is how I reveal what is hidden by the
> burger symbol. I move my cursor around, including on top of the burger,
> and nothing changes. Should I run some command to reveal it?
Indeed. That's the main selling point of prettify-symbols-mode. It might
be in Emacs-25; check if the variable prettify-symbols-unprettify-at-point
is defined. I use:
(setq prettify-symbols-unprettify-at-point 'right-edge)
If time allows, I will rewrite it as a separate mode as prettify-symbols
mode is not quite right for this purpose.
Rasmus
--
Human: An animal that complicates things more than strictly necessary
^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: Changing org-block background with org-src-fontify-natively
2016-06-13 17:12 ` Rasmus
@ 2016-06-14 15:23 ` Alan Schmitt
0 siblings, 0 replies; 25+ messages in thread
From: Alan Schmitt @ 2016-06-14 15:23 UTC (permalink / raw)
To: Rasmus; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1041 bytes --]
On 2016-06-13 19:12, Rasmus <rasmus@gmx.us> writes:
>> One thing I don't understand is how I reveal what is hidden by the
>> burger symbol. I move my cursor around, including on top of the burger,
>> and nothing changes. Should I run some command to reveal it?
>
> Indeed. That's the main selling point of prettify-symbols-mode. It might
> be in Emacs-25; check if the variable prettify-symbols-unprettify-at-point
> is defined. I use:
>
> (setq prettify-symbols-unprettify-at-point 'right-edge)
It does not exist here (on emacs 24.5.1), so I guess I need to wait till
emacs 25 ships. In the meantime it's fairly easy to temporarily turn off
prettify-symbols-mode (as it really looks good when enabled, so I still
want to use it).
> If time allows, I will rewrite it as a separate mode as prettify-symbols
> mode is not quite right for this purpose.
That would be great!
Thanks,
Alan
--
OpenPGP Key ID : 040D0A3B4ED2E5C7
Monthly Athmospheric CO₂, Mauna Loa Obs. 2015-05: 403.94, 2016-05: 407.70
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]
^ permalink raw reply [flat|nested] 25+ messages in thread
end of thread, other threads:[~2016-06-14 16:50 UTC | newest]
Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-26 19:09 Changing org-block background with org-src-fontify-natively Karl Voit
2015-12-26 21:17 ` Karl Voit
2015-12-27 5:55 ` Xebar Saram
2015-12-27 9:42 ` Karl Voit
2016-01-03 17:06 ` John Kitchin
2016-01-12 9:52 ` Karl Voit
2016-01-12 11:37 ` John Kitchin
2016-01-12 11:53 ` Karl Voit
2016-01-12 13:26 ` John Kitchin
2016-01-13 4:33 ` Nick Dokos
2016-01-13 12:27 ` John Kitchin
2016-01-14 16:59 ` Karl Voit
2016-01-15 0:47 ` John Kitchin
2016-01-15 8:35 ` Andreas Leha
2016-06-09 15:05 ` Rasmus
2016-06-10 5:24 ` Samuel W. Flint
2016-06-10 5:32 ` Xebar Saram
2016-06-11 11:40 ` Rasmus
2016-06-11 14:44 ` Samuel W. Flint
2016-06-12 0:30 ` Ken Mankoff
2016-06-12 22:06 ` Rasmus
2016-06-13 12:34 ` Alan Schmitt
2016-06-13 17:12 ` Rasmus
2016-06-14 15:23 ` Alan Schmitt
2016-06-10 23:33 ` John Kitchin
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.