diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-12 06:17:11 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-12 06:17:11 -0500 |
| commit | a56adc841b2c8dcef049781eb749f53707195f04 (patch) | |
| tree | 749c60a5e420d345729e3b6b0dd63f904c1909e4 | |
| parent | b4b6c1aab0e7f3626e0c8e0cc3b14d8b1beca81b (diff) | |
| download | dotemacs-a56adc841b2c8dcef049781eb749f53707195f04.tar.gz dotemacs-a56adc841b2c8dcef049781eb749f53707195f04.zip | |
feat(nov): default the EPUB text column to 80% of the window
`fc3f1b5' had set `cj/nov-margin-percent' to 12 (~76% text); 10 gives a round 80%. Adjust per-buffer with the `+'/`-' keys; clamp is unchanged (0..25, i.e. 50%..100%).
| -rw-r--r-- | modules/calibredb-epub-config.el | 6 | ||||
| -rw-r--r-- | tests/test-calibredb-epub-config.el | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/modules/calibredb-epub-config.el b/modules/calibredb-epub-config.el index 2e02d1a9..d4b5092b 100644 --- a/modules/calibredb-epub-config.el +++ b/modules/calibredb-epub-config.el @@ -90,10 +90,10 @@ ;; ------------------------------ Nov Epub Reader ------------------------------ -(defvar cj/nov-margin-percent 12 +(defvar cj/nov-margin-percent 10 "Percent of the window's natural width used as a margin on each side in epubs. -12 leaves about 76% of the columns for text. Clamped to 0..25, so the text -column runs from 50% (margin 25) to 100% (margin 0) of the window. +10 leaves 80% of the columns for text. Clamped to 0..25, so the text column +runs from 50% (margin 25) to 100% (margin 0) of the window. Adjust it live with `cj/nov-widen-text' and `cj/nov-narrow-text'.") (defvar cj/nov-min-text-width 40 diff --git a/tests/test-calibredb-epub-config.el b/tests/test-calibredb-epub-config.el index 88c4452f..e12abdaa 100644 --- a/tests/test-calibredb-epub-config.el +++ b/tests/test-calibredb-epub-config.el @@ -47,9 +47,9 @@ below 50% of the usable columns." (cj/nov-min-text-width 40)) (should (= 40 (cj/nov--text-width 50))))) -(ert-deftest test-calibredb-epub-nov-default-margin-gives-roughly-three-quarter-text () - "Normal: the default `cj/nov-margin-percent' leaves ~3/4 of the window for text." - (should (= 76 (cj/nov--text-width 100)))) +(ert-deftest test-calibredb-epub-nov-default-margin-gives-80-percent-text () + "Normal: the default `cj/nov-margin-percent' leaves 80% of the window for text." + (should (= 80 (cj/nov--text-width 100)))) ;;; ----------------------- cj/nov--text-width-for-window ---------------------- |
