emacs

Gent Krasniqi 2026-01-09T12:00:05.359509Z

TIL about outline-minor-mode-cycle, which when enabled makes TAB and S-TAB behave like in org-mode only when on top of headings (including top level defuns). It basically replaces almost all of my needs for outline-minor-mode and hs-minor-mode commands with no mental overhead, in a do-what-I-mean fashion. (the default keybindings for those modes are legendarily bad)

❗ 3
Ovi Stoica 2026-01-09T17:06:38.136609Z

Does this work for Clojure mode too?

Gent Krasniqi 2026-01-09T19:19:51.029649Z

Yes outline-minor-mode works without any modification for clojure mode, same as other lisps. For other languages, you might need to define what to consider a heading. For lisps ;;; is level one, ;;;; level two, and so on.

👍 1
adham 2026-01-15T12:04:33.659359Z

Interesting, it seems like it does not work for clojure-ts-mode any hints/tips on that?

Gent Krasniqi 2026-01-15T13:08:46.811029Z

In a buffer with clojure-ts-mode you can check C-h o outline-regexp to see if it is something like ";;;;* \\|(", (what I see for a buffer with clojure-mode). Ultimately, if it's not configurable, I think you can hook a function that sets that buffer-local variable to clojure-ts-mode.

Gent Krasniqi 2026-01-15T13:10:17.167259Z

Searching the respective github repos, it seems like clojure-mode sets that variable while clojure-ts-mode doesn't.

Gent Krasniqi 2026-01-15T13:16:09.696229Z

Anyway your question prompted me to check the status of clojure-ts-mode, and outline-minor-mode does seem to be documented there: https://github.com/clojure-emacs/clojure-ts-mode?tab=readme-ov-file#integration-with-outline-minor-mode