reddit / emacs
Advice emacs as a word processor
eternal-hobbyist · 2022-11-11 16:29
Hi everyone,
I've been using emacs org-mode to organize my life and take personal notes for about 8 months now. It has taken over my life in the best possible way, and I'm currently trying to find a way to have it replace LibreOffice as my word processor. Does anyone have example configs or recommended packages for this?
​
My two main requirements are checking for spelling and grammatical errors (checking grammar is particularly important), and the ability to make/edit rtf files so that my non-tech savy colleagues can open the files.
ParaplegicRacehorse · 2022-11-11 17:05
Since I started my emacs journey, I found I open LibreOffice only when I need to edit my CV or creating postal mail. This is mostly because I haven't invested the time into figuring out the org exports to Pandoc and LaTeX.
Bu156 · 2022-11-11 17:16
For spell checking (and I think grammar checking, though I mostly make spelling mistakes so not entirely sure), I use emacs-langtool with the java server as a backend, which I let Emacs start.
michaericalribo · 2022-11-11 17:19
To answer your question directly:
I've had good luck with ispell, for spell-checking -- I can't speak to whether it has grammar checking.
As another commenter noted, you could use Pandoc to convert a Markdown document to RTF. To the extent that I make documents in emacs, though, I primarily use Latex.
To answer your question indirectly:
"Making documents in emacs" (my phrase) is not the same thing as "Using emacs as a word processor." My personal opinion is emacs is bad as a word processor. You'll have a tough time editing proprietary formats, rich text formatting will be limited or janky, and things like alignment, images, and other features of a word processor are unlikely to be satisfied.
You can definitely make documents, and maybe get towards word processing...but it would help to understand whether you need to word process, or make documents, and that can help your decision
eternal-hobbyist · 2022-11-11 17:35
Thanks for the reply. The workflow is that I write something (this would be text without images, or other special formatting). I then send my text document as an rtf file to someone, who will be opening the document in LibreOffice or Microsoft World. If they have questions they might send me back an edited version of the document, usually with notes in the text.
So my requirements are pretty minimal.
voidee123 · 2022-11-11 17:37
If you don't need grammar checking, have you looked at flyspell? It uses `aspell` or a similar program (i.e. `hunspell`) for spell checking (and catching duplicate words), which is much lighter than langtool in my experience. It's also easy to create your own dictionary that you can add words to, has different dictionaries (through `aspell`) that you can add a la carte like english computer and science dictionaries, and seems to do well with suggesting corrections.
blue1_ · 2022-11-11 18:35
Emacs is fantastic for editing, non-existing for design/layout/typesetting. I type my stuff in emacs and then export the final text to Adobe InDesign (as text or via Pandoc, depending on how complex it is). Microsoft Word I use less and less, as it is occupies a middle ground that does everything but badly; same for LibreOffice.
guerrinha · 2022-11-11 18:37
For grammar checking you can try https://github.com/PillFall/languagetool.el
ExistingProgram3883 · 2022-11-11 18:50
Interesting...Does this work with LaTeX-mode?
eternal-hobbyist · 2022-11-11 19:30
Thanks you.
coquec · 2022-11-11 19:31
Take a look at AsciiDoc markup format and AsciiDoctor renderers to other formats. It’s really powerful.
11fdriver · 2022-11-11 22:10
Org-mode can export to .docx or .rtf quite easily. By default it uses libreoffice to convert, but I believe it happens without it opening.
Presumably you'll want to keep LibreOffice around to open files from your colleagues anyway.
I'll double-check as I'm not at my computer currently, but I'll take a guess that the variable you want is `org-odt-preferred-output-format`.
For spellchecking, I use `flyspell`, and I have either hunspell or aspell installed with the relevant dictionary.
And there are several grammar tools out there, I'd give a search in the package list for something you like the look of. Some can use the grammarly api, and langtool/languagetool use a Java application in the background.
You should also check out writegood-mode and artbollocks-mode for simple grammar checks.
You might also consider using some modes like Olivetti, Writeroom or Darkroom to aide your writing experience.
danderzei · 2022-11-11 22:44
Flyspell is great and easy to install.
For grammar checking the is writegood-mode, which picks up some common issues.
You can apparently hook to the Grammarly API, but I have not tried that yet.
I also like the Thesaurus
This is my config for writing aids:
;; Flyspell
(use-package flyspell
:init
(setq ispell-silently-savep t
flyspell-case-fold-duplications t
flyspell-issue-message-flag nil
flyspell-default-dictionary "en\_AU"
ispell-program-name "hunspell") ;; External package
:bind ("M-<f7>" . flyspell-buffer)
:hook (text-mode . flyspell-mode) (prog-mode . flyspell-prog-mode))
(use-package flyspell-correct
:after (flyspell)
:bind (("C-;" . flyspell-auto-correct-previous-word)
("<f7>" . flyspell-correct-wrapper)))
;; Switch dictionaries
(defun pp-switch-dictionary()
(interactive)
(let\* ((dic ispell-current-dictionary)
(change (if (string= dic "en\_AU") "nederlands" "en\_AU")))
ispell-change-dictionary change)
(message "Dictionary switched from %s to %s" dic change)))
(global-set-key (kbd "C-<f7>") 'pp-switch-dictionary)
;; Buil-in dictionary search (Emacs 28_)
(setq dictionary-server "dict.org")
;; Merriam-Webster Thesaurus
(use-package mw-thesaurus
:config (global-set-key (kbd "<f8>") 'mw-thesaurus-lookup-at-point))
;; Some grammar checking
(use-package writegood-mode
:bind (("C-c g" . writegood-mode)
("C-c C-g g" . writegood-grade-level)
("C-c C-g e" . writegood-reading-ease))
:hook text-mode)
eternal-hobbyist · 2022-11-11 23:04
Thanks this is extremely helpful.
danderzei · 2022-11-11 23:59
These are my personal settings - they might not suit you. My favourite function is `flyspell-auto-correct-previous-word`.
luiggi_oasis · 2022-11-12 01:12
Very interesting. Does it work well with flycheck? I have flycheck with aspell and proselint, I wonder why they had to create a new package instead of integrating LanguageTool with flycheck.
oantolin · 2022-11-12 01:17
> I've had good luck with ispell, for spell-checking -- I can't speak to whether it has grammar checking.
It does not: ispell is only a spell-checker.
Miss_Mizzy · 2022-11-12 02:43
there is an lsp mode for grammarly which I prefer to language tool, you can try it
eternal-hobbyist · 2022-11-12 02:54
Exporting to Latex is super easy, FYI https://orgmode.org/manual/LaTeX\_002fPDF-export-commands.html
nickanderson5308 · 2022-11-12 05:29
YES. Welcome to the org
I pretty much try to live in org-mode.
I make heavy use of exporting.
I write email in org-mode and use org-mime-htmlize to convert it into an ASCII formatted plain text part and am html part, so it looks a bit nicer for most people and the nicely formatted plain text is there for people like me who prefer plain text.
I use ox-jira to make my ticket descriptions and comments beautiful.
I export to odt sometimes. The odt backend can produce other formats as well (I haven't tried that yet) such as as ‘doc’, ‘docx’, ‘rtf’, or ‘pdf’, etc., then extend the ODT export back-end to directly produce that format. Specify the final format in the org-odt-preferred-output-format variable. https://orgmode.org/manual/Extending-ODT-export.html
I export reports to pdf.
I export for markdown formatted Hugo pages with ox-hugo.
I export for GitHub flavored markdown for Zendesk and GitHub, and reddit.
I export for slack with ox-slack.
I export reveal-js html presentations with org-reveal (or org-re-reveal I'm not sure off the top of my head, writing this in orgzly, probably should have used emacs via termux for full access).
I tangle src blocks out to appropriate files literate programming style.
I use flyspell, writegood, and abbrev mode to auto correct my just common typos (it's magical).
There are some grammerly things, but hooking that up to my exocortex makes me nervous so I have not tried any of it.
Thaodan · 2022-11-12 06:32
If you want an easy latex template (not really any Latex knowledge needed for basic things) try AwesomeCV.
https://www.overleaf.com/latex/templates/awesome-cv/dfnvtnhzhhbm
Thaodan · 2022-11-12 07:41
Thanks for the suggestions. writegood does sound interesting even thou it just works with English.
If I can make it work so it only activates with English that will be nice.
​
About presentations: I think in org-mode there are two options either by going the html route through org-reveal or by using the beamer latex classes both should work.
I've used the Beamer classes mostly.
Thaodan · 2022-11-12 07:43
It suggested to export to ODT for colleges to open if needed to edit the document, unless there's some need to use rtf. I've found few people that use that document type these days.
If it should be read-only you can just export to pdf via Latex.
nickanderson5308 · 2022-11-12 07:49
Also org-present
ThanosRR · 2022-11-12 09:49
For spell checking I use flyspell, it’s the fastest and easiest one I’ve used so far with flyspell-mode, it allows me to switch between dictionaries with ease or add my own custom ones.
Thaodan · 2022-11-12 10:44
>org-present
Ah yes and there's also org-tree-slide for very simply presentations.
mclearc · 2022-11-12 13:56
You might be interested in the writing setup I have for my config (lambda-emacs). I use emacs for all my academic writing, email, and blogging. I used to have a grammar checker set up but removed it at some point. But maybe I should add it back.
https://github.com/Lambda-Emacs/lambda-emacs/blob/main/lambda-library/lambda-setup/lem-setup-writing.el
nickanderson5308 · 2022-11-12 15:13
I'm curious about your workflow. Have you found org capture, orgroam, denote, deft or similar?
nickanderson5308 · 2022-11-12 15:14
I'm curious about your workflow. Have you found org capture, orgroam, denote, deft or similar?
eternal-hobbyist · 2022-11-12 15:25
I know of orgroam and org capture and see the advantage of using it, but I have not taken the time to set either of them up.
nickanderson5308 · 2022-11-12 15:58
So you're currently using a few larger files that your hand crafting?
eternal-hobbyist · 2022-11-12 16:11
No, I basically recreate some functionality via my directory structure. So, if I'm taking notes on a book I might store those notes in \~/Documents/reading-notes/book-name/chapter-number.org.
I only use that structure for personal notes (things I don't need to share).
I also write articles, which need to be sent to not tech savvy editors. This has required me to send rtf files. If the editor has questions they send the document back to me with notes, if they don't they upload it into a system that only accepts rtf files.
nickanderson5308 · 2022-11-12 16:28
I see. Very interesting, thanks for sharing.
Care to share the first frew lines of a couple files? I'm curious how regular your file structure is. How many subheading levels do you use? Is the regularity of some categories of files more or less strict than others?
How do you use these notes after taking them? When do you revisit them? How do you know it's time to revisit?
Do you search your notes? How are you searching? What kinds of things are you searching for, can you share an explicit example?
eternal-hobbyist · 2022-11-12 16:42
That might be a bit too much personal information. I am attending a class that is reviewing a few chapters from a book every weeks, plus supplemental reading. So the structure does make a lot of sense for the class, but supplemental reading makes things more tricky. I am storing that reading along with the book, but that makes the supplemental reading hard to locate in the future.
nickanderson5308 · 2022-11-12 17:19
Fair enough, I'll try to remember and take time to post an example of how I'd do that.
ParaplegicRacehorse · 2022-11-12 17:45
Exporting to LaTeX is very easy, yes; as is exporting to Pandoc.
Creating and editing LaTeX templates? Not easy.
Thaodan · 2022-11-12 20:00
I'm using Org-Capture, Org-Protocol, plus Gnus-Notes for Gnus. I looked at Org-Roam but haven't used it, it did look more complicated than I initially wanted. But after kinda reinventing Org-Roam by writing basicly keeping track of my own little web of tasks (Work, Sailfish, Emacs, ArchLinux etc.) I wonder if I should use Org-Roam.
But I just need to figure out my org file structure I think, I track some bug and need to figure out to track the metadata from it.
I have a few templates and shortcuts in Firefox for Org-Protocol capture, e.g. one button to track bugs from Bugzilla, one to store Org links.
My shortcut templates consist of some to read emails, todos and to import bugs.
nickanderson5308 · 2022-11-12 22:25
I hadn't heard of gnus notes. I'll have to check it out. Thanks.
nickanderson5308 · 2022-11-13 21:35
Well, I can't seem to get reddit to allow me to post this directly. https://gist.github.com/nickanderson/00005b5b03e323a65ada98c5fa5ebb11
Bu156 · 2022-11-14 14:50
Yeah, but langtool has been a better experience for me since I use multiple computers with different environment and Java is essentially a given to have installed. I did use hunspell before but found langtool to be better for me.