𓁟 host1.bitchan.one

+⧖>Lisp is a family of programming languages with a long history and a distinctive parenthesized prefix notation. There are many dialects of Lisp, including Common Lisp, Scheme, Clojure and Elisp. >Emacs is an extensible, customizable, self-documenting free/libre text editor and computing environment, with a Lisp interpreter at its core. >Emacs Resources https://gnu.org/s/emacs https://github.com/emacs-tw/awesome-emacs https://github.com/systemcrafters/crafted-emacs >Learning Emacs C-h t (Interactive Tutorial) https://emacs-config-generator.fly.dev https://systemcrafters.net/emacs-from-scratch http://xahlee.info/emacs https://emacs.tv >Browse imageboards in Emacs Org-Mode https://github.com/eNotchy/4g >Emacs Distros https://github.com/caisah/emacs.dz >Elisp Docs: C-h f [function] C-h v [variable] C-h k [keybinding] C-h m [mode] M-x ielm [REPL] https://gnu.org/s/emacs/manual/eintr.html https://gnu.org/s/emacs/manual/elisp.html https://github.com/emacs-tw/awesome-elisp >Common Lisp https://almightylisp.com https://lispcookbook.github.io/cl-cookbook https://cs.cmu.edu/~dst/LispBook https://gigamonkeys.com/book https://lisp-docs.github.io https://awesome-cl.com >Scheme https://scheme.org https://standards.scheme.org https://go.scheme.org/awesome https://research.scheme.org/lambda-papers >Clojure https://clojure.org https://clojure-doc.org https://clojure.land https://www.clojure-toolbox.com https://mooc.fi/courses/2014/clojure https://jafingerhut.github.io/cheatsheet/clojuredocs/cheatsheet-tiptip-cdocs-summary.html >Other https://github.com/dundalek/awesome-lisp-languages >Guix https://guix.gnu.org https://nonguix.org https://systemcrafters.net/craft-your-system-with-guix https://futurile.net/resources/guix https://github.com/franzos/awesome-guix >SICP/HtDP https://web.mit.edu/6.001/6.037/sicp.pdf https://htdp.org >More Lisp Resources https://lisp.nexus https://rentry.org/lispresources (set! thread-link >>>/g/lisp) (set! prev-thread ) >Lisp is a family of programming languages with a long history and a distinctive parenthesized prefix notation. There are many dialects of Lisp, including Common Lisp, Scheme, Clojure and Elisp. >Emacs is an extensible, customizable, self-documenting free/libre text editor and computing environment, with a Lisp interpreter at its core. >Emacs Resources https://gnu.org/s/emacs https://github.com/emacs-tw/awesome-emacs https://github.com/systemcrafters/crafted-emacs >Learning Emacs C-h t (Interactive Tutorial) https://emacs-config-generator.fly.dev https://systemcrafters.net/emacs-from-scratch http://xahlee.info/emacs https://emacs.tv >Browse imageboards in Emacs Org-Mode https://github.com/eNotchy/4g >Emacs Distros https://github.com/caisah/emacs.dz >Elisp Docs: C-h f [function] C-h v [variable] C-h k [keybinding] C-h m [mode] M-x ielm [REPL] https://gnu.org/s/emacs/manual/eintr.html https://gnu.org/s/emacs/manual/elisp.html https://github.com/emacs-tw/awesome-elisp >Common Lisp https://almightylisp.com https://lispcookbook.github.io/cl-cookbook https://cs.cmu.edu/~dst/LispBook https://gigamonkeys.com/book https://lisp-docs.github.io https://awesome-cl.com >Scheme https://scheme.org https://standards.scheme.org https://go.scheme.org/awesome https://research.scheme.org/lambda-papers >Clojure https://clojure.org https://clojure-doc.org https://clojure.land https://www.clojure-toolbox.com https://mooc.fi/courses/2014/clojure https://jafingerhut.github.io/cheatsheet/clojuredocs/cheatsheet-tiptip-cdocs-summary.html >Other https://github.com/dundalek/awesome-lisp-languages >Guix https://guix.gnu.org https://nonguix.org https://systemcrafters.net/craft-your-system-with-guix https://futurile.net/resources/guix https://github.com/franzos/awesome-guix >SICP/HtDP https://web.mit.edu/6.001/6.037/sicp.pdf https://htdp.org >More Lisp Resources https://lisp.nexus https://rentry.org/lispresources (set! thread-link >>>/g/lisp) (set! prev-thread )
𓀐 @aQ6+a?fA: I made something like this, but it relies on a Common Lisp library to do the Japanese to English translation. Ichiran is the Common Lisp library. https://github.com/tshatrov/ichiran On the Emacs side, the requirements are: - You have to have sly or slime running. - org-babel-lisp-eval-fn must be setup to either #'sly-eval or #'slime-eval depending on which CL REPL you're using. - In that CL REPL, you have to (ql:quickload :ichiran) . If you've done all that, you can use this Elisp function to do lookups. (defun ichiran-romanize (phrase) "Romanize a Japanese PHRASE using ichiran. Results are displayed in an *ichiran* `org-mode' buffer. For this to work: 1. `sly' or `slime' must already be running. 2. `org-babel-lisp-eval-fn' must be set appropriately. 3. The ichiran CL library must be loaded into that sly (or slime) instance." (interactive "MPhrase: ") (unless (stringp phrase) (user-error "Phrase must be a string.")) (let* ((result (funcall org-babel-lisp-eval-fn `(cl:multiple-value-list (ichiran:romanize ,phrase :with-info t)))) (romanized-text (car result)) (romanized-info (cadr result)) (buffer (get-buffer-create "*ichiran*")) (window (or (get-buffer-window buffer) (switch-to-buffer-other-window buffer)))) (with-current-buffer buffer (when view-mode (view-mode -1)) (delete-region (point-min) (point-max)) (unless (equal major-mode 'org-mode) (org-mode)) ;; Insert `romanized-text' at the top. (insert (concat romanized-text "\n" ;; Insert a level 1 org headline for each segment. (cl-loop for part in romanized-info concat (concat "* " (car part) " = " (cdr part) "\n\n")))) ;; Fold headlines on initial load. (org-cycle '(4)) (view-mode 1) )))

I also have an Elisp function that takes functions that accept a string and generate a derivative function that works on regions. (defun u/funcall-with-dwim-fn (fn) "Return a function that either operates on the word at point or region if a region is selected. Region selection takes precedence over `word-at-point'." (interactive) (lambda () (interactive) (let* ((query (if (use-region-p) (buffer-substring (use-region-beginning) (use-region-end)) (word-at-point)))) (funcall fn query)))) This is how I apply it to ichiran-romanize to create ichiran-romanize-dwim. (defalias #'ichiran-romanize-dwim (u/funcall-with-dwim-fn #'ichiran-romanize) "Romanize the region or word at point (if no region is selected) with ichiran.") The ichiran-romanize-dwim is the function that I bind to a key to do phrase lookups.

⧖expiring0/1 kept1w ago

𓀐 @Qev~2RzM

⏱ 1w 👍 0

⬆ upvote 0