Skip to content

Instantly share code, notes, and snippets.

View clemera's full-sized avatar

Clemens Radermacher clemera

View GitHub Profile
@alphapapa
alphapapa / native-comp-convenience.org
Created September 19, 2020 20:01
Emacs native-comp branch convenience c ode

Emacs native-comp Recipes

For lack of a better term.

Update Docker image

  1. Update Andrea’s image.
@rougier
rougier / tag.el
Last active May 29, 2024 15:51
Rounded boxed tags for Emacs
;; ---------------------------------------------------------------------
;; Tag minor mode
;; Copyright (C) 2020 Nicolas .P Rougier
;;
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
@rougier
rougier / Toolbar.el
Created November 30, 2020 12:05
Emacs SVG Toolbar
;; An experiment for an SVG toolbar using icons from material.io
;;
;; Example usage: (toolbar 48 "black" "white" t t)
;; Material icons freely available (Apache 2 license) from
;; - https://material.io/resources/icons/?style=outline
;; - https://github.com/google/material-design-icons
(require 'xml) (require 'svg)
(defun toobar-item (label icon fg-color bg-color size with-icon with-label)
@alanthird
alanthird / svg-text.el
Last active April 10, 2021 09:16
Use SVGs to replace text in Emacs
;; Score out this text
(require 'svg)
(defun replace-text (start end)
(let* ((str (buffer-substring start end))
(scale (cadr (assoc :height (assoc 'default face-remapping-alist))))
(family (face-attribute 'default :family))
(height (* (aref (font-info family) 2) (if scale scale 1)))
(ascent (* (aref (font-info family) 8) (if scale scale 1)))
(img (svg-create (car (window-text-pixel-size nil start end))