From 501e8a7004eff0c6cfcae13bb1a21caf81dd9291 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?tr=C3=A9meur?= Date: Sun, 7 Aug 2022 17:54:39 +0100 Subject: [PATCH] Add function for adding colour to exported HTML --- custom/html-colour.el | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 custom/html-colour.el diff --git a/custom/html-colour.el b/custom/html-colour.el new file mode 100644 index 0000000..0dea1bd --- /dev/null +++ b/custom/html-colour.el @@ -0,0 +1,29 @@ +(defun red () + (interactive) + (setq oldname (concat (file-name-base) ".org")) + (setq newname (concat (file-name-base) ".html")) + (find-file-noselect newname) + (with-current-buffer newname + (goto-char (point-min)) + (replace-regexp-in-region "
" "
") + (write-file newname))) + +(defun blue () + (interactive) + (setq oldname (concat (file-name-base) ".org")) + (setq newname (concat (file-name-base) ".html")) + (find-file-noselect newname) + (with-current-buffer newname + (goto-char (point-min)) + (replace-regexp-in-region "
" "
") + (write-file newname))) + +(defun green () + (interactive) + (setq oldname (concat (file-name-base) ".org")) + (setq newname (concat (file-name-base) ".html")) + (find-file-noselect newname) + (with-current-buffer newname + (goto-char (point-min)) + (replace-regexp-in-region "
" "
") + (write-file newname)))