Emacs-langtool icon indicating copy to clipboard operation
Emacs-langtool copied to clipboard

How do I correct word at point?

Open j-steinbach opened this issue 4 years ago • 1 comments
trafficstars

I only see the function langtool-correct-buffer, but I just want to correct the word my cursor is currently hovering over.

Is there something like langtool-correct-word-at-point?

j-steinbach avatar Mar 04 '21 16:03 j-steinbach

Same question. Please! Anyone care to answer this question?

chongchonghe avatar Aug 18 '22 04:08 chongchonghe

Like this, maybe?

(defun my/langtool-correct-from-point ()
    "Execute interactive correction after `langtool-check', from point"
    (interactive)
    (let ((ovs (langtool--overlays-region (point) (point-max))))
      (if (null ovs)
          (message "No error found. %s"
                   (substitute-command-keys
                    (concat
                     "Type \\[langtool-check-done] to finish checking "
                     "or type \\[langtool-check] to re-check buffer")))
        (barf-if-buffer-read-only)
        (langtool--correction ovs))))

linktohack avatar Jan 26 '23 13:01 linktohack

After consideration, introduce as M-x langtool-correct-at-point .

mhayashi1120 avatar Jan 29 '23 00:01 mhayashi1120