(message "Starting co-time.el") (let ((temp-co-file "co.tmp") (temp-co-cmd "temp-co-time.cmd")) (when (file-exists-p temp-co-cmd) (error "File must not exist: %s" temp-co-cmd)) (unless (file-exists-p temp-co-file) (error "File not found: %s" temp-co-cmd)) (let* ((co-time-lst (decode-time (nth 5 (file-attributes temp-co-file)))) (co-date (format "%02d%02d%02d" (- (nth 5 co-time-lst) 2000) (nth 4 co-time-lst) (nth 3 co-time-lst))) (co-time (format "%02d:%02d:%02d" (nth 2 co-time-lst) (nth 1 co-time-lst) (nth 0 co-time-lst) )) (co-td-long (format "%02d%02d%02d%02d%02d%02d" (- (nth 5 co-time-lst) 2000) (nth 4 co-time-lst) (nth 3 co-time-lst) (nth 2 co-time-lst) (nth 1 co-time-lst) (nth 0 co-time-lst) )) (co-td co-date) ) (message "%s" co-date) (message "%s" co-time) (find-file temp-co-cmd) (insert (format "set co-date=%s\n" co-date)) (insert (format "set co-time=%s\n" co-time)) (insert (format "set co-dt=%s\n" co-td)) (insert (format "set co-dt-long=%s\n" co-td)) (save-buffer 0) ) )