* Re: org-block-background in 8.3.1?
@ 2015-08-20 8:33 JI, Xiang
0 siblings, 0 replies; 8+ messages in thread
From: JI, Xiang @ 2015-08-20 8:33 UTC (permalink / raw)
To: bzg; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 773 bytes --]
The thing is that while I could previously use variable-pitch-mode in the rest of org buffer and still let source code blocks inherit fixed-pitch face, now this seems to be impossible to achieve. With org-block-background face gone, even if I already set org-block face to inherit fixed-pitch, the face displayed in blocks such as #BEGIN_SRC haskell is still variable-pitch as the rest of the buffer. Only plain blocks of #BEGIN_SRC without any language specified are displayed in fixed-pitch. Any workaround for this? Thanks.
Related Stackexchange questions:
https://stackoverflow.com/questions/26290924/fontify-r-code-blocks-in-org-mode%E2%80%938
https://emacs.stackexchange.com/questions/14824/org-block-background-font-not-having-effect
[-- Attachment #2: Type: text/html, Size: 6111 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* org-block-background in 8.3.1?
@ 2015-08-12 2:31 Luke Crook
2015-08-12 2:47 ` Kyle Meyer
0 siblings, 1 reply; 8+ messages in thread
From: Luke Crook @ 2015-08-12 2:31 UTC (permalink / raw)
To: emacs-orgmode
I'm not sure if I still need to set "org-block-background" in 8.3.1.
But if I do need to continue setting this, what is the new name for "org-
block-background"?
(set-face-attribute 'org-block-background nil
:height (round (* 0.9 (face-attribute 'fixed-pitch
:height))))
(set-face-attribute 'org-block nil
:height (round (* 0.9 (face-attribute 'fixed-pitch
:height))))
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: org-block-background in 8.3.1?
2015-08-12 2:31 Luke Crook
@ 2015-08-12 2:47 ` Kyle Meyer
2015-08-12 7:44 ` Sebastien Vauban
0 siblings, 1 reply; 8+ messages in thread
From: Kyle Meyer @ 2015-08-12 2:47 UTC (permalink / raw)
To: Luke Crook; +Cc: emacs-orgmode
Luke Crook <luke@balooga.com> wrote:
> I'm not sure if I still need to set "org-block-background" in 8.3.1.
>
> But if I do need to continue setting this, what is the new name for "org-
> block-background"?
>
> (set-face-attribute 'org-block-background nil
> :height (round (* 0.9 (face-attribute 'fixed-pitch
> :height))))
> (set-face-attribute 'org-block nil
> :height (round (* 0.9 (face-attribute 'fixed-pitch
> :height))))
org-block-background was removed in f8b42e8 ("Don't use an overlay for
src blocks backgrounds", 2014-07-28) for performance reasons. I'm not
aware of anything that has been introduced in its place.
--
Kyle
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: org-block-background in 8.3.1?
2015-08-12 2:47 ` Kyle Meyer
@ 2015-08-12 7:44 ` Sebastien Vauban
2015-08-12 16:55 ` Kyle Meyer
2015-08-18 17:26 ` Bastien
0 siblings, 2 replies; 8+ messages in thread
From: Sebastien Vauban @ 2015-08-12 7:44 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Kyle Meyer <kyle-4Wn5G85RAV/QT0dZR+AlfA@public.gmane.org> writes:
> Luke Crook <luke-bul7fGZb+kRBDgjK7y7TUQ@public.gmane.org> wrote:
>> I'm not sure if I still need to set "org-block-background" in 8.3.1.
>>
>> But if I do need to continue setting this, what is the new name for "org-
>> block-background"?
>>
>> (set-face-attribute 'org-block-background nil
>> :height (round (* 0.9 (face-attribute 'fixed-pitch
>> :height))))
>> (set-face-attribute 'org-block nil
>> :height (round (* 0.9 (face-attribute 'fixed-pitch
>> :height))))
>
> org-block-background was removed in f8b42e8 ("Don't use an overlay for
> src blocks backgrounds", 2014-07-28) for performance reasons.
IIRC, we never saw a profiler report showing that it slowed down buffer
fontification in a visible way. Correct me if I'm wrong.
Really, it has been removed because of a problem when ps-print'ing an
Org buffer -- though the bug was to find in `ps-def.el' and not in Org,
as reported by Stefan Monnier [1]. It should have been fixed there
instead.
> I'm not aware of anything that has been introduced in its place.
I'm planning to reintroduce it as an optional feature. At least in my
personal Git repository, if that's not accepted in Org core.
Best regards,
Seb
[1] http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00403.html
--
Sebastien Vauban
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: org-block-background in 8.3.1?
2015-08-12 7:44 ` Sebastien Vauban
@ 2015-08-12 16:55 ` Kyle Meyer
2015-08-18 17:26 ` Bastien
1 sibling, 0 replies; 8+ messages in thread
From: Kyle Meyer @ 2015-08-12 16:55 UTC (permalink / raw)
To: Org-mode
Sebastien Vauban writes:
> Kyle Meyer writes:
>> org-block-background was removed in f8b42e8 ("Don't use an overlay for
>> src blocks backgrounds", 2014-07-28) for performance reasons.
>
> IIRC, we never saw a profiler report showing that it slowed down buffer
> fontification in a visible way. Correct me if I'm wrong.
>
> Really, it has been removed because of a problem when ps-print'ing an
> Org buffer -- though the bug was to find in `ps-def.el' and not in Org,
> as reported by Stefan Monnier [1]. It should have been fixed there
> instead.
Thank you for the background information. My comment was based solely
off the commit message for f8b42e8.
--
Kyle
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: org-block-background in 8.3.1?
2015-08-12 7:44 ` Sebastien Vauban
2015-08-12 16:55 ` Kyle Meyer
@ 2015-08-18 17:26 ` Bastien
2015-08-19 10:13 ` Sebastien Vauban
1 sibling, 1 reply; 8+ messages in thread
From: Bastien @ 2015-08-18 17:26 UTC (permalink / raw)
To: Sebastien Vauban; +Cc: public-emacs-orgmode-mXXj517/zsQ
Hi Sébastien,
Sebastien Vauban <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org>
writes:
> Really, it has been removed because of a problem when ps-print'ing an
> Org buffer -- though the bug was to find in `ps-def.el' and not in Org,
> as reported by Stefan Monnier [1]. It should have been fixed there
> instead.
Yes, indeed.
>> I'm not aware of anything that has been introduced in its place.
>
> I'm planning to reintroduce it as an optional feature. At least in my
> personal Git repository, if that's not accepted in Org core.
If you can find an implementation that does not rely on overlays,
I'm fine with it - overlays have inherent scalability issues, and
I'm reluctant using them for something as pervasive as code blocks
background.
Thanks,
--
Bastien
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: org-block-background in 8.3.1?
2015-08-18 17:26 ` Bastien
@ 2015-08-19 10:13 ` Sebastien Vauban
2015-08-19 10:29 ` Bastien
0 siblings, 1 reply; 8+ messages in thread
From: Sebastien Vauban @ 2015-08-19 10:13 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Hi Bastien,
Bastien writes:
> Sebastien Vauban writes:
>
>> Really, it has been removed because of a problem when ps-print'ing an
>> Org buffer -- though the bug was to find in `ps-def.el' and not in
>> Org, as reported by Stefan Monnier [1]. It should have been fixed
>> there instead.
>
> Yes, indeed.
>
>>> I'm not aware of anything that has been introduced in its place.
>>
>> I'm planning to reintroduce it as an optional feature. At least in
>> my personal Git repository, if that's not accepted in Org core.
>
> If you can find an implementation that does not rely on overlays, I'm
> fine with it - overlays have inherent scalability issues, and I'm
> reluctant using them for something as pervasive as code blocks
> background.
I don't know how to add the background color without overlays.
That's why the very first step would (have) be(en) to put it as an
optional feature, that could been disabled by those who feel that it
introduces a performance delay -- what hasn't been shown so far IIRC.
Best regards,
Seb
--
Sebastien Vauban
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: org-block-background in 8.3.1?
2015-08-19 10:13 ` Sebastien Vauban
@ 2015-08-19 10:29 ` Bastien
0 siblings, 0 replies; 8+ messages in thread
From: Bastien @ 2015-08-19 10:29 UTC (permalink / raw)
To: Sebastien Vauban; +Cc: public-emacs-orgmode-mXXj517/zsQ
Hi Sébastien,
Sebastien Vauban <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org>
writes:
> That's why the very first step would (have) be(en) to put it as an
> optional feature, that could been disabled by those who feel that it
> introduces a performance delay -- what hasn't been shown so far IIRC.
Can you provide a patch and a test?
The patch would restore the block background, turned off by default.
Then the test would show that the modified fontification functions are
not significantly slowed down with a large number of blocks. Say e.g.
100 blocks in 100 subtrees.
Thanks!
--
Bastien
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-08-20 8:33 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-20 8:33 org-block-background in 8.3.1? JI, Xiang
-- strict thread matches above, loose matches on Subject: below --
2015-08-12 2:31 Luke Crook
2015-08-12 2:47 ` Kyle Meyer
2015-08-12 7:44 ` Sebastien Vauban
2015-08-12 16:55 ` Kyle Meyer
2015-08-18 17:26 ` Bastien
2015-08-19 10:13 ` Sebastien Vauban
2015-08-19 10:29 ` Bastien
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).