Emacs config, request for feedback

Hello!

Very new to Emacs (~6 months), and have a small config.org file that I’ve been plodding along building. I’ve got it in a repo that I thought I’d share with this excellent community.

Would really appreciate any thoughts, formatting, packages, things I should add etc. Also if someone could explain why flyspell-correct-popup doesn’t reliably work that would be great.

I’m using Emacs primarily for prose & notes, although super keen to learn some coding too. Emacs-lisp is my first real foray into coding, and I have learnt a bit of perl for regex with the aim of building some scripts to run through my archives. I’m interested in accessing my email, and am currently using Emacs for RSS and IRC.

Code: ~moshh/emacs-d (main): config.org - sourcehut git

Constructive criticism greatly appreciated!

This probably belongs in the Emacs category. :slight_smile:

Here are a few suggestions:

  1. Sourcehut refuses to render Org files, which makes that one difficult to read online. GitHub and GitLab render them nicely.
  2. For editing Elisp, I recommend using electric-pair-mode and aggressive-indent-mode. Later, I also recommend lispy, but it may not be worth it to everyone.
  3. For Org, I recommend installing org-ql and using org-ql-find as your primary way to find things in Org files.
  4. I recommend using my new activities package. It makes it much easier to switch to and resume tasks that you do repeatedly in Emacs.

That’s probably enough for one list. If you have specific questions, ask them; it’s kind of asking a lot for someone to read through thousands of lines of your config to point out issues or make suggestions. :slight_smile:

1 Like

From General to Emacs

Thanks Alphapapa, I’m very new to this so apologies for dumping a whole file.

I do have one specific question regarding the flyspell-correct package, I can’t seem to get the keybind to work, it just automatically corrects the last word rather than triggering the popup menu?

  • Flyspell Popup
    I’ve still not been able to get this to work correctly. I am not entirely sure what the exact issue is, I think its that it doesn’t want to work as a popup per mode? We shall leave as is, and re-approach later.
    #+begin_src emacs-lisp
    (setq flyspell-correct-interface #'flyspell-correct-popup)
    (keymap-global-set “C-;” 'flyspell-correct-wrapper)
    #+end_src

And I didn’t realise sr.ht didn’t render properly, I’ll setup a gitlab mirror soon!

Your Activites package looks fantastic and I’ll be sure to load that up.

I don’t know what’s the matter with your flyspell setup. FWIW, I use this:

(use-package flyspell
  :hook (org-mode . flyspell-mode)
  :config
  (define-advice flyspell-goto-next-error
      (:around (oldfun &optional previous) ap/flyspell-goto-next-error)
    "Go to next or previous misspelled word, or to previous position.
When no misspellings remain, goes to the position before
`flyspell-goto-next-error' was called."
    (cl-labels ((next-error-pos (&optional previous)
                  (save-excursion
                    (pcase (funcall oldfun previous)
                      ("No more miss-spelled words" nil)
                      (_ (point))))))
      (if-let ((pos (or (next-error-pos)
                        (next-error-pos 'previous))))
          (progn
            (pcase last-command
              ((or 'flyspell-auto-correct-word 'flyspell-goto-next-error)
               nil)
              (_ (push-mark)))
            (goto-char pos))
        (goto-char (mark-marker))
        (pop-mark)))))
1 Like