# Emacs config, request for feedback

**URL:** <https://forum.systemcrafters.net/t/emacs-config-request-for-feedback/425>\
**Category:** Emacs\
**Created:** [March 8, 2024, 10:49pm UTC](https://forum.systemcrafters.net/t/emacs-config-request-for-feedback/425 "2024-03-08T22:49:15Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![moshh](https://avatars.discourse-cdn.com/v4/letter/m/e99b99/32.png) [@moshh](https://forum.systemcrafters.net/u/moshh)\
**Post date:** [March 8, 2024, 10:49pm UTC](https://forum.systemcrafters.net/t/emacs-config-request-for-feedback/425/1 "2024-03-08T22:49:16Z")

</div>

Hello!

Very new to Emacs (~6 months), and have a small [config.org](http://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](https://git.sr.ht/~moshh/emacs-d/tree/main/item/config.org)

Constructive criticism greatly appreciated!

---

<div class="post-metadata">

**Author:** ![alphapapa](https://avatars.discourse-cdn.com/v4/letter/a/5f9b8f/32.png) [@alphapapa](https://forum.systemcrafters.net/u/alphapapa)\
**Post date:** [March 8, 2024, 11:39pm UTC](https://forum.systemcrafters.net/t/emacs-config-request-for-feedback/425/2 "2024-03-08T23:39:28Z")

</div>

This probably belongs in the Emacs category. 🙂

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. 🙂

---

<div class="post-metadata">

**Author:** ![moshh](https://avatars.discourse-cdn.com/v4/letter/m/e99b99/32.png) [@moshh](https://forum.systemcrafters.net/u/moshh)\
**Post date:** [March 9, 2024, 12:43am UTC](https://forum.systemcrafters.net/t/emacs-config-request-for-feedback/425/3 "2024-03-09T00:43:18Z")

</div>

From #General to #Emacs

---

<div class="post-metadata">

**Author:** ![moshh](https://avatars.discourse-cdn.com/v4/letter/m/e99b99/32.png) [@moshh](https://forum.systemcrafters.net/u/moshh)\
**Post date:** [March 9, 2024, 12:54am UTC](https://forum.systemcrafters.net/t/emacs-config-request-for-feedback/425/4 "2024-03-09T00:54:13Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![alphapapa](https://avatars.discourse-cdn.com/v4/letter/a/5f9b8f/32.png) [@alphapapa](https://forum.systemcrafters.net/u/alphapapa)\
**Post date:** [March 9, 2024, 4:55am UTC](https://forum.systemcrafters.net/t/emacs-config-request-for-feedback/425/5 "2024-03-09T04:55:18Z")

</div>

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

```auto
(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)))))

```
