䷋ Standstill

The great departs; the small approaches
This commit is contained in:
nik gaffney 2021-01-17 13:07:56 +01:00
parent 85b6a2f2b9
commit d830650704
2 changed files with 22 additions and 12 deletions

View file

@ -13,7 +13,7 @@ The (first) appearance of anything (as a bud) is what we call a semblance; when
** Install & configure ** Install & configure
The package can be installed from [[https://melpa.org/][MELPA]] or manually via [[https://github.com/zzkt/i-ching][github]]. The package can be installed from [[https://melpa.org/][MELPA]] (eventually) or manually via [[https://github.com/zzkt/i-ching][github]].
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package i-ching (use-package i-ching

View file

@ -49,9 +49,9 @@
;;; Code: ;;; Code:
(require 'request) (require 'request)
(defgroup i-ching '() (defgroup i-ching '()
"Cast hexagrams and consult the I Ching." "Cast hexagrams and consult the I Ching."
:prefix "i-ching-"
:group 'stochastism) :group 'stochastism)
;; configuration and customisation ;; configuration and customisation
@ -528,6 +528,7 @@ c.f. The Superior man (Legge, Wilhem), Noble young one (Hatcher), 't
(when unicode-name (when unicode-name
(capitalize (seq-drop unicode-name 13))))) (capitalize (seq-drop unicode-name 13)))))
;;;###autoload
(defun i-ching-describe-hexagram (point mark) (defun i-ching-describe-hexagram (point mark)
"Show the name of a HEXAGRAM (between POINT and MARK) based on it's unicode name." "Show the name of a HEXAGRAM (between POINT and MARK) based on it's unicode name."
(interactive "r") (interactive "r")
@ -627,6 +628,15 @@ see: `i-ching-divination-method' & `i-ching-randomness-source' for details."
(i-ching-number-to-hexagram number) (i-ching-number-to-hexagram number)
(i-ching-cast)))) (i-ching-cast))))
;;;###autoload
(defun i-ching-insert-hexagram-and-name (&optional number)
"Insert a hexagram either by casting or it's NUMBER in the King Wen sequence."
(interactive)
(let ((hxn (i-ching-random 64)))
(insert (format "%s %s"
(i-ching-number-to-hexagram hxn)
(i-ching-number-to-name hxn)))))
;;;; ; ; ;;;;; ; ; ; ;;;; ; ; ;;;;; ; ; ;
;; ;;
@ -651,7 +661,7 @@ see: `i-ching-divination-method' & `i-ching-randomness-source' for details."
(defun i-ching-q64 () (defun i-ching-q64 ()
"Genuine Quantum Randomness™ from quantum fluctuations of the vacuum. "Genuine Quantum Randomness™ from quantum fluctuations of the vacuum [1..64].
Provided by ANU QRNG via https://qrng.anu.edu.au/" Provided by ANU QRNG via https://qrng.anu.edu.au/"
(let ((numeric 0)) (let ((numeric 0))
(request (request
@ -669,7 +679,7 @@ Provided by ANU QRNG via https://qrng.anu.edu.au/"
(defun i-ching-r64 () (defun i-ching-r64 ()
"True random numbers [1..64] from atmospheric noise. "True random numbers from atmospheric noise [1..64].
Provided by Randomness and Integrity Services Ltd. via https://www.random.org/" Provided by Randomness and Integrity Services Ltd. via https://www.random.org/"
(let ((numeric 0)) (let ((numeric 0))
(request (request