I hereby claim:
- I am spacebat on github.
- I am spacebat (https://keybase.io/spacebat) on keybase.
- I have a public key whose fingerprint is 0929 8712 0340 D898 4381 69DD 3067 D9AD 2796 55F6
To claim this, I am signing this object:
| (let ((data '((a 1 2 3)(c 5 6 7))) | |
| (insert '(b x y z))) | |
| (loop for prev on data | |
| for next on (cdr data) | |
| if (and next (eq (caar next) 'c)) | |
| do (let ((newcons (cons insert next))) | |
| (setcdr prev newcons))) | |
| data) |
| (setq month-names '("January" "February" "March" "April" "May" "June" "July" "August" "September" "October" "November" "December")) | |
| (setq month-names-to-numbers (loop for name in month-names for number from 1 collect (cons name number))) | |
| (defun month-name-to-number (name) | |
| (or (cdr (assoc name month-names-to-numbers)) | |
| (error "Month not recognized: '%s'" name))) | |
| (defun month-name-to-number-nice (name) | |
| (let ((number (month-name-to-number name))) |
| ;;; The macro: | |
| (defmacro add-hook-one-time (hook function) | |
| "Add FUNCTION to HOOK. Remove it after its first execution." | |
| (let ((wrapper-function (make-symbol "wrapper-function-symbol"))) | |
| `(progn | |
| (defun ,wrapper-function () | |
| "Wrapper function that will be executed only once, and then removed from the hook." | |
| (funcall ,function) | |
| (remove-hook ,hook ',wrapper-function)) | |
| (add-hook ,hook ',wrapper-function)))) |
| (require 'bookmark) | |
| (defvar my-doc-view-bookmark-push-p nil | |
| "Whether to push automatic doc-view bookmarks, or clobber them.") | |
| (defun my-doc-view-open-handler () | |
| (bookmark-jump (buffer-name))) | |
| (defun my-doc-view-save-handler () | |
| (if (eq major-mode 'doc-view-mode) |
| #!/usr/bin/env perl | |
| # ABSTRACT: proof of concept for sending subs to a child process for evaluation | |
| use strict; | |
| use warnings; | |
| use v5.10; | |
| use Data::Dumper; | |
| use Socket; | |
| use Time::HiRes qw(sleep); |
| (setq org-capture-templates | |
| (("a" "Appointment" entry | |
| (file+headline | |
| (concat org-directory "/taskdiary.org") | |
| "Calendar") | |
| "* APPT %^{Description} %^g\n%?\nAdded: %U") | |
| ("n" "Notes" entry | |
| (file+datetree | |
| (concat org-directory "/taskdiary.org")) | |
| "* %^{Description} %^g %?\nAdded: %U") |
| (cl-defun template-expand (string data &key | |
| recur | |
| (notation "${\\([^}]+\\)}") | |
| (default (lambda (x) (error "No expansion found for '%s'" x)))) | |
| "Expand variables from the alist `DATA' into the string `STRING'. | |
| The `RECUR' parameter triggers expansion of variables found in | |
| the substituted text. |
| (defun source-env-get (script &rest vars) | |
| "Source script in shell, then look for vars in the resulting subshell environment" | |
| (loop for line in (split-string (shell-command-to-string (concat "source " script " && set")) "[\n]" t) | |
| with result | |
| if (string-match "^\\([[:alpha:]]+\\)=\\(.*\\)$" line) | |
| do (let ((var (match-string 1 line)) | |
| (val (match-string 2 line))) | |
| (when (or (not vars) (member var vars)) | |
| (push (cons var val) result))) | |
| finally return result)) |
| (defun lexbind-insert-lexbind-enablement (&optional verbose) | |
| "Attempt to set `lexical-binding' to t in the current buffer's | |
| prop-line." | |
| (macrolet ((with-prop-line (&rest body) | |
| `(save-excursion | |
| (save-restriction | |
| (goto-char 1) | |
| (forward-line 1) | |
| (narrow-to-region 1 (point)) | |
| (goto-char (point-min)) |
I hereby claim:
To claim this, I am signing this object: