sachac / artbollocks-mode

Emacs mode for highlighting weasel words
GNU Affero General Public License v3.0
74 stars 11 forks source link

MELPA version differs from this one; throws an error #19

Open zenshinji opened 1 month ago

zenshinji commented 1 month ago

Emacs 29.4 on MacOS

I installed via MELPA with use-package. artbollocks-reading-ease errored about 'syllables' not being defined. The MELPA code looks like it is a mix between this code and the original this forked from. Here's my config, which works fine with the GitHub code.

  (use-package artbollocks-mode
    :after org
    :bind
    (:map artbollocks-mode-keymap
          ("C-c /"   . nil                          )
          ("C-c \\"  . nil                          )
          ("C-c ["   . nil                          )
          ("C-c ]"   . nil                          )
          ("C-c ="   . nil                          )
          )
    (:map org-mode-map
          ("C-c /"   . org-sparse-tree              )
          ("C-c \\"  . org-sparse-tree              )
          ("C-c ["   . org-agenda-file-to-front     )
          ("C-c ]"   . org-remove-file              )
          ("C-c ="   . org-table-eval-formula       )
          )
    (:map my-writing-key-map
          ("a w" . artbollocks-word-count       )
          ("a s" . artbollocks-sentence-count   )
          ("a i" . artbollocks-readability-index)
          ("a e" . artbollocks-reading-ease     )
          ("a l" . artbollocks-grade-level      )
          )
    :config
    (progn
      (setq artbollocks-weasel-words-regex
            (concat "\\b"   (regexp-opt
                             '("I think"
                               ", but "
                               "a lot"
                               "absolutely"
                               "action"
                               "actually"
                               "added bonus"
                               "appears"
                               "asked"
                               "at this point in time"
                               "basically"
                               "been"
                               "began"
                               "begin"
                               "begun"
                               "both of them"
                               "breath"
                               "breathe"
                               "certainly"
                               "completely"
                               "comprised of"
                               "crystal clear"
                               "definitely"
                               "down"
                               "downsize"
                               "even"
                               "exact same"
                               "exactly the same as"
                               "exhale"
                               "feel"
                               "felt"
                               "fewer in number"
                               "frankly"
                               "honestly"
                               "inasmuch"
                               "inhale"
                               "it is said"
                               "just"
                               "kind of"
                               "leverage"
                               "literally"
                               "many"
                               "maybe"
                               "needless to say"
                               "nice"
                               "nod"
                               "often"
                               "one of the"
                               "past history"
                               "perhaps"
                               "point in time"
                               "ponder"
                               "probably"
                               "practically"
                               "pretty"
                               "probably"
                               "quite"
                               "rather"
                               "reach"
                               "realize"
                               "really"
                               "reason why is because"
                               "replied"
                               "rightsizing"
                               "seems"
                               "said"
                               "should"
                               "shrug"
                               "so"
                               "some"
                               "somehow"
                               "somewhat"
                               "sort of"
                               "start"
                               "started"
                               "streamlining"
                               "that"
                               "the fact that"
                               "then"
                               "there is no doubt that"
                               "thing"
                               "things"
                               "think"
                               "thought"
                               "to be honest"
                               "totally"
                               "true fact"
                               "truthfully"
                               "understand"
                               "until such time as"
                               "up"
                               "utterly"
                               "very"
                               "virtually"
                               "was"
                               "well"
                               "went"
                               "were"
                               "what happened was"
                               "wonder"
                               ) t) "\\b")
            artbollocks-jargon t
            )
      )
    ;; ;; Make sure keywords are case-insensitive
    ;; (defadvice search-for-keyword (around sacha activate)
    ;;   "Match in a case-insensitive way."
    ;;   (let ((case-fold-search t))
    ;;     ad-do-it))
      :hook
      (org-capture-mode-hook . artbollocks-mode)
      (text-mode-hook        . artbollocks-mode)
      (org-mode-hook         . artbollocks-mode)
      (fountain-mode-hook    . artbollocks-mode)
    ;; (eval-after-load "artbollocks-mode" '(diminish 'artbollocks-mode "🎨"))
    )
sachac commented 1 month ago

With emacs -Q and a fresh install of artbollocks-mode, I'm not seeing that issue... Does it happen if you delete the package and reinstall it?