From 04aa4f97bd1cbcafd44dbad01f6c8a530c00d74e Mon Sep 17 00:00:00 2001 From: noa Date: Sun, 23 Feb 2025 12:21:35 +0800 Subject: Add function for star ratings --- emacs/init.el | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'emacs/init.el') diff --git a/emacs/init.el b/emacs/init.el index 6cdbe97..ff1e7a6 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -610,6 +610,13 @@ With prefix argument TIME, also add the current time." (global-set-key (kbd "") 'noa/insert-date-time) +;; Insert a star rating into the buffer. Currently doesn't check bounds. +(defun noa/star-rating (rating) + "Insert a star rating (★★★☆☆) into the buffer at point as RATING out of five stars." + (interactive "nRating: ") + (insert-char ?★ rating) + (insert-char ?☆ (- 5 rating))) + (defun snarf-song (url) (interactive "sYoutube url:") (async-shell-command -- cgit 1.4.1-2-gfad0