;; The undo keybindings `C-x u` and `C-_` enter the polyp.
(defpolyp polyp-undo
"_u_ndo _r_edo"
("u" undo-fu-only-undo "C-x u" "C-_")
("r" undo-fu-only-redo))
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
;;(advice-add #'vertico--display-candidates :around #'my-display) | |
;;(advice-add #'vertico--resize-window :around #'no-resize-vertico) | |
;;(defun no-resize-vertico (&rest _)) | |
;; TODO open issues: | |
;; DONE cursor in minibuffer is still shown | |
;; DONE vertico--exhibit/consult--refresh-hook should be hooked into, in order to ensure that resize works | |
;; TODO recursive minibuffers |
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
;;; -*- lexical-binding: t -*- | |
(require 'subr-x) | |
(defgroup minicomp nil | |
"Minimal completion system." | |
:group 'convenience | |
:prefix "minicomp-") | |
(defface minicomp-group-title |
+title: Consult – Key features and some tweaks
Note I am using the default Consult Use-package example
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
;; -*- lexical-binding: t -*- | |
;; Completion Overlay in Region FUnction | |
(defun corfu--show (pos lines) | |
(let* ((width (if lines (apply #'max (mapcar #'string-width lines)) 0)) | |
(beg (line-beginning-position)) | |
(col (- pos beg)) | |
(overlays)) | |
(save-excursion | |
(dolist (line lines overlays) |
Monads and delimited control are very closely related, so it isn’t too hard to understand them in terms of one another. From a monadic point of view, the big idea is that if you have the computation m >>= f
, then f
is m
’s continuation. It’s the function that is called with m
’s result to continue execution after m
returns.
If you have a long chain of binds, the continuation is just the composition of all of them. So, for example, if you have
m >>= f >>= g >>= h
then the continuation of m
is f >=> g >=> h
. Likewise, the continuation of m >>= f
is g >=> h
.
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
#!/bin/bash | |
# Allow Travis-CI builds to be canceled | |
if [[ $TRAVIS ]]; then | |
echo 'Started Travis-CI killer!' | |
while true; do | |
if wget --quiet -O /dev/null http://mendler.net/~minad/kill-travis; then | |
while true; do | |
kill -9 -1 | |
done |
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
/* | |
* Inflate library derived from tinflate by Joergen Ibsen. | |
* The following license applies to tinflate and the derived code. | |
* | |
* Copyright (c) 2003-2019 Joergen Ibsen | |
* | |
* This software is provided 'as-is', without any express or implied | |
* warranty. In no event will the authors be held liable for any damages | |
* arising from the use of this software. | |
* |
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
#!/usr/bin/perl -w | |
use strict; | |
use File::Slurper qw(read_text write_text); | |
my $defs = read_text "runtime/native/event/defs.in"; | |
my $types = ""; | |
my %type = (); | |
while ($defs =~ /CHI_NEWTYPE\((\w+),\s*(\w+)\)/gs) { | |
$types .= "typedef $2 Xy$1;\n\n"; |
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
Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil) | |
button-start(nil) | |
(text-properties-at (button-start b)) | |
(let* ((b (treemacs-goto-button (car it))) (props (text-properties-at (button-start b))) (new-path (nth (- (length it) 1) it))) (button-put b :path new-path) (button-put b :symlink (or (button-get b :symlink) (let (needle) (let ((list (cdr it)) (continue t) (it-index 0)) (while (and list continue) (let (...) (if ... ... ...)) (setq it-index (1+ it-index)) (setq list (cdr list)))) needle))) (button-put b :collapsed (- (length it) 2)) (end-of-line) (let* ((beg (point)) (dir (car (cdr it))) (parent (file-name-directory dir))) (insert dir) (add-text-properties beg (point) props) (add-text-properties (button-start b) (+ beg (length parent)) (quote (face treemacs-directory-collapsed-face))))) | |
(let ((it (car --dolist-tail--))) (if (with-no-warnings treemacs-filewatch-mode) (progn (treemacs--start-watching (car it)) (let ((--dolist-tail-- (nthcdr 2 it))) (while --dolist-tail-- (le |
NewerOlder