unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* SDCV and indian diacritics
@ 2013-10-06  5:39 Sebastian Nehrdich
  0 siblings, 0 replies; 3+ messages in thread
From: Sebastian Nehrdich @ 2013-10-06  5:39 UTC (permalink / raw)
  To: help-gnu-emacs

Hello everybody,
I am new to this list and didn't do anything with my emacs for some time,
so please be patient if I am not giving the right/enough information. :)

Lately I set up my emacs to work with SDVC via the sdvc.el extension, as
described here: http://www.emacswiki.org/emacs-de/Sdcv

So far it is working alright and it really is a handy tool for me, but one
problem keeps bothering me.
Mostly I am using emacs to set Sanskrit texts wich usually contain a lot of
diacritics.
this might look like this: dṛṣṭvādḍhataṃ rūpamugraṃ tavedaṃ
And the dictionary files contain the words in the ITRANS / Harvard-Kyoto
transliteration sheme, wich is used to set Devanagari-letters in the roman
alphabet without using diacritics at all.
So when I want to run sdcv on my input wich includes diacritis, naturally
it does not work well because the dict-files are in ITRANS/Harvad-Kyoto
transliteration.
Of course, if I replace the diacritics manually and turn the input into
something like this:
dRSTVAdDhataM rUpamugraM tavedaM
wich is in conformity to the ITRANS/Harvad-Kyoto transliteration, sdcv is
working very well. But I do not want to input all my stuff in ITRANS
because I might want to use it later for latex etc.
So my question is: Is it possible to hack the sdcv.el to do this
replacement so I can type with my diacritics, then the sdcv.el converts all
the characters to itrans before the input is sent to sdcv?
Greetings & thanks for any advice on this

Sebastian


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

* Re: SDCV and indian diacritics
       [not found] <mailman.3478.1381041250.10748.help-gnu-emacs@gnu.org>
@ 2013-10-06 12:17 ` Rustom Mody
  2013-10-06 15:24   ` Rustom Mody
  0 siblings, 1 reply; 3+ messages in thread
From: Rustom Mody @ 2013-10-06 12:17 UTC (permalink / raw)
  To: help-gnu-emacs

On Sunday, October 6, 2013 11:09:09 AM UTC+5:30, Sebastian Nehrdich wrote:
> So my question is: Is it possible to hack the sdcv.el to do this
> replacement so I can type with my diacritics, then the sdcv.el converts all
> the characters to itrans before the input is sent to sdcv?

No idea about sdcv
I have a bit of elisp that goes the other way.
You type in ASCII/ITRANS
That code then batch-runs the Itrans input method on the buffer and generates another buffer with devanagari.
You could presumably change the input method to diacritics (Dunno... Just an idea)

I could pass on that code to you. [Not on that machine now]


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

* Re: SDCV and indian diacritics
  2013-10-06 12:17 ` SDCV and indian diacritics Rustom Mody
@ 2013-10-06 15:24   ` Rustom Mody
  0 siblings, 0 replies; 3+ messages in thread
From: Rustom Mody @ 2013-10-06 15:24 UTC (permalink / raw)
  To: help-gnu-emacs

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)


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

end of thread, other threads:[~2013-10-06 15:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [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
2013-10-06  5:39 Sebastian Nehrdich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).