From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Christof Spitz Newsgroups: gmane.emacs.help Subject: Re: keyboard macro Date: Mon, 21 Oct 2013 19:59:31 +0200 (CEST) Message-ID: <1956474674.379829.1382378371340.open-xchange@app02.ox.hosteurope.de> References: <40423770-9d97-4457-a2ea-5d6859f69c9a@googlegroups.com> Reply-To: Christof Spitz NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1382378398 25662 80.91.229.3 (21 Oct 2013 17:59:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2013 17:59:58 +0000 (UTC) To: help-gnu-emacs@gnu.org, Rustom Mody Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Oct 21 20:00:02 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VYJlo-0000mP-UC for geh-help-gnu-emacs@m.gmane.org; Mon, 21 Oct 2013 20:00:01 +0200 Original-Received: from localhost ([::1]:41039 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VYJlo-0001FN-JD for geh-help-gnu-emacs@m.gmane.org; Mon, 21 Oct 2013 14:00:00 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60621) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VYJlW-0001F4-2M for help-gnu-emacs@gnu.org; Mon, 21 Oct 2013 13:59:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VYJlN-0007VJ-Kr for help-gnu-emacs@gnu.org; Mon, 21 Oct 2013 13:59:42 -0400 Original-Received: from wp255.webpack.hosteurope.de ([2a01:488:42::50ed:8518]:59152) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VYJlN-0007To-Aw for help-gnu-emacs@gnu.org; Mon, 21 Oct 2013 13:59:33 -0400 Original-Received: from app02.ox.hosteurope.de ([92.51.170.9]); authenticated by wp255.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.0:RSA_ARCFOUR_MD5:16) id 1VYJlL-0005KM-B1; Mon, 21 Oct 2013 19:59:31 +0200 In-Reply-To: <40423770-9d97-4457-a2ea-5d6859f69c9a@googlegroups.com> X-Priority: 3 Importance: Medium X-Mailer: Open-Xchange Mailer v7.2.2-Rev21 X-bounce-key: webpack.hosteurope.de;cs@lotsawa.de;1382378373;69e35489; X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a01:488:42::50ed:8518 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:94135 Archived-At: Wow, thanks so much, Rustom, works great!! Christof > Rustom Mody hat am 21. Oktober 2013 um 19:00 > geschrieben: > > > On Monday, October 21, 2013 10:05:51 PM UTC+5:30, Christof Spitz wrote: > > Hello, > > > > > > > > I have to write special characters for transliteration of a non-europea= n > > language (devanagari) in Emacs. These include characters like =C4=81,= =C4=AB,=C5=AB,=C5=9B,=E1=B9=A3 etc. > > Basically this has become easy since Emacs supports Unicode. The questi= on is > > how > > to enter those special characters easily. In Windows, I use a scripting > > program > > called "AutoHotKey". I defined macros so that, for example, when I writ= e > > "..a" > > it will insert "=C4=81" etc. In Emacs, I was not able to define such ma= cros. I > > have > > > > to use the "function keys" such as f5, or Ctrl or Alt (Meta), so that I= have > > to > > enter f5-a to produce =C4=81, for example. That makes the typewriting s= low. If I > > define a macro instead, it needs to finish the string "..a" with a spac= e to > > "trigger" the insert, but this is not what I want. > > > > > > So my question: Is there a way to define a macro/keyboard function that= will > > insert a certain character at the point when I write "..x" (not followe= d by > > a > > space)? > > > > > > Or should I better look for a Linux scripting program that works simila= r to > > AutoHotKey in Windows? > > > > After evaluating the below code, do C-x RET C-\ diacritic-for-devanagari > -------------------- > (require 'quail) > > (quail-define-package > "diacritic-for-devanagari" "UTF-8" "=E0=A4=85" t > "Example diacritic > > " nil t t nil t nil nil nil nil nil t) > > (quail-define-rules > ("..a" ?=C4=81) > ;; add the rest here > ) > > -- Christof Spitz Opitzstr. 6a 22301 Hamburg phone +49 40 38636135 mobile +49 172 9008988