Skip to content

Instantly share code, notes, and snippets.

jgarvin

Block or report user

Report or block jgarvin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jgarvin
jgarvin / gist:a6c4f45500386c4f2a13
Created Jan 27, 2015
mandimus network implementation
View gist:a6c4f45500386c4f2a13
;; needed for with-timeout
(require 'timer)
(defvar md-server-clients '())
(defvar md-server-eval-timeout 5)
(defun md-server-start nil
(interactive)
(unless (process-status "mandimus-eval-server")
(make-network-process :name "mandimus-eval-server"
View eshell-hist-dirs.el
(defvar-local eshell-hist-dirs nil)
(defvar-local eshell-hist-index 0)
(defun etc-eshell-update-hist-dir ()
;; prevent "cd /tmp" over and over from making new entries
(when (not (equal (car (last eshell-hist-dirs)) (eshell/pwd)))
(push (eshell/pwd) eshell-hist-dirs)))
(add-hook 'eshell-directory-change-hook #'etc-eshell-update-hist-dir)
View backtrace.el
(wrong-type-argument char-or-string-p [nil 22077 4073 787364 1 etc-clear-truncate-timer (#<buffer $shell<5>>) nil 553000])
helm-mm-exact-match([nil 22077 4073 787364 1 etc-clear-truncate-timer (#<buffer $shell<5>>) nil 553000])
#[0 "\300\211\205\215\211@\307\"\204\206\310!\305\301\203\301!\202!\203\205\307\"\204\205\311\303\236\2047\312\313#\210\314\315\303\"\211\203k\211<\203f\316!\204f\211\317:\203a@\262\211!\262A\262\202L\266\202k\211!\262\210\306\306\242B\240\210\304\211\242T\240\210\304\242\302U\203\205\320\321\317\"\210\210A\266\202\202\207" [([nil 22077 4073 787364 1 etc-clear-truncate-timer (#<buffer $shell<5>>) nil 553000] [nil 22077 4074 0 1 buffer-tail ("*mandimus-server*") nil 0] [nil 22077 4087 730233 60 etc-set-repeat-rate nil nil 16000] [nil 22077 4102 266712 30 erc-server-send-ping (#<buffer irc.freenode.net:6667>) nil 804000] [nil 22077 4206 596849 300 savehist-autosave nil nil 963000] [nil 22077 53928 0 86400 run-hooks (midnight-hook) nil 0]) nil 10
View gist:70d747a9ee9b4b0b5683035d9080643d
(defun mouse-button-pressed-p ()
"Return non-nil if last event is a mouse-button down event."
(run-hooks 'mouse-leave-buffer-hook)
(and (consp last-input-event)
(string-match-p "down-mouse-" (format "%s" (car last-input-event)))))
(defun etc-maybe-recenter ()
(unless (or
;; don't interfere with erc scroll-to-bottom
@jgarvin
jgarvin / gist:ce37d08654978fd7e4c9
Created Jan 13, 2015
Implementation of minibuffer 'belts'
View gist:ce37d08654978fd7e4c9
(require 'cl) ;; defstruct
;; TODO: overwrite existing characters, don't erase the
;; whole buffer everytime. And only update things that
;; are actually different.
(defvar md-belt-item-max 8)
(defvar md-current-message nil)
(defvar md-message-counter 0)
(defvar md-num-belts 3)
You can’t perform that action at this time.