Am attempting to insert either a Latex Command or a UTF-8 Symbol
to a buffer, but the pcase
is giving me "No Match"
when selecting
"bigodot"
.
grafm
in expected to me modified by removing the UTF-8
Symbol, by
taking the first word before the first space, and use just the string
descriptor "bigodot"
for use with the pcase
clause.
(defun imprint (selector kmstr &optional grapheme)
"Insert Latex Command or the equivalent UTF-8 grapheme."
(if (or (not grapheme) (equal selector "Command"))
(insert kmstr)
(insert grapheme)))
;;-------------------------------------
(defun bigops (grafm seltr)
"Binary Operations."
(interactive
(let ( (csel ("Symbol" "Command"))
(cseq ("bigodot ⨀" "bigoplus ⨁︁" "bigotimes ⨂︁")) )
(list
(completing-read "Grapheme: " cseq nil t "bigcap ⋂")
(completing-read "Selector: " csel nil t "Command")) ))
(setq grafm (car (split-string grafm)))
(message "Grafm: .%S." grafm)
(pcase grafm
("bigodot" (imprint seltr "\bigodot" "⨀"))
("bigoplus︁" (imprint seltr "\bigoplus" "⨁︁"))
("bigotimes︁" (imprint seltr "\bigotimes" "⨂︁"))
(_ (message "%s" "No Match")) ))