all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Rustom Mody <rustompmody@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: SDCV and indian diacritics
Date: Sun, 6 Oct 2013 08:24:46 -0700 (PDT)	[thread overview]
Message-ID: <c8dd0fcb-bbb1-4f02-b2c2-e24826737fbe@googlegroups.com> (raw)
In-Reply-To: <8dfa2dce-9b99-4866-8899-1cd86efb16e8@googlegroups.com>

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)


  reply	other threads:[~2013-10-06 15:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.3478.1381041250.10748.help-gnu-emacs@gnu.org>
2013-10-06 12:17 ` SDCV and indian diacritics Rustom Mody
2013-10-06 15:24   ` Rustom Mody [this message]
2013-10-06  5:39 Sebastian Nehrdich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c8dd0fcb-bbb1-4f02-b2c2-e24826737fbe@googlegroups.com \
    --to=rustompmody@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.