From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rustom Mody Newsgroups: gmane.emacs.help Subject: Re: SDCV and indian diacritics Date: Sun, 6 Oct 2013 08:24:46 -0700 (PDT) Message-ID: References: <8dfa2dce-9b99-4866-8899-1cd86efb16e8@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1381073126 19587 80.91.229.3 (6 Oct 2013 15:25:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 6 Oct 2013 15:25: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 Oct 06 17:25:30 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 1VSqD2-000881-Nw for geh-help-gnu-emacs@m.gmane.org; Sun, 06 Oct 2013 17:25:28 +0200 Original-Received: from localhost ([::1]:55543 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VSqD2-0002Q4-AP for geh-help-gnu-emacs@m.gmane.org; Sun, 06 Oct 2013 11:25:28 -0400 X-Received: by 10.224.125.72 with SMTP id x8mr38958252qar.5.1381073087144; Sun, 06 Oct 2013 08:24:47 -0700 (PDT) X-Received: by 10.50.136.133 with SMTP id qa5mr621395igb.4.1381073087109; Sun, 06 Oct 2013 08:24:47 -0700 (PDT) Original-Path: usenet.stanford.edu!a6no5441904qak.0!news-out.google.com!9ni11763qaf.0!nntp.google.com!i2no1344372qav.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: <8dfa2dce-9b99-4866-8899-1cd86efb16e8@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=59.95.5.101; posting-account=mBpa7woAAAAGLEWUUKpmbxm-Quu5D8ui Original-NNTP-Posting-Host: 59.95.5.101 User-Agent: G2/1.0 Injection-Date: Sun, 06 Oct 2013 15:24:47 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:201602 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:93872 Archived-At: On Sunday, October 6, 2013 5:47:05 PM UTC+5:30, Rustom Mody wrote: > > I could pass on that code to you. [Not on that machine now] Heres the code To use: 0. Load this code 1. Visit a file (cant be a file-less buffer) that has ITrans devanagari 2. Press f4 (should open a new frame having the devanagari) Notes: 1. You can keep pressing f4 to check the two views are in sync 2. If your diacritics are done by an emacs input method, then all you have to do is replace the defvar input-method by whatever you are using. Of course if you are using something at OS or h/w level (like a different keyboard) then sorry you are not in luck (for this method) ---------------------------- (defvar input-method "devanagari-itrans") (defun rpm-apply-input-method () ; buffer version (interactive) (let* ((inp (buffer-substring-no-properties (point-min)(point-max))) (filename (file-name-nondirectory (buffer-file-name))) (out-buf-name (concat (file-name-sans-extension filename) "-hi" (file-name-extension filename t))) (p)) (switch-to-buffer-other-frame out-buf-name) (save-excursion (save-window-excursion (setq p (point)) (erase-buffer) (setq buffer-file-coding-system 'utf-8) (set-input-method input-method t) (execute-kbd-macro inp) )) (goto-char p) (other-frame 1) )) (global-set-key [f4] 'rpm-apply-input-method)