Skip to content
Extension to Emacs' Indian languages support
Branch: master
Clone or download
paddymcall Add emacs version requirement
Suggested by flycheck.
Latest commit a5450fe Apr 24, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore ignore backup files Dec 2, 2016
LICENSE first batch: gpl3, iast input method, translit. Nov 9, 2015
README.org update README May 26, 2017
indian-ext-tests.el Add emacs version requirement Apr 24, 2019
indian-ext.el Add emacs version requirement Apr 24, 2019

README.org

indian-ext

This package provides extensions to the standard Emacs ind-util.el functions.

It is currently focused on providing methods for Sanskrit, but that might (and hopefully will) change in the future.

It defines the following extra decode/encode functions:

  • between Velthuis and Devanāgarī:
    • `indian-ext-dev-velthuis-encode-region’
    • `indian-ext-dev-velthuis-decode-region’
  • between SLP1 and Devanāgarī:
    • `indian-ext-dev-slp1-encode-region’
    • `indian-ext-dev-slp1-decode-region’
  • between IAST and Devanāgarī:
    • `indian-ext-dev-iast-encode-region’
    • `indian-ext-dev-iast-decode-region’

The IAST and Velthuis are not case sensitive.

It also defines an additional input method, sanskrit-iast (use with `M-x set-input-method’).

You can find other input methods here:

As a library

There are functions to use these extensions in emacs-lisp programs:

  • between Velthuis and Devanāgarī:
    • `indian-ext-dev-velthuis-encode-string’
    • `indian-ext-dev-velthuis-decode-string’
  • between SLP1 and Devanāgarī:
    • `indian-ext-dev-slp1-encode-string’
    • `indian-ext-dev-slp1-decode-string’
  • between IAST and Devanāgarī:
    • `indian-ext-dev-iast-encode-string’
    • `indian-ext-dev-iast-decode-string’

Speed is an issue, however:

 (benchmark-run
     (dotimes (x 500)
	(indian-ext-dev-iast-encode-string "ख.")))

 ;; (4.902170626 30 4.18154369399997) most of the time seems to be
 ;; spent in ‘regex-opt’, called by ‘indian-regexp-of-hashtbl-keys’

 ;; and for comparison:

 (benchmark-run
     (dotimes (x 500)
	(with-temp-buffer
	  (insert "ख.")
	  (goto-char (point-min))
	  (while (re-search-forward "" nil t)
	    (replace-match "kha"))
	  (buffer-substring-no-properties (point-min) (point-max)))))
 ;; (0.012275318 0 0.0)
You can’t perform that action at this time.