From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas =?iso-8859-1?q?R=F6hler?= Newsgroups: gmane.emacs.help Subject: Re: auto correction propagation mode Date: Sun, 8 Jun 2008 09:30:06 +0200 Message-ID: <200806080930.07253.andreas.roehler@online.de> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1212909866 31454 80.91.229.12 (8 Jun 2008 07:24:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 8 Jun 2008 07:24:26 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jun 08 09:25:09 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1K5FH2-0004wM-4r for geh-help-gnu-emacs@m.gmane.org; Sun, 08 Jun 2008 09:25:08 +0200 Original-Received: from localhost ([127.0.0.1]:35943 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K5FGF-0001UO-1y for geh-help-gnu-emacs@m.gmane.org; Sun, 08 Jun 2008 03:24:19 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K5FFy-0001U7-Jc for help-gnu-emacs@gnu.org; Sun, 08 Jun 2008 03:24:02 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K5FFw-0001TZ-1G for help-gnu-emacs@gnu.org; Sun, 08 Jun 2008 03:24:01 -0400 Original-Received: from [199.232.76.173] (port=42120 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K5FFv-0001TV-TW for help-gnu-emacs@gnu.org; Sun, 08 Jun 2008 03:23:59 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]:57056) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1K5FFv-0000At-GB for help-gnu-emacs@gnu.org; Sun, 08 Jun 2008 03:23:59 -0400 Original-Received: from moutng.kundenserver.de ([212.227.126.177]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K5FFu-0003G4-L7 for help-gnu-emacs@gnu.org; Sun, 08 Jun 2008 03:23:58 -0400 Original-Received: from noname (p54BEA1B5.dip0.t-ipconnect.de [84.190.161.181]) by mrelayeu.kundenserver.de (node=mrelayeu5) with ESMTP (Nemesis) id 0ML25U-1K5FFt2jvQ-0006wy; Sun, 08 Jun 2008 09:23:58 +0200 User-Agent: KMail/1.9.6 (enterprise 20070904.708012) In-Reply-To: Content-Disposition: inline X-Provags-ID: V01U2FsdGVkX1/DW/57NVXlbpOet9qgAzApjmX10t5raOdgmBt nR5oyrxhj3rJb4AC5NLSk02nyHeWxEXQnOUL/LGX23V146kndp //RNP192Kj7CGQ0fGFtFg== X-detected-kernel: by mx20.gnu.org: Linux 2.6? (barebone, rare!) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:54608 Archived-At: Am Samstag, 7. Juni 2008 schrieb Plamen Tanovski: > Andreas R=F6hler writes: >=20 > > Just to indicate a direction how this could be done IMHO: > > > > (defun allkorr ()=20 > > (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. >=20 >=20 > Thanks a lot. This is a very interessting approach. The best thing is, it > works on whole words only. >=20 Yeah. And what's nice too: its all saved. Once corrected, it works every ti= me=20 as soon you call expand-all-abbrevs. So I will use that too now to correct= =20 repeating typos as Belrin for Berlin. Thanks back inspiring it. :) =20