💾 Archived View for carcosa.net › journal › 20210124-gemini-el-update.gmi captured on 2024-06-16 at 12:33:43. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2021-11-30)

-=-=-=-=-=-=-

An update to gemini-mode.el

Just a quick note here. I've pushed an update to gemini-mode.el, and at some point, you should see it in melpa. It's nominally a simple feature request, but it will probably have implications that affect you if you use it.

Previously, gemini-mode would turn on visual-line-mode, a built-in mode of emacs that wraps lines at word boundaries near the edge of the frame and fixes up some navigation commands to work with long lines that are soft-wrapped. This is because gemtext specifies soft-wrapping of lines. Then, if it is available, gemini-mode turned on visual-fill-column mode, which is in a third-party package. It soft-wraps lines at your fill-column, rather than the edge of the frame, which means you can edit lines visually wrapped at 80 columns on a wide frame.

Not everyone wanted this, and it's a little weird having a soft dependency on a third-party package. What I've done in the new version is create a proper mode-hook, `gemini-mode-hook`. It defaults to `turn-on-visual-line-mode`, but can be customized. The customization interface offers a checkbox for turn-on-visual-fill-column-mode, and lets you add other functions. One function that would make sense to add, for example, would be `darkroom-mode`. Of course, you can set all this with setq calls in your .emacs, rather than using customize.

If you're used to having visual-fill-column mode turned on, and it's not on after you update, then you will want to customize `gemini-mode-hook`.

Share and enjoy!

Comments by email, please.