Permalink
Cannot retrieve contributors at this time
Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign up
Fetching contributors…
| ;; -*- no-byte-compile: t; -*- | |
| (defun help/get-timestamp () | |
| "Produces a full ISO 8601 format timestamp." | |
| (interactive) | |
| (let* ((timestamp-without-timezone (format-time-string "%Y-%m-%dT%T")) | |
| (timezone-name-in-numeric-form (format-time-string "%z")) | |
| (timezone-utf-offset | |
| (concat (substring timezone-name-in-numeric-form 0 3) | |
| ":" | |
| (substring timezone-name-in-numeric-form 3 5))) | |
| (timestamp (concat timestamp-without-timezone | |
| timezone-utf-offset))) | |
| timestamp)) | |
| (defun help/insert-timestamp () | |
| "Inserts a full ISO 8601 format timestamp." | |
| (interactive) | |
| (insert (help/get-timestamp))) | |
| (defun help/get-timestamp-no-colons () | |
| "Produces a full ISO 8601 format timestamp with colons replaced by hyphens." | |
| (interactive) | |
| (let* ((timestamp (help/get-timestamp)) | |
| (timestamp-no-colons (replace-regexp-in-string ":" "-" timestamp))) | |
| timestamp-no-colons)) | |
| (defun help/insert-timestamp-no-colons () | |
| "Inserts a full ISO 8601 format timestamp with colons replaced by hyphens." | |
| (interactive) | |
| (insert (help/get-timestamp-no-colons))) | |
| (defun help/insert-datestamp () | |
| "Produces and inserts a partial ISO 8601 format timestamp." | |
| (interactive) | |
| (insert (format-time-string "%F"))) | |
| (setq help/default-gc-cons-threshold gc-cons-threshold) | |
| (defun help/set-gc-cons-threshold (&optional multiplier notify) | |
| "Set `gc-cons-threshold' either to its default value or a | |
| `multiplier' thereof." | |
| (let* ((new-multiplier (or multiplier 1)) | |
| (new-threshold (* help/default-gc-cons-threshold | |
| new-multiplier))) | |
| (setq gc-cons-threshold new-threshold) | |
| (when notify (message "Setting `gc-cons-threshold' to %s" new-threshold)))) | |
| (setq load-prefer-newer t) | |
| (add-to-list 'load-path "~/src/org-mode/lisp") | |
| (add-to-list 'load-path "~/src/org-mode/contrib/lisp") | |
| (setq org-list-allow-alphabetical t) | |
| (setq org-enforce-todo-checkbox-dependencies t) | |
| (setq org-babel-noweb-wrap-start "⟪") | |
| (setq org-babel-noweb-wrap-end "⟫") | |
| (require 'org) | |
| (defun help/double-gc-cons-threshold () "Double `gc-cons-threshold'." (help/set-gc-cons-threshold 2)) | |
| (add-hook 'org-babel-pre-tangle-hook #'help/double-gc-cons-threshold) | |
| (add-hook 'org-babel-post-tangle-hook #'help/set-gc-cons-threshold) | |
| (defun help/display-system-info () | |
| (interactive) | |
| (message "<<<ECM Information>>>\nThis buffer file: %s\nAs Of: %s\nOrg-Version: %s\nOrg-Git-Version:%s\nEmacs-Version: %s\nNoweb wrap start and stop delimeters: '%s' and '%s'\norg-babel-default-header-args:\n" | |
| buffer-file-name | |
| (help/get-timestamp) | |
| (org-version) | |
| (org-git-version) | |
| (emacs-version) | |
| org-babel-noweb-wrap-start | |
| org-babel-noweb-wrap-end) | |
| (pp org-babel-default-header-args)) | |
| (help/display-system-info) |