reddit / emacs

Text books in Emacs

atamariya · 2022-02-19 05:25
​ https://preview.redd.it/rs84rfq56qi81.png?width=1122&format=png&auto=webp&s=2fad351318db0f82ce12be95facadd95591e6438 If you feel like reading text books (TEXT format) like those available via [Project Gutenberg](https://www.blogger.com/#), Emacs can be a good tool. https://lifeofpenguin.blogspot.com/2022/02/text-books-in-emacs.html
wasabichicken · 2022-02-19 07:29
Nice, but be aware that a "mode" in Emacs is slightly more than a function that sets a bunch of variables. Perhaps most importantly, a mode should not have global side effects but instead be buffer-local. See the `define-derived-mode` macro in the [Lisp manual](https://www.gnu.org/software/emacs/manual/html_node/elisp/Derived-Modes.html). In particular, notice how the example uses `setq-local` instead of `setq`.
flexibeast · 2022-02-19 07:37
And if you want to read EPUBs from Gutenberg, there's [nov.el](https://depp.brause.cc/nov.el/).
danderzei · 2022-02-19 08:12
You could use [olivetti-mode](https://github.com/rnkn/olivetti) or [Writeroom mode](https://github.com/joostkremers/writeroom-mode).
cazzipropri · 2022-02-19 12:08
I love emacs but I don't find the computer a good tool to read books or study.
arthurno1 · 2022-02-19 13:16
Indeed, the contrast of paper is not matched, or hard to match by computer screens. Learning with paper, reading lout and writing at the same time, is also hard to match on the computer. But the computer offer interconnectivity where any reference is a click away. Also, the interactivity offered by the computer is impossible to match with pen and paper. I remember when taking my driving license some 20+ years ago. I would be falling asleep over what was probably the most boring book ever written in the world, what was at the day swedish official traffic learning book. But then I got a CD with the interactive traffic school. I did it twice and passed the exam on the first try with one single error that was on a control question, so I got max points. Also, I did it in the half of the time, including controlling of my answers. In the written book, I never got past the first chapter about group pressure and alcohol :).
arthurno1 · 2022-02-19 13:59
That looks nice visually, but you should probably define that as a [minor mode](https://www.gnu.org/software/emacs/manual/html_node/elisp/Defining-Minor-Modes.html), alternatively a [derived \(major\) mode](https://www.gnu.org/software/emacs/manual/html_node/elisp/Derived-Modes.html), so that people can turn it off and on. (defun book-mode () (interactive) (set-window-margins nil 20 20) (set-window-fringes nil 0 0) (setq line-prefix " ") (setq word-wrap t) ) 1. It is not possible to "turn off", make iit into a mode as suggested above 2. set-window-margins <-- see what happends if you switch buffer and come back 3. (setq word-wrap t) <-- see the docs for this variable (C-h v word-wrap RET): "Instead of setting this variable directly, most users should use Visual Line mode. ( ... )"
cazzipropri · 2022-02-19 17:20
Agreed, and I'm a big fan of r/Anki. But those are study aids designed to be digital. They are not a scanned book. Reading long texts on a backlit screen is not what emacs was designed for, or what computers are for. Load your text file on an e-ink device and your eyes will thank you at the end of the day.
noman_032018 · 2022-02-19 17:22
> Indeed, the contrast of paper is not matched, or hard to match by computer screens. There were also to e-ink screens/monitors that were supposed to arrive at some point. I'm not sure what happened to those. It would be nice to have a monitor with effectively *no* power use for displaying documentation or long-running text (except on refresh) that doesn't need color (or could they made color?).
arthurno1 · 2022-02-19 17:48
> Agreed, and I'm a big fan of r/Anki. Interesting, never heard of it before. Thanks. Yes, reading paper is less strain on eyes, at least for the time being.
arthurno1 · 2022-02-19 17:50
Well, the only thing we are certain of about the future is that we do not know how it will look like :). Maybe one day we will have better reading experiences from digital devices than from paper now, regarding the contrast, but as of today paper still seems to be the best medium for humans to read from.
EcstaticBill2638 · 2022-02-20 04:43
They do exist (I think Dasung is the only brand that makes them) they're just very expensive. I'm waiting for an eink tablet that can run emacs.
False_Strawberry_799 · 2022-02-20 16:11
You can get e-ink displays for raspberry pi including color ones and read books using the excellent calibre app.
noman_032018 · 2022-02-21 04:14
> they're just very expensive Ah that's quite unfortunate. What's the point of saving power if the economy from doing so doesn't even begin to offset the monitor's cost... :/
noman_032018 · 2022-02-21 04:16
Oh that's interesting. I wonder if an array of them could make for a decent result.
False_Strawberry_799 · 2022-02-21 05:33
I have seen 7.5 inch ones which is about paper back size
EcstaticBill2638 · 2022-02-21 05:42
Is there a way to make such a setup portable? That could be an awesome replacement for a kindle/kobo ereader.
False_Strawberry_799 · 2022-02-21 05:51
Very expensive 25 inch e-ink external monitor https://us.boox.com/products/boox-mira-series?variant=41456699211974
noman_032018 · 2022-02-21 06:31
Yeah, similar price-points from Dasung which u/EcstaticBill2638 mentioned prompted the arraying question. A dozen small cheap screens arrayed could end-up much cheaper with semi-acceptable display (if a lot more complicated to use and requiring a custom compositing program).
False_Strawberry_799 · 2022-02-22 02:13
yes with a 7inch raspberry pi case
False_Strawberry_799 · 2022-02-22 02:14
or a vesa mount case maybe
EcstaticBill2638 · 2022-02-22 02:30
I was thinking more about batteries, but they're probably not too hard to find. I'll look into this some more, cheers.