agzam / .doom.d

Doom Emacs config
GNU General Public License v3.0
16 stars 0 forks source link

tip: pulse instead of beacon #1

Closed andersjohansson closed 3 weeks ago

andersjohansson commented 3 weeks ago

Hi agzam, I used your jinx-autocorrect-last+ and saw that you had added beacon. Smart! An alternative is pulse that is built-in to emacs.

I did this instead (last part of jinx-autocorrect-last+:

.....
(jinx--correct-guard
               (jinx--correct-replace ov (car sugs)))
              (setq jinx-autocorrect--suggestions
                    (ring-convert-sequence-to-ring sugs))
              (setq jinx-autocorrect--ts (current-time))
              (setq jinx-autocorrect--pos pos-beg)
              (pulse-momentary-highlight-region pos-beg (point))))
          (undo-auto-amalgamate))))))

https://github.com/agzam/.doom.d/blob/c4db39c731ebc3779927fa2a216d55fe74ea0f8a/modules/custom/writing/autoload/jinx.el#L83

agzam commented 3 weeks ago

Oh.. very interesting... Let me try that. First time I hear about pulse. Many thanks!

agzam commented 3 weeks ago

Did the change. Thank you once again. I appreciate you spending time - finding the source, making the change and posting the suggestion. Small, yet still very nice change.