-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possibly better default html styling for codeblocks (#115) #116
Conversation
Adds better default styles for codeblocks, providing grey and outlined codeblocks with bigger margins
Delete a misplaced dash
Partly addresses #115 |
The syntax highlighting that you get in org-msg is coming from Of course you can customize this in your own config! Just edit |
Thanks. I completely understand that it wouldn't work with some background colors. Since I am using Leuven (a white background) my customization works great IMO. BTW, I tried several other themes without my customizations and when exporting using C-c C-e from org-msg, default background for src blocks is always white (which surprised me) and at times this made light colored fontified src text very hard to read. It just depends on the theme whether things work. So is the recommended way of customizing things by editing org-msg-default-style in org-msg.el and re-byte compiling it? |
Are you sure you're running the original code? I see my emacs background color in src blocks when looking at html emails in gmail.
You should be able
|
Yes. I just setup a minimal environment and had to install everything from melpa. Screenshot of the email compose buffer (to see theme): so src backgrounds are always white for me.
Unfortunately, I have been unable to make this work. I have tried things like (setq org-msg-default-style
(let* ((font-family '(font-family . "\"Arial\""))
(font-size '(font-size . "10pt"))
.... or (with-eval-after-load "org-msg" ;; or org-msg-mode
(setq org-msg-default-style
(let* ((font-family '(font-family . "\"Arial\""))
(font-size '(font-size . "10pt"))
(font `(,font-family ,font-size))
(line-height '(line-height . "10pt"))
... and the changes never have an effect on the output. The only way I have been able to make it work is to edit org-msg.el and byte compile it. |
I still couldn't tell you about the background color of src blocks (looks quite different for me) but looking at the next sexp in the source showed how to customize the style and this worked in a test: (setq org-msg-enforce-css
(let* ((font-family '(font-family . "\"Arial\""))
(font-size '(font-size . "10pt"))
... |
No, as @obar mentioned, the right way is to use the By default, Also, I suppose that if your background color is not adapting automatically between themes this is because you have not re-evaluate the |
Yes thanks for all the help. |
To follow up on this: I believe a recent update to emacs in Fedora now allows org-msg to pull the font-faces from emacs so
|
This does a few things
The upside is that it looks pretty good:
![org-msg-change](https://user-images.githubusercontent.com/1871086/121560245-9f43a080-ca17-11eb-98ba-bcf2bac25099.png)
There are two downsides: