olivetti icon indicating copy to clipboard operation
olivetti copied to clipboard

Support polymode

Open cobac opened this issue 1 year ago • 2 comments

It'd be nice if olivetti and polymode support each other. I believe it makes more sense to implement the support on polymode, but it looks like the project hasn't been updated for a year.

Alternatively, if https://github.com/polymode/polymode/pull/340 doesn't get merged, olivetti could include

(when (fboundp 'polymode-minor-mode) 
  (add-to-list 'polymode-move-these-minor-modes-from-old-buffer 'olivetti-mode)
  (add-to-list 'polymode-move-these-vars-from-old-buffer 'olivetti-body-width))

and suggest loading after polymode (?)


Mostly wanted to crossref 😊

cobac avatar Sep 29 '24 16:09 cobac

I think you're right that it makes more sense to implement in polymode, given they already support writeroom-mode. I've subscribed to that PR and will keep an eye on it.

rnkn avatar Oct 03 '24 00:10 rnkn

I think these should be better done on every mode basis. It's not sustainable to keep adding altering modes inside polymode proper. Each mode's author knows best which variables are relevant and could modify the setup if those change without altering polymode code.

and suggest loading after polymode (?)

This is not needed. One could

(with-eval-after-load 'polymode
  (add-to-list 'polymode-move-these-minor-modes-from-old-buffer 'olivetti-mode)
  (add-to-list 'polymode-move-these-vars-from-old-buffer 'olivetti-body-width))

vspinu avatar May 25 '25 11:05 vspinu