commit 09fd50bd1101049e10f0e30b3881dd6ae62bd7e9
parent 5514180fbc9a2020e219b2e91315592d938f5492
Author: Yuval Langer <yuval.langer@gmail.com>
Date: Thu, 5 Dec 2024 11:13:44 +0200
Disable emacs-lisp-mode and eldoc-mode because of CVE-2024-53920.
Also:
- change my stupid kakafarm/percent-read keybindings.
- Add shell as an org-babel language.
- Add another implementation of kakafarm/ffap-browse-urls and change
the name of the old one.
- Add kakafarm/greader-estimate-reading-time. It estimates reading
time in greader.
Diffstat:
2 files changed, 34 insertions(+), 5 deletions(-)
diff --git a/.config/emacs/init.el b/.config/emacs/init.el
@@ -21,6 +21,8 @@
(setq package-archives '())
(require 'use-package)
+(setq major-mode-remap-alist '((emacs-lisp-mode . fundamental-mode)))
+
(autoload 'skribilo-mode "skribilo.el" "Skribilo mode." t)
'(progn
@@ -30,7 +32,7 @@
(fido-vertical-mode 1)
;; (icomplete-vertical-mode 1)
(push 'flex completion-styles)
- (eldoc-mode 1)
+ '(eldoc-mode 1)
(flymake-mode 1)
;; (load-theme 'modus-vivendi-tinted t)
(setopt mode-line-end-spaces nil)
@@ -117,7 +119,7 @@
:bind
(
:map global-map
- ("C-c p" . kakafarm/percent-read)
+ ("C-c p p" . kakafarm/percent-read)
("C-c C-s" . (lambda (beg end)
(interactive (list (region-beginning) (region-end)))
@@ -340,6 +342,9 @@
:defer t
:mode ((rx ".epub" string-end) . nov-mode))
+(use-package fundamental
+ :mode ((rx ".el" string-end) . fundamental-mode))
+
'(use-package opml-to-elfeed-feeds
:custom
(opml-to-elfeed-feeds-elfeed-feeds nil t)
@@ -361,8 +366,11 @@
:config
(org-babel-do-load-languages
'org-babel-load-languages
- '((scheme . t)
- (emacs-lisp . t)))
+ '(
+ (emacs-lisp . t)
+ (scheme . t)
+ (shell . t)
+ ))
:custom
(org-agenda-files (list (expand-file-name "~/mine/org/")
(expand-file-name "~/Documents/notes/")))
diff --git a/.config/emacs/local-packages/emacs-kakafarm/kakafarm.el b/.config/emacs/local-packages/emacs-kakafarm/kakafarm.el
@@ -151,7 +151,7 @@ from https://www.youtube.com/watch?v=6R-73hsL5wk"
#'kakafarm/elfeed-compare-feeds-urls))
;;;###autoload
-(defun kakafarm/ffap-browse-urls ()
+(defun kakafarm//ffap-browse-urls ()
"Open all visible URLs."
(interactive)
@@ -168,6 +168,27 @@ from https://www.youtube.com/watch?v=6R-73hsL5wk"
(browse-url url)))))
;;;###autoload
+(defun kakafarm/ffap-browse-urls ()
+ "Open wanted visible URLs. Ya gotta type a bit of em and then ta tab complete and separate by commas ta actually select em."
+ (interactive)
+
+ (let ((urls (mapcar 'car (ffap-menu-rescan)))
+ (crm-separator "\n"))
+ (let ((urls-to-open (completing-read-multiple "Which URLs should I open?
+"
+ urls)))
+ (dolist (url urls-to-open)
+ (browse-url url)))))
+
+;;;###autoload
+(defun kakafarm/greader-estimate-reading-time (&optional start end)
+ (interactive "r")
+ (let ((wpm greader-espeak-rate)
+ (number-of-words (count-words (if start start (point-min))
+ (if end end (point-max)))))
+ (message "%s" (/ (float number-of-words) wpm))))
+
+;;;###autoload
(defun kakafarm/kill-ring-save-unlines ()
"Like `kill-ring-save', but also unlines and trims the newly killed stuff."
(interactive)