reddit / emacs
Best looking org-modes you ever saw?
Glum-Armadillo4888 · 2022-11-27 05:49
I think I need ideas :) So far mine looks like this, I'm not satisfied.
https://preview.redd.it/erazt86bnf2a1.png?width=1919&format=png&auto=webp&s=51130249669872482cb42ba473eb9313bbf564ce
[So far the only thing I like is the dashboard and modeline ](https://preview.redd.it/1y0dpnf7nf2a1.png?width=1919&format=png&auto=webp&s=ceaa683dd52e90e9d89877420f87557698d44874)
​
My goal is this, but I'm so far away of it...
[If you want to talk about configs \(or help me\) my discord is Jx#5258](https://preview.redd.it/35wypbp58g2a1.png?width=2560&format=png&auto=webp&s=1d44680c7591e1a91052046d73581459fb03a3df)
krypt3c · 2022-11-27 07:14
I like how you've styled the source blocks. What are you using for that?
noncogs · 2022-11-27 07:18
Mandatory: Anything by Nicolas Rougier.
Edit: What font are you using?
pathemata · 2022-11-27 07:32
the default is the best.
Glum-Armadillo4888 · 2022-11-27 07:40
You dislike this? https://cdn.discordapp.com/attachments/1046230406397165569/1046249008772948019/unknown.png
Glum-Armadillo4888 · 2022-11-27 07:41
That's my goal but I can't reproduce it yet...
Glum-Armadillo4888 · 2022-11-27 07:53
many things, It's a little awkard to use reddit for this, we could talk in discord?
Glum-Armadillo4888 · 2022-11-27 07:53
same thing I said in another comment, it's a little difficult for me to paste code here but we could talk in discord
Rasalinius · 2022-11-27 08:30
JetBrains Mono
ferrised · 2022-11-27 09:17
Hey don’t come round here trying to make friends!
konrad1977 · 2022-11-27 09:33
Your config looks nice, could you paste a link to your config?
sunnyata · 2022-11-27 09:45
Yes, personally I am all about plain text.
FreeAd7233 · 2022-11-27 09:45
this is beautiful. But it is better for reading rather than writing…
Too fancy UI is just a distraction for editing text to me… why not just customizing CSS/Tex template for beautifying published document?
Default is the best for writing…
KuangPoulp · 2022-11-27 09:47
How can you visualize quotations like that?
krypt3c · 2022-11-27 09:59
Sorry don't really do discord
arthurno1 · 2022-11-27 11:15
See if [org-view-mode](https://github.com/amno1/org-view-mode) has something you can (re)use. It is not so much about styling aside from some quotes, and centered headlines, but more about removing unnecessary noise. See if it inspires or helps, it is relatively small and hopefully simple code.
Harjuu · 2022-11-27 11:34
Source for [the linked image](https://preview.redd.it/35wypbp58g2a1.png?width=2560&format=png&auto=webp&s=1d44680c7591e1a91052046d73581459fb03a3df)?
1nc0ns1st3nt · 2022-11-27 11:37
The major different between your end goal and your current config, as I can see it the font, and theme. A little trick is to use `(buffer-face-set 'variable-pitch)` and `set-face-attribute` of variable-pitch to a font of your choice (I think this user used bookerly) and of course set default to a monospace font of your choice, which is of the less importance of the two.
Wonnk13 · 2022-11-27 11:55
What are some completion packages for working with Org? something like company? it would be nice to get completions working with org babel and such.
anddam · 2022-11-27 12:43
How is Reddit awkward and discord not?
Glum-Armadillo4888 · 2022-11-27 13:35
The image I linked is tecosaurs config, he has the best one imo even though it's very hard to replicate in his most part
eis3nheim · 2022-11-27 14:05
What is the deal with OP and his/her awkward obsession with Discord?
Glum-Armadillo4888 · 2022-11-27 14:06
I just like it because it's easier to paste code, never imagined people in reddit didn't like discord
eis3nheim · 2022-11-27 14:08
You posted on Reddit, so you would expect people to interact on it, not go for other platform.
Besides, you could just insert a code block and that's it, or share it as a GitHub gist or anything like it.
thriveth · 2022-11-27 14:12
I have done some pretty heavy modding of the Gruvbox theme specifically for org, which I am quite happy about.
I know people like Prot disagree with me, but having a smooth gradient in heading colors makes it *a lot* easier for me to quickly figure out the (approximate) depth of the current heading.
https://i.imgur.com/ypYIPrB.png
Likhon-BaRoy · 2022-11-27 14:14
Your config plz 🤗
Glum-Armadillo4888 · 2022-11-27 14:15
I don't have a repo but it's a very similar version of tecosaurs one, his is better but I'm not yet being able to copy it fully
Glum-Armadillo4888 · 2022-11-27 14:18
It's very neat, I like it. Were you able to make a script that makes a gradient from your first and last color?
thriveth · 2022-11-27 14:32
No, I just hard coded the colors from the Gruvbox color palette on their Github repo in an order that I liked. Which also means that I would have to start all over again if I decided to use a different colorscheme.
redblobgames · 2022-11-27 14:58
Ideas? [Here's a screenshot of mine](https://www.redblobgames.com/x/screenshots/org-mode-serif-font.png). But I use different styles depending on what I'm using org-mode for. That screenshot is for when I'm writing prose intended for export to html; see the [output page](https://www.redblobgames.com/x/1645-phoneme-namegen/#appendix-alignment). Note how several styles are similar in emacs and on my web page. But I use a different style for my time tracking and for other files.
[tecosaur recommends org-modern](https://blog.tecosaur.com/tmio/2022-05-31-folding.html) but I haven't tried it yet. It's next on my list.
Glum-Armadillo4888 · 2022-11-27 15:06
I'm sure a script like that exists, if I find something like it I'll let you know
Glum-Armadillo4888 · 2022-11-27 15:19
https://github.com/tecosaur/emacs-config
Glum-Armadillo4888 · 2022-11-27 15:20
So far playing with variable pitch breaks my variable font, it looks so thin and ugly and I'm not sure why
Glum-Armadillo4888 · 2022-11-27 15:21
Config is 5k lines of code, fonts only are just under 1k
Glum-Armadillo4888 · 2022-11-27 15:23
First thing that comes to mind is changing the bar and tabs
grimscythe_ · 2022-11-27 18:00
Came to say this
thoomfish · 2022-11-27 18:57
Why is it difficult for you to paste code here? If you have access to Emacs, you have access to "indenting a block of text by 4 spaces", which is pretty much the only requirement.
1nc0ns1st3nt · 2022-11-27 19:03
If you are using buffer-face-set, make sure you are using it inside a major mode hook.
wakatara · 2022-11-28 03:58
This is a very nice setup. Me likey. Can you please post your .emacs for this? I... for one... have had a lot of trouble getting advanced latex to work and like what you've set up here colour scheme wise.
wakatara · 2022-11-28 04:00
Very nice. I am curious how you got the lovely writing fonts and line spacing to work so nicely.\~/.emacs setup please?
wakatara · 2022-11-28 04:00
Though have to admit, I prefer dark themes.
Schievel1 · 2022-11-28 05:21
Pastebin
redblobgames · 2022-11-28 18:24
My setup is a tangled mess but I think this might be worth a try:
(setq line-spacing 0.2)
(face-remap-add-relative 'default :family "Iowan Old Style" :height 180) ;; or some other font
(olivetti-mode +1)
(visual-line-mode +1)
wakatara · 2022-11-29 07:20
>(face-remap-add-relative 'default :family "Iowan Old Style" :height 180)
I'm very curious as to what this line does, actually (ok, besides the font it has there). What major change does this cause (and do you have base theme you're using with doom or whatevs?).
thanks for the pointers though!
GahonMelon · 2022-11-29 08:53
I am interested in your confif. I use writeroom but can't get the quotation to look like that. Thanks!
divinedominion · 2022-11-29 09:18
How do you switch styles? I'm in a similar boat but have just 1 style that's a compromise in all situations and not very satisfying
Glum-Armadillo4888 · 2022-11-29 09:57
The quotations are from the prettify package, add me on discord and I can help you, you have my contact in the post
chedi · 2022-11-29 13:33
Not op, but by matching the reddit username to github I found this:
[https://github.com/thriveth/Gruvbox-goodies](https://github.com/thriveth/Gruvbox-goodies)
>
> I made an extension of the Emacs gruvbox theme to make it look better with org-mode. Will upload soon, I swear.
last updated 3 years ago...so don't held your breath.
redblobgames · 2022-11-29 18:28
Normally if I change the `default` font it affects *all* buffers. With `face-remap-add-relative` I can change a face in *one* buffer.
I have some elisp rules for deciding which fonts I should use in the buffer (journal files vs code files vs prose vs notes vs etc.). Also colors — blue modelines for personal files and red modelines for work-related files. And for files that will get published publicly I will highlight certain words (similar to [writegood-mode](https://github.com/bnbeckwith/writegood-mode)). And I use different default browsers for different projects. Different indentation rules for different folders. I have lots of little things like that.
I don't use doom or a standard theme. Everything's custom (starting with `set-face-attribute`).
redblobgames · 2022-11-29 18:39
I use `org-mode-hook` to call my setup function:
(add-hook 'org-mode-hook 'amitp/org-setup)
Then in that function I'll check the `default-directory` and the `buffer-file-name` to choose various customizations. For the font:
(defun amitp/org-setup ()
"My org-mode configuration for writing documents"
(interactive)
(face-remap-add-relative 'default :family
(if (and (string-match "/redblobgames/" default-directory)
(not (string-match "CODEX" (or (buffer-file-name) ""))))
"Iowan Old Style"
"Aleo")))
I have more folder/file/mode specific rules like this:
- automatically export on save, for org files in certain folders
- put in timestamps / copyright, for files in certain folders
- use red modelines & tabs for work-related folders, and blue for personal
- for certain files, highlight weasel words, similar to [writegood-mode](https://github.com/bnbeckwith/writegood-mode)
- use a different browser for work projects vs personal projects
divinedominion · 2022-11-30 11:14
So does this mean you write redblobgames.com in Emacs org files? 👀
I didn't realize you could change faces this way on a per-buffer basis, to be honest! `face-remap-add-relative` says it on the tin. That's great!
Also thanks for the writegood-mode link. Going to check that out for mechanical text feedback!
_viz_ · 2022-11-30 14:54
It is prettify-symbols-mode I think. Pretty sure it is a copy-paste from tecosaur's config.
redblobgames · 2022-12-01 05:07
> So does this mean you write redblobgames.com in Emacs org files?
**Yes**, some of the pages are written in org-mode! For example the [A* implementation page](https://www.redblobgames.com/pathfinding/a-star/implementation.html) is generated from [implementation.org](https://www.redblobgames.com/pathfinding/a-star/implementation.org), which uses several org-mode features:
- code blocks: These get fontified by org-mode so that the code you see on the page is syntax highlighted, but without needing a javascript library.
- org-babel: I evaluate the sample code to produce the output, and include that output on the page (`#+results` blocks). That way the code shown on the page *actually* compiles and runs. I then use javascript to colorize those results blocks.
- tangle: I tangle the sample code into a library that I then use for some of the tests.
- `#+include`: I include C# code that I've written in a separate file. I don't run it though.
- dot/graphviz: I visualize example graph with graphviz and embed the image.
- `{{{ }}}` evaluation blocks: I insert the last modified date in the footer.
I don't directly export org to html though. I export to an xhtml fragment that gets combined with my overall site template using xslt. That way my org-mode pages and my non-org-mode pages get consistent styling. I write some pages in xhtml directly when I want a lot more control over the html.
thriveth · 2022-12-08 15:24
Thanks /u/chedi, it is nice to have people criticize the maintenance of a repo that no one is actually using anyway.
thriveth · 2022-12-08 15:28
Thank you for your kind words, and sorry I have not replied earlier, have had a lot on my plate recently. I can share parts of the setup but it's spread out throughout my config so it'll take a little bit to get it condensed and put
together, plus I don't know if it actually is very good coding, I suck at lisp and basically have just Frankenstein'ed a code chunk I found somewhere
online to suit my own needs. Anyway, will see if I can find the time soon.
chedi · 2022-12-08 22:00
if my response robbed you the wrong way, than I'm really sorry as it was not my intent nor did I presume to judge your efforts. I was first curious how did you achieve that amazing theme, then disapointed to not find anything.
I just wanted to temper OP expectation, as It seems that we will not see any time soon. And having had your attention, may be you can consider publishing even a gist of the theme, so me, OP and other can learn for it.
thriveth · 2022-12-09 00:16
I was probably too thin-skinned, sorry. I have updated the github repo with the Emacs mod now.
thriveth · 2022-12-09 00:18
I added it to my gruvbox-goodies Github repo now:
https://github.com/thriveth/Gruvbox-goodies
Hope you like it.
wakatara · 2022-12-09 04:14
Thanks!!
chedi · 2022-12-09 12:37
That's awesome, thanks again for sharing.