Once the colors just stopped working, recompiling terminfo (see tic) worked for me. Perhaps there was an system wide update of terminfo and the format was changed somehow, so the old compiled files
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 term-git-mode--get-branch () | |
(let ((branches (vc-call-backend 'git 'branches))) | |
(when branches (car branches)))) | |
(define-minor-mode term-git-mode | |
"show current branch in modeline in terminal-modes" | |
:lighter (:eval (let ((git-branch (term-git-mode--get-branch))) | |
(if git-branch | |
(format " git:%s" git-branch) | |
"")))) |
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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; ansi-term | |
(add-hook 'term-exec-hook | |
(lambda () | |
(define-key term-raw-map (kbd "C-c C-y") 'term-paste) | |
(define-key term-raw-map (kbd "C-c y") 'term-paste))) |
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
function trash { | |
TRASHDIR="$HOME/TRASH" | |
DATE="$(date '+%Y-%m-%d_%H:%M:%S.%N')" | |
if [ -z "$1" ]; then | |
echo "usage: $0 <filenames...>" > /dev/stderr | |
exit 1 | |
fi | |
for FILE in "$@"; do |
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 buffer-minus (subtrahend) | |
"This function takes the name of a buffer, | |
and removes every line in the current buffer present in the given one. | |
The lines are removed with `delete-matching-lines' which uses the given string as a regex | |
but it is good enough..." | |
(interactive "*b") | |
(let ((sub-list | |
(with-current-buffer subtrahend | |
(string-split (buffer-string) "\n" t "[\t ]+")))) | |
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 mo-paging--what-page () | |
"Print page and line number of point." | |
(interactive) | |
(save-restriction | |
(widen) | |
(save-excursion | |
(let ((count 1) | |
(opoint (point))) | |
(goto-char (point-min)) | |
(while (re-search-forward page-delimiter opoint t) |
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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; tmacs | |
(defvar tmacs--counter 0) | |
(defun tmacs--find-free-number () | |
(cl-do ((num 0 (+ 1 num))) | |
((not (get-buffer (format "*tmacs<%s>*" num))) | |
num))) | |
(defun tmacs () | |
(interactive) |
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
;;;;; insert pair -- "Surround" | |
(global-set-key (kbd "<f12> s \"") 'insert-pair) | |
(global-set-key (kbd "<f12> s '") 'insert-pair) | |
(global-set-key (kbd "<f12> s (") 'insert-pair) | |
(global-set-key (kbd "<f12> s [") 'insert-pair) | |
(global-set-key (kbd "<f12> s {") 'insert-pair) | |
(global-set-key (kbd "<f12> s <") 'insert-pair) |
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
function trash { | |
TRASHDIR="$HOME/TRASH" | |
DATE="$(date '+%Y-%m-%d_%H:%M:%S.%N')" | |
if [ -z "$1" ]; then | |
echo "usage: $0 <filenames...>" > /dev/stderr | |
exit 1 | |
fi | |
for FILE in "$@"; do |