;;; -*- lexical-binding: t -*- ;;; ;;; this file: ;;; http://user.it.uu.se/~embe8573/emacs-init/time-my.el ;;; https://dataswamp.org/~incal/emacs-init/time-my.el (require 'subr-x) (require 'time-my-insert) (defvar *timer-test-var*) (setq *timer-test-var* 0) (defun timer-test () (cl-incf *timer-test-var*) ) ;; (run-at-time "00:00" (* 24 60 60) #'timer-test) (defun message-shell-command-output (command) (interactive "s$ ") (with-temp-buffer (shell-command command 1) (message (buffer-substring (point-min) (1- (point-max)))) )) ;; this relies on the zsh function long-date, ;; see: https://dataswamp.org/~incal/conf/.zsh/time (defun show-time-and-date (&optional insert) (interactive "P") (let ((date-script "long-date")) (if insert (insert-shell-command date-script) (message-shell-command-output date-script) ))) (defalias 'd #'show-time-and-date) (provide 'time-my)