From 3b1ace470bb3ec674256d7cd99c73f2a63e028b8 Mon Sep 17 00:00:00 2001 From: Oscar Najera Date: Wed, 26 Jun 2024 20:13:43 +0200 Subject: shavian transliterate --- config/doom/config.org | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'config') diff --git a/config/doom/config.org b/config/doom/config.org index 577f1f9..63e6977 100644 --- a/config/doom/config.org +++ b/config/doom/config.org @@ -126,6 +126,24 @@ Shamelessly copied from https://tecosaur.github.io/emacs-config/#dictionary current-prefix-arg)) (lexic-search identifier nil nil t)) #+end_src +** Shavian transliterate +#+begin_src emacs-lisp +(defun on/shavian-transliterate (start end) + "Convert text from START to END to Shavian in new buffer." + (interactive "r") + (let ((buffer (get-buffer-create "*shavian translit*"))) + (with-current-buffer buffer + (erase-buffer)) + (call-process-region + start end + (expand-file-name ".virtualenvs/shavian/bin/python" "~/") + nil buffer nil + (expand-file-name "dev/readlex/latin2shaw.py" "~/")) + (with-current-buffer buffer + (text-mode) + (display-buffer buffer)))) + +#+end_src * Orgmode #+begin_src emacs-lisp (after! org -- cgit v1.2.3