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 hidden or 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
## source this | |
## the DEBUG-trap seems to be executed AFTER the setting of the alarm, so this seems to help | |
function my_clear_alarm() { | |
trap true SIGALRM | |
} | |
trap my_clear_alarm DEBUG |
This file contains hidden or 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
;; in 27.2 ansi-term and some modification of xterm-paste don't work together so good | |
;; (results in a hang which you can only get out of by ^G | |
;; this solves it | |
(require 'term) ;; so this gets not overwritten the wrong way round | |
(defun term--xterm-paste (ev) | |
"Insert the text pasted in an XTerm bracketed paste operation." | |
(interactive "e") | |
(term-send-raw-string (cadr ev))) |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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))) |
NewerOlder