kaushalmodi

Joined 10 years ago

Karma
353
Submissions
246
Member since
Jul 12
Loves Emacs and command-line utilities. You can find me by the same username on GitHub, Gitlab, reddit and Twitter.

Blog: https://scripter.co

* Few projects:

- Org-mode + Hugo: https://ox-hugo.scripter.co

- Eless (A Better less): https://eless.scripter.co

View on Hacker News

Recent submissions

Comment · 4 years ago
Thank you for developing this extension! This makes the pages definitely much more better looking and readable than the Firefox built-in Reader View.
Comment · 4 years ago
I kind of agree with that ;)

Nothing beats the speed of Hugo and content creation in Org mode.

Comment · 4 years ago
This post felt like a deja vu, because I had read this earlier back in Nov 2017 :). The HN mods should add the 2017 year to the title. That said, for people who haven't read this post earlier, this post shares some great tips! I like the one about deferring packages using `use-package`.

Because this is an old post, references like Spacemacs are now quite dated. Folks prefer Doom Emacs nowadays (though I don't use either of them).

Comment · 4 years ago
Comment · 4 years ago
> a lot of hacks to get exporting to ox-hugo to work

Hello! Please feel free to start a discussion on https://github.com/kaushalmodi/ox-hugo/discussions listing the things you need to tweak in ox-hugo to make it work with Org Roam.

In the past 3 months or so, I have been adding test Org files received from Org Roam users and they seem to be exporting alright.

Tests: https://github.com/kaushalmodi/ox-hugo/tree/main/test/site/c...

I'd welcome more tests there :)

> and improve performance [your config link]

From your config, I see this[1] overriding `org-hugo-link--headline-anchor-maybe`. I am following a general Emacs Lisp convention of naming internal-use functions and variables with `--` in the names. Unfortunately, that advice won't do anything with the latest ox-hugo as I replaced that particular internal function with something else in past few months as I was improving the anchoring scheme to support an Org Roam user with linking headings based on UUID.

At that point I had added this documentation on Anchors[2] in ox-hugo manual. If you set `org-hugo-anchor-functions` to nil, or add a dummy function to it that just returns "", it would do the same thing as you are doing in your advice right now (not tested).

*Note that will basically break the ability to refer to other sub headings by UUID, CUSTOM_ID or any other mechanism.*

---

I'd welcome contributions to ox-hugo code, documentation so that it can help other Org Roam users too. Even if it doesn't make it into the repo, having a discussion related to ox-hugo + Org Roam issues/tips+tricks in the ox-hugo Discussions forum will be useful to others.

Thanks!

---

[1]: https://github.com/alexkehayias/emacs.d/blob/3b546048cc60976...

[2]: https://ox-hugo.scripter.co/doc/anchors/

Comment · 4 years ago
Comment · 4 years ago
No, having the related executable in the PATH before you start emacs is enough.

Then you need to install the Org Babel packages that don't ship with Emacs or Org mode e.g. ob-tcl, ob-nim.

Comment · 4 years ago
Comment · 4 years ago
Comment · 4 years ago
Emacs Org Babel is amazing! I also was practicing awk examples from The AWK Programming Book few years back in a similar fashion: https://scripter.co/notes/awk/.

And it's not just awk, there are Org Babel packages available for virtually all the languages!

- Nim (these are my most comprehensive set of notes): https://scripter.co/notes/nim/

- Tcl: https://scripter.co/notes/tcl/

- String formatting in Nim and Python: https://scripter.co/notes/string-fns-nim-vs-python/

- PlantUML: https://scripter.co/notes/plantuml/

In all the notes pages above, the result of the code blocks is seen directly in the Emacs buffer when I hit C-c C-c. Then I simply* export all those notes to Markdown and publish them using Hugo.

* Tangent: That's one of the main reasons why I went down the path of developing ox-hugo.

Comment · 4 years ago
No, I'm happy with them. I've been using them for many years.
Comment · 5 years ago
Comment · 5 years ago
It's great to see reference to hardware design in this thread.

Not hardware, but I have been using Nim for DPI-C interface with SystemVerilog for quite some time. Few weeks back, I started tinkering with Nim macros, and started working on a project to make the VPI interface more approachable.

This language is kind of a hidden gem that not many people are aware of in the HDL/HVL space.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton