Skip to content

Instantly share code, notes, and snippets.

@Chobbes
Chobbes / find-fundamental.el
Created November 30, 2018 15:51
Force a file to open in fundamental-mode.
;; Open a file in fundamental mode.
(defun find-fundamental ()
(interactive)
(cl-letf (((symbol-function 'normal-mode) #'fundamental-mode))
(call-interactively 'find-file)))
@Chobbes
Chobbes / tmux.el
Created November 16, 2018 03:03
emacs tmux
(define-prefix-command 'tmux-map)
(global-set-key (kbd "C-o") 'tmux-map)
(defun split-window-right-and-focus ()
(interactive)
(select-window (split-window-right)))
(defun split-window-below-and-focus ()
(interactive)
(select-window (split-window-below)))
@Chobbes
Chobbes / pg-next-command.el
Last active November 12, 2018 15:19
Make proof-general's next command put the cursor at the end of the next unprocessed command
(defun proof-assert-after-next-command ()
(interactive)
(proof-assert-next-command-interactive)
(let* ((segment (car (proof-segment-up-to-using-cache (point))))
(type (car segment))
(command-end (- (caddr segment) (if (eq type 'comment) 2 1))))
(goto-char command-end)))
(eval-after-load "proof-script"
'(progn
@Chobbes
Chobbes / retract-same-position.el
Created February 17, 2018 19:18
Proof-rectract-buffer Maintaining position
(defun retract-same-position ()
"Call proof-retract-buffer, but retain position"
(interactive)
(push-mark)
(proof-retract-buffer)
(pop-mark))

Keybase proof

I hereby claim:

  • I am chobbes on github.
  • I am chobbes (https://keybase.io/chobbes) on keybase.
  • I have a public key whose fingerprint is F9B2 924F 3E05 A6CA 4E56 9C4E FB00 A0DD A3E3 B84C

To claim this, I am signing this object: