all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* auto correction propagation mode
@ 2008-06-07  9:37 Plamen Tanovski
  2008-06-07 17:50 ` Joel J. Adamson
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Plamen Tanovski @ 2008-06-07  9:37 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

I need a mode, where emacs "whatches" my typing, and if I correct a word,
emacs does the same correction on all remaining text in the buffer, after I
leave the word. For example, if I correct the _first_ "foo" to "fip" in

      The foo is not always foo, not even really foo.

emacs changes automatically the sentence (in the background) to

      The fip is not always fip, not even really fip. 

I searched the net but didn't find smth. apropriate.


Best regards


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: auto correction propagation mode
  2008-06-07  9:37 auto correction propagation mode Plamen Tanovski
@ 2008-06-07 17:50 ` Joel J. Adamson
  2008-06-07 18:05 ` Andreas Röhler
       [not found] ` <mailman.12855.1212861612.18990.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 5+ messages in thread
From: Joel J. Adamson @ 2008-06-07 17:50 UTC (permalink / raw)
  To: Plamen Tanovski; +Cc: help-gnu-emacs

Plamen Tanovski <pgt@arcor.de> writes:

> Hi,
>
> I need a mode, where emacs "whatches" my typing, and if I correct a word,
> emacs does the same correction on all remaining text in the buffer, after I
> leave the word. For example, if I correct the _first_ "foo" to "fip" in
>
>       The foo is not always foo, not even really foo.
>
> emacs changes automatically the sentence (in the background) to
>
>       The fip is not always fip, not even really fip. 
>
> I searched the net but didn't find smth. apropriate.

Take a look at flyspell and abbrevs.

Joel

-- 
Joel J. Adamson
(303) 880-3109
Public key: http://pgp.mit.edu
Homepage: http://www.unc.edu/~adamsonj
Please read http://www.unc.edu/~adamsonj/roe.html




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: auto correction propagation mode
  2008-06-07  9:37 auto correction propagation mode Plamen Tanovski
  2008-06-07 17:50 ` Joel J. Adamson
@ 2008-06-07 18:05 ` Andreas Röhler
       [not found] ` <mailman.12855.1212861612.18990.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 5+ messages in thread
From: Andreas Röhler @ 2008-06-07 18:05 UTC (permalink / raw)
  To: help-gnu-emacs

Am Samstag, 7. Juni 2008 schrieb Plamen Tanovski:
> Hi,
> 
> I need a mode, where emacs "whatches" my typing, and if I correct a word,
> emacs does the same correction on all remaining text in the buffer, after I
> leave the word. For example, if I correct the _first_ "foo" to "fip" in
> 
>       The foo is not always foo, not even really foo.
> 
> emacs changes automatically the sentence (in the background) to
> 
>       The fip is not always fip, not even really fip. 
> 
> I searched the net but didn't find smth. apropriate.
> 
> 
> Best regards
> 


Just to indicate a direction how this could be done IMHO:

(defun allkorr () 
  (interactive "*")
  (let* ((wap (word-at-point))
        (replmt (read-from-minibuffer "Correction: " wap)))
    (define-abbrev text-mode-abbrev-table wap replmt)
    (expand-region-abbrevs (point-min) (point-max))))


It uses the abbrev facility, prompts for the correct
word, which will be registered as an expansion for the
then wrong word, conceived as an abbrev in the text.

`expand-region-abbrevs' will query you then for every
replacement. This might be abolished still, bound to an
argument etc.

HTH

Andreas Röhler





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: auto correction propagation mode
       [not found] ` <mailman.12855.1212861612.18990.help-gnu-emacs@gnu.org>
@ 2008-06-07 21:05   ` Plamen Tanovski
  2008-06-08  7:30     ` Andreas Röhler
  0 siblings, 1 reply; 5+ messages in thread
From: Plamen Tanovski @ 2008-06-07 21:05 UTC (permalink / raw)
  To: help-gnu-emacs

Andreas Röhler <andreas.roehler@online.de> writes:

> Just to indicate a direction how this could be done IMHO:
>
> (defun allkorr () 
>   (interactive "*")
>   (let* ((wap (word-at-point))
>         (replmt (read-from-minibuffer "Correction: " wap)))
>     (define-abbrev text-mode-abbrev-table wap replmt)
>     (expand-region-abbrevs (point-min) (point-max))))
>
>
> It uses the abbrev facility, prompts for the correct
> word, which will be registered as an expansion for the
> then wrong word, conceived as an abbrev in the text.
>
> `expand-region-abbrevs' will query you then for every
> replacement. This might be abolished still, bound to an
> argument etc.


Thanks a lot. This is a very interessting approach. The best thing is, it
works on whole words only.

Best regards


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: auto correction propagation mode
  2008-06-07 21:05   ` Plamen Tanovski
@ 2008-06-08  7:30     ` Andreas Röhler
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas Röhler @ 2008-06-08  7:30 UTC (permalink / raw)
  To: help-gnu-emacs

Am Samstag, 7. Juni 2008 schrieb Plamen Tanovski:
> Andreas Röhler <andreas.roehler@online.de> writes:
> 
> > Just to indicate a direction how this could be done IMHO:
> >
> > (defun allkorr () 
> >   (interactive "*")
> >   (let* ((wap (word-at-point))
> >         (replmt (read-from-minibuffer "Correction: " wap)))
> >     (define-abbrev text-mode-abbrev-table wap replmt)
> >     (expand-region-abbrevs (point-min) (point-max))))
> >
> >
> > It uses the abbrev facility, prompts for the correct
> > word, which will be registered as an expansion for the
> > then wrong word, conceived as an abbrev in the text.
> >
> > `expand-region-abbrevs' will query you then for every
> > replacement. This might be abolished still, bound to an
> > argument etc.
> 
> 
> Thanks a lot. This is a very interessting approach. The best thing is, it
> works on whole words only.
> 

Yeah. And what's nice too: its all saved. Once corrected, it works every time 
as soon you call expand-all-abbrevs. So I will use that too now to correct 
repeating typos as Belrin for Berlin. Thanks back inspiring it. :)
 






^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-06-08  7:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-07  9:37 auto correction propagation mode Plamen Tanovski
2008-06-07 17:50 ` Joel J. Adamson
2008-06-07 18:05 ` Andreas Röhler
     [not found] ` <mailman.12855.1212861612.18990.help-gnu-emacs@gnu.org>
2008-06-07 21:05   ` Plamen Tanovski
2008-06-08  7:30     ` Andreas Röhler

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.