TIFO that you can just use Ctrl+r <reg> to insert registers in vim.

So to insert X selection, C-r *, and to insert the clipboard, C-r +.

Nice thing is these work in the command line too. Unlike you can't use all your global bindings in the command line in (it'd be neat to have a "modal commandline" mode in Vim maybe).

Emacsconf favs:

Incremental Parsing with emacs-tree-sitter;
Tuấn-Anh Nguyễn

Lakota Language and Emacs;
Grant Shangreaux

Maxima a computer algebra system in Emacs;
Fermin MF

Object Oriented Code in the Gnus Newsreader;
Eric Abrahamsen

On that last one, lil emacs horrors: gnus has it's own OOP system separate from emacs' one.

I think I got a neat org agenda setup this time.

Or maybe it's because the semester is not on yet so I don't have any scheduled items or deadlines.

This was somewhat inspired by reddit.com/r/emacs/comments/is, with some code taken from there. My setup's source available at: github.com/cadadr/configuratio

Binomial pdf in Lisp

(require 'cl-lib)

(defun // (&rest args)
(apply #'/ (mapcar #'float args)))

(defun factorial (n)
(cl-reduce #'* (number-sequence 1 n)))

;; R’s dbinom(x, prob, size) [arg order flipped]
(defun binom (x theta n)
(let ((n! (factorial n))
(x! (factorial x)))
(* (// n!
(* x! (factorial (- n x))))
(expt theta x)
(expt (- 1 theta)
(- n x)))))

Factorial in Lisp looks somewhat cool:

(require 'cl-lib)
(defun factorial (n)
(cl-reduce #'* (number-sequence 1 n)))

BTW Emacs is pretty lacky in maths functions department.

After almost a decade of using , it's today that I'm finally bothered by having to cancel and retype after a typo when searching incrementally that I read the manual and find out that C-M-d deletes a char and M-e edits the search string in minibuffer...

TIFO you can decompose a unicode character with diacritics in using

(get-char-code-property char 'decomposition)


(get-char-code-property ?õ 'decomposition)

will return

'(111 771)

or better:

(mapcar (lambda (c) (get-char-code-property c 'name)) (get-char-code-property ?õ 'decomposition))

will return


hidden gem: follow-mode gnu.org/software/emacs/manual/

If you have some vertical splits with the same buffer in them, you can enable this mode to view one large contiguous view spread out to those windows, and it syncs the movements. If you have a large screen, you can see two, three, four or more screenfuls of text simultaneously.

Wombat is a lovely theme from ' defaults, but I don't like its colours for headlines. Here is a nicer scheme:

(let ((colours ["yellow green" "khaki" "dark sea green" "light sea green" "steel blue" "slate blue" "orchid" "hotpink"]))
(dotimes (i 7)
(let ((face (intern (format "org-level-%d" (1+ i)))))
(set-face-attribute face nil :foreground (aref colours i)))))

I'm redoing my org-mode to PDF setup, and its working great and predictably. I've used the new setup for an assignment which came out well. Now doing the second, I only checked the PDF output twice for a 6/7 page long report.

I'm using Zotero + Org mode, and instead of org-ref, which is huge + depends on helm & hydra which I don't want, I'm writing some org-mode macros that expand to relevant LaTeX.

Gotta write a blog about this sometime soon.

If any forecast.el users happen to be looking: it uses darksky.net as the data backend, which was recently acquired by who'll shut the API down by the end of 2021. They've also switched to Apple's privacy policy.

I'll rewrite it some time in the coming months, but it'll continue to function, and because it's a switch from one private company to another, I doubt it'll be a huge difference privacy-wise. Still, I'll use something more open for the rewrite.


If any of you were using forecast.el (or calendar.el in general), you can use github.com/ieure/geoclue to set your calendar-* variables with org.freedesktop.GeoClue2 as such:

(let* ((whereami (geoclue-location))
(lat (assoca 'latitude whereami))
(long (assoca 'longitude whereami))
(desc (assoca 'description whereami)))
(setf calendar-location-name desc
calendar-latitude lat
calendar-longitude long))

Fed up with links like file:x.pdf::PDF-1.7\123\234\421?

(define-advice org-store-link (:around (fn &rest args) fuck-pdf-version-cruft)
"Disable context in PDFs and other non-text documents"
(let ((org-context-in-file-links
(and org-context-in-file-links
(not (member major-mode
'(pdf-view-mode doc-view-mode))))))
(apply fn args)))

Notes on Poetry Package Manager for Python: gkayaalp.com/blog/20190617_pyt

tl;dr is a nice, standards-abiding tool, w/o 's drama and issues. Main downside is it's less popular, but I like it better overall. It was easy to integrate into my and shell usage.

tip: nicer behaviour in agenda when you hit RET:

(define-advice org-agenda-switch-to
(:around (fn &rest args) in-other-window)
"Show the buffer in a bottom side window and switch to it."
(let (buf ret)
(setq buf (save-window-excursion
(setq ret (apply fn args))
(message (buffer-name))
(display-buffer-in-side-window buf '((side . bottom)))
(select-window (get-buffer-window buf))

BTW News is a great blog/newsletter, I really suggest you follow them. Besides her blog, it is also posted to the Emacs Tangents mailing list. It is really low volume (actually it only has Emacs News most of the time).



Show thread

Just looked at , the extensible editor for the 21st century. To configure it, you need to use: Less (A CSS extension), CSON (JSON but w/ CoffeeScript syntax), and ES6 (the most recent version of JS) or CoffeeScript.

Compare it with where only is needed.

It's been a while since I last looked at it, but is better. Just ClojureScript. And it is a Lisp, meaning it is easier to program it interactively à la Emacs.

Mastodon @ SDF

"I appreciate SDF but it's a general-purpose server and the name doesn't make it obvious that it's about art." - Eugen Rochko