This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(destructuring-bind (x y) | |
point | |
(destructuring-bind (x1 y1 w h) | |
frame | |
(let ((x2 (+ x1 w)) | |
(y2 (+ y1 h))) | |
(and (>= x x1) (<= x x2) (>= y y1) (<= y y2))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun parse-relative-time (time-str) | |
(destructuring-bind (sec min hour day month year dow dst zone) | |
(parse-time-string time-str) | |
(destructuring-bind (sec1 min1 hour1 day1 month1 year1 dow1 dst1 zone1) | |
(decode-time) | |
(encode-time (or sec sec1) | |
(or min min1) | |
(or hour hour1) | |
(or day day1) | |
(or month month1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defvar daily-agenda-timer (parse-relative-time "9:00 am")) | |
;; (decode-time daily-agenda-timer) | |
(defun show-daily-agenda () | |
(unless (time-less-p (current-time) daily-agenda-timer) | |
(setq daily-agenda-timer (time-add daily-agenda-timer | |
(seconds-to-time 86400))) | |
(org-agenda-list))) | |
(add-hook 'display-time-hook 'show-daily-agenda) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun tail-f (file) | |
"Create a COMINT mode buffer running the `tail -f` command on | |
specified FILE. If FILE is a ssh/scp style remote file spec, | |
e.g., | |
[email protected]:/path/to/file.txt | |
then a ssh connection is opened to remote.host.com, and `tail -f` | |
is invoked on the remote server." | |
(interactive "fFile: ") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; -*- Mode: Clojure -*- | |
;; This is clojurejs code which is translated to javascript and runs in the browser | |
(defn login-submit! [] | |
(.text ($ ".error") "") | |
(.text ($ "#login-message") "submitting ...")) | |
(defn dialog-close [] (.dialog ($ this) :close)) |
NewerOlder