[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to test a buttonizer
From: |
Eduardo Ochs |
Subject: |
Re: How to test a buttonizer |
Date: |
Fri, 6 Jan 2023 10:06:27 -0300 |
On Fri, 6 Jan 2023 at 09:25, Jean Louis <bugs@gnu.support> wrote:
>
> # (find-ecolor-links (ee-color-choose-tk "gold"))
>
> Can't execute:
> let: Symbol’s function definition is void: ee-write-string
Ouch! `ee-write-string' is in a module of eev that is not loaded by
default... here are two workarounds - I didn't test them, but any of
them should work. first,
(require 'eev-prepared)
second:
(defun ee-octal-to-num (str)
"Convert STR - a sequence of octal digits - to a number."
(let ((lastv (- (string-to-char (substring str -1)) ?0))
(rest (substring str 0 -1)))
(if (string= "" rest) lastv (+ lastv (* 8 (ee-octal-to-num rest))))))
(defun ee-write-string (str &optional altfile fmode)
"Write STR to ALTFILE, or to ee-file if ALTFILE is nil.
FMODE should be either nil or a string containing a sequence of
octal digits; if it is not nil then do the equivalent of a
\"chmod FMODE file\"."
(let ((fname (substitute-in-file-name (or altfile ee-file))))
(write-region str nil fname) ; a standard kludge
(if fmode (set-file-modes fname (ee-octal-to-num fmode)))))
I will fix that in eev in the weekend, and after the fix the
workarounds won't be necessary anymore.
More soon!
E.