summaryrefslogtreecommitdiffstats
path: root/init.el
diff options
context:
space:
mode:
authorMatthew Lemon <matt@matthewlemon.com>2022-11-24 23:12:03 +0000
committerMatthew Lemon <matt@matthewlemon.com>2022-11-24 23:12:03 +0000
commitd3969d980b3db6f43cfa021cf1083f9c8568539e (patch)
tree3dc9b3f22df32a8c3456632cc71163a86260c5a6 /init.el
parent0604940031aadff4e35f0b00bfd459a27e69cb1a (diff)
moved my crappy markdown checklist funcs to external file
Diffstat (limited to '')
-rw-r--r--init.el55
1 files changed, 4 insertions, 51 deletions
diff --git a/init.el b/init.el
index c70f798..3c3352e 100644
--- a/init.el
+++ b/init.el
@@ -4,6 +4,8 @@
;;; basic config
;;; Code:
+
+
(defvar mrl/startup-time (current-time))
(defun mrl/emacs-load-time ()
(let ((time (float-time (time-subtract (current-time) mrl/startup-time))))
@@ -28,9 +30,6 @@
(setq use-package-always-ensure t)
(require 'use-package)
-;; my macros
-(add-to-list 'load-path "~/.emacs.d/macros/mrl_macros.macs")
-
;; easy revert buffer, which I never use
(global-set-key (kbd "C-c R") (lambda () (interactive) (revert-buffer t t)))
@@ -70,8 +69,9 @@ Restart works only on graphic display."
;; notmuch is apparently already installed with notmuch from arch
(require 'notmuch)
-;; org and notmuch
+;; load my crap
(add-to-list 'load-path "~/.emacs.d/lisp")
+(require 'mrl_functions)
(require 'org-notmuch)
(org-link-set-parameters "notmuch"
@@ -224,53 +224,6 @@ Restart works only on graphic display."
(setq coding-system-for-read 'utf-8)
(setq coding-system-for-write 'utf-8)
-;; for markdown mode
-(defun mrl/get-start-and-lines-in-region ()
- "Cumbersome newbie way to get start line and number
-of lines in region."
- (let (pos1 pos2)
- (setq pos1 (region-beginning)
- pos2 (region-end))
- (let ((line1 (line-number-at-pos pos1))
- (line2 (line-number-at-pos pos2)))
- (list line1 (- line2 line1)))))
-
-(defun mrl/clear-check-region (start lines)
- "Clears check marks given a start line and number
-of lines to run through."
- (setq count 0)
- (while (> lines 0)
- (save-excursion
- (goto-line (+ start count))
- (beginning-of-line)
- (forward-char 3)
- (delete-char 1)
- (insert-char ?\s))
- (next-line)
- (setq count (+ count 1))
- (setq lines (- lines 1))))
-
-
-(defun mrl/clear-check-from-region ()
- "Interactive func to clear markdown checks from a region."
- (interactive)
- (save-excursion
- (mrl/clear-check-region
- (car (mrl/get-start-and-lines-in-region))
- (car (last (mrl/get-start-and-lines-in-region))))))
-
-;; do this for a region next
-(defun mrl/clear-check-single-line (&optional lines)
- "Remove the check from LINES number of markdown checkbox lines."
- (interactive "p")
- (while (> lines 0)
- (save-excursion
- (beginning-of-line)
- (forward-char 3)
- (delete-char 1)
- (insert-char ?\s))
- (next-line)
- (setq lines (- lines 1))))
;; PACKAGES