Skip to content

Instantly share code, notes, and snippets.

View xenodium's full-sized avatar
😸
[in Emacs]

xenodium

😸
[in Emacs]
View GitHub Profile
@xenodium
xenodium / send-to-kindle-as-pdf.el
Last active September 15, 2023 06:17
Select some text and invoke via M-x send-to-kindle-as-pdf
(defcustom send-to-kindle-from-email
nil
"Your own email address to send from via mu4e."
:type 'string
:group 'send-to-kindle)
(defcustom send-to-kindle-to-email
nil
"Your Kindle email address to send pdf to."
:type 'string
@xenodium
xenodium / send-to-kindle-as-txt.el
Last active September 16, 2023 19:36
Select text in an Emacs buffer and send with M-x send-to-kindle-as-txt
(defcustom send-to-kindle-from-email
nil
"Your own email address to send from via mu4e."
:type 'string
:group 'send-to-kindle)
(defcustom send-to-kindle-to-email
nil
"Your Kindle email address to send pdf to."
:type 'string
@xenodium
xenodium / extend-elisp-demos.el
Created January 12, 2024 09:39
Add own elisp-demos snippets
(defun advised:elisp-demos--search (orig-fun symbol)
(cl-letf* ((orig-insert-file-contents (symbol-function 'insert-file-contents))
((symbol-function 'insert-file-contents)
(lambda (filename &optional visit beg end replace)
(apply orig-insert-file-contents filename visit beg end replace nil)
(apply orig-insert-file-contents "/private/tmp/mine.org" visit beg end replace nil))))
(funcall orig-fun symbol)))
(advice-add 'elisp-demos--search :around #'advised:elisp-demos--search)
@xenodium
xenodium / org2md.sh
Created January 28, 2024 12:31
Converting my org blog to markdown
$ pandoc -f org -t markdown-smart --strip-comments --wrap=none --lua-filter=org.lua index.org -o output.md && sed -i '' 's/{width="[0-9]*%"}//g' output.md
org.lua:
function Header(el)
el.attr = pandoc.Attr("", {}, {})
return el
end
function CodeBlock(el)