From: Mark Wooding Date: Mon, 17 Jul 2017 12:43:53 +0000 (+0100) Subject: el/dot-emacs.el: Use `string-to-number' instead of `parse-integer'. X-Git-Url: https://git.distorted.org.uk/~mdw/profile/commitdiff_plain/355d133685f884d7cf687d9d11a5e1dbb978dcab?hp=a20f5ea0c2c26cd533c02f9647aa531bd7b552f9 el/dot-emacs.el: Use `string-to-number' instead of `parse-integer'. Not sure where the latter came from (except that it's the Common Lisp function for doing this job), but it doesn't work on a freshly started instance. --- diff --git a/el/dot-emacs.el b/el/dot-emacs.el index be261ec..09b3960 100644 --- a/el/dot-emacs.el +++ b/el/dot-emacs.el @@ -3784,13 +3784,13 @@ there is sadness." (duration-string (cdr (assq 'Time mpc-status))) (time-string (cdr (assq 'time mpc-status))) (time (and time-string - (parse-integer + (string-to-number (if (string-match ":" time-string) (substring time-string 0 (match-beginning 0)) (time-string))))) (duration (and duration-string - (parse-integer duration-string))) + (string-to-number duration-string))) (pos (and time duration (format " [%d:%02d/%d:%02d]" (/ time 60) (mod time 60)