From 706052ba196797fd32e6d6d05e059b1f5dd4f2c9 Mon Sep 17 00:00:00 2001 From: nik gaffney Date: Mon, 8 Feb 2021 13:51:52 +0100 Subject: [PATCH] =?UTF-8?q?=E4=B7=92=20Approach?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thus become inexhaustible in your instruction and unflagging in your nourishing support of people. --- i-ching.el | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/i-ching.el b/i-ching.el index e4efdad..dba5900 100644 --- a/i-ching.el +++ b/i-ching.el @@ -631,13 +631,23 @@ see: `i-ching-divination-method' & `i-ching-randomness-source' for details." ;;;###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 ((hexagram (if number + number + (i-ching-random 64)))) + (insert (i-ching-hexagram-and-name-string hexagram)))) + + +;;;###autoload +(defun i-ching-hexagram-and-name-string (&optional number) + "Return a hexagram either by casting or it's NUMBER in the King Wen sequence." (interactive) (let ((hexagram (if number number (i-ching-random 64)))) - (insert (format "%s %s" - (i-ching-number-to-hexagram hexagram) - (i-ching-number-to-name hexagram))))) + (format "%s %s" + (i-ching-number-to-hexagram hexagram) + (i-ching-number-to-name hexagram)))) ;;;; ; ; ;;;;; ; ; ; @@ -704,7 +714,7 @@ Provided by Randomness and Integrity Services Ltd. via https://www.random.org/" ;; (0 1) is yin changing to yang ;; (1 1) is yang ;; (0 0) is yin -;; (1 0) is yang changing to yinn +;; (1 0) is yang changing to yin ;; ;;;;;;; ; ; ;