Skip to content

Instantly share code, notes, and snippets.

@Inc0n
Inc0n / main.el
Last active October 19, 2022 21:26
emacs simple vanila org modern todo and priority clone
(with-eval-after-load 'org-faces
(setq org-todo-keyword-faces
(append
(cl-loop for todo in '("TODO" "NEXT" "STARTED" "PROJECT" "HOLD")
with faces = '(:height 0.8 :inherit (org-modern-todo))
collect (cons todo faces))
(cl-loop for todo in '("CANCELLED" "DONE")
with faces = '(:height 0.8 :inherit (org-modern-done))
collect (cons todo faces)))
org-priority-faces
@Inc0n
Inc0n / emacs-trailing-space.el
Last active March 5, 2021 11:27
My emacs auto delete trailing white space setup, that only operate on the region of the buffer that is show in the current window
(setq show-trailing-whitespace t)
(defun my-prog-nuke-trailing-whitespace ()
(when (derived-mode-p 'prog-mode)
(let ((win-beg (window-start))
(win-end (window-end))
(line-beg (line-beginning-position))
(line-end (line-end-position)))
(if (or (< line-beg win-start)
(> line-end win-end))
@Inc0n
Inc0n / graph.lisp
Last active May 12, 2020 23:40
alloy graph
(let* ((data (make-instance 'data))
(freq (alloy:represent (frequency data) 'alloy:ranged-slider
:range '(.1 . 10) :step 0.1))
(phas (alloy:represent (wavephase data) 'alloy:ranged-slider
:range (cons 0 PI) :step 0.1))
(amps (alloy:represent (amplitude data) 'alloy:ranged-slider
:range '(0 . 100)))
(plot (alloy:represent (lambda ((frequency (frequency data))
(amplitude (amplitude data))
(phase (wavephase data)))