Code Snippets Emacs Lisp

Short texts Emacs Lisp 🧑‍💻 Code snippets Emacs Lisp ✍️ Reading lists Emacs Lisp 👀

test

(defun gist-description () (shell-quote-argument (read-from-minibuffer “Gist description: “))) (defun gist-filename () (let ((file (file-name-nondirectory (buffer-file-name (current-buffer))))) (read-from-minibuffer (format “File name (%s): ” file) file)))

gist

(leaf my:gist :config (bind-key “@” ‘dired-do-gist dired-mode-map) (bind-key “C-c g” ‘gist-region-or-buffer) (bind-key “C-c v” ‘chromium-gist) (bind-key “C-c l” ‘lepton) :init (defun gist-description () (shell-quote-argument (read-from-minibuffer “Gist description: “))) (defun gist-filename () (let ((file (file-name-nondirectory (buffer-file-name (current-buffer))))) (read-from-minibuffer (format “File name (%s): ” file) file))) (defun gist-region-or-buffer () “Get buffer-fike-name do gist and open in browser.” […]

gist

;;; 70_gist.el — Emacs do gist configurations. -*- lexical-binding: t; no-byte-compile:t -*- ;;; Commentary: ;;; Code: ;; (setq debug-on-error t) (leaf my:gist ;; :ensure t :bind ((“C-c g” . gist-region-or-buffer) (“C-c v” . open-gist-web-page) (“C-c l” . lepton)) ;; :custom ;; (gist-view-gist . t) ;; (gist-ask-for-description . t) ;; (gist-ask-for-filename . t) :init (defun open-gist-web-page […]

Emacs do gist

(leaf gist :ensure t :bind ((“C-c g” . gist-region-or-buffer) (“C-c v” . open-gist-web-page) (“C-c l” . lepton)) :custom (gist-view-gist . t) (gist-ask-for-description . t) (gist-ask-for-filename . t) :config (defun open-gist-web-page () “Open GitHub Gist page with chrome.” (interactive) (browse-url “https://gist.github.com/minorugh”)) (defun lepton () “Open Lepton application.” (interactive) (compile “~/Appimage/Lepton-1.10.0.AppImage”) (delete-other-windows)) :init (defun dired-do-gist () “Get […]

text-math.el

(require ‘texmathp) (require ‘abbrev) (defvar text-math-abbrevs ‘(f g h i j k l m n p q r s t u v w x y z) “Symbols for characters (or words) that will be literally expanded but inside math fences.”) (defun text-math–generate-abbrevs () (cl-loop for s in text-math-abbrevs collect `(,(symbol-name s) ,(format “\\(%s\\)” s) nil […]