summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--emacs-init.org144
1 files changed, 0 insertions, 144 deletions
diff --git a/emacs-init.org b/emacs-init.org
index 643d640..c19d02a 100644
--- a/emacs-init.org
+++ b/emacs-init.org
@@ -39,7 +39,6 @@
- [[#proced][Proced]]
- [[#pass][Pass]]
- [[#ledger][Ledger]]
- - [[#elfeed][Elfeed]]
- [[#plotting-data][Plotting data]]
- [[#html-renderer][HTML renderer]]
- [[#email][Email]]
@@ -5040,149 +5039,6 @@ Here is a good [[https://www.reddit.com/r/emacs/comments/8x4xtt][reddit thread]]
I also use some =org-capture= templates to quickly capture
transactions. They are defined in [[file:emacs-private.el.gpg::4][emacs-private.el.gpg]].
-** Elfeed
-
-#+BEGIN_SRC emacs-lisp
-(use-package elfeed
- :straight t
- :init
- (setq elfeed-db-directory "~/.emacs.d/elfeed")
- :custom
- (elfeed-enclosure-default-dir "~/Downloads")
- (elfeed-search-clipboard-type 'CLIPBOARD)
- (elfeed-search-title-max-width (current-fill-column))
- (elfeed-search-title-min-width 30)
- (elfeed-search-trailing-width 16)
- (elfeed-show-truncate-long-urls t)
- (elfeed-show-unique-buffers t)
- :config
- (defalias 'elfeed-toggle-star
- (elfeed-expose #'elfeed-search-toggle-all 'star))
- (defun fpi/elfeed-search-show-entry-in-bg (entry)
- (interactive (list (elfeed-search-selected :ignore-region)))
- (elfeed-search-show-entry entry)
- (bury-buffer))
- :bind
- (:map elfeed-search-mode-map
- ("m" . elfeed-toggle-star)
- ("o" . fpi/elfeed-search-show-entry-in-bg)
- ("j" . mz/make-and-run-elfeed-hydra)
- ))
-#+END_SRC
-Some feeds I want to automatically mark as read. This way I can look
-at them whenever I want to, but they don't show up in the unread search.
-#+BEGIN_SRC emacs-lisp
-(defun elfeed-mark-all-as-read ()
- (interactive)
- (save-excursion
- (mark-whole-buffer)
- (elfeed-search-untag-all-unread)))
-(defun elfeed-mark-search-read (search-string)
- "Mark all results of SEARCH-STRING as read."
- (interactive)
- (elfeed)
- (let ((filter elfeed-search-filter))
- (elfeed-search-set-filter search-string)
- (elfeed-mark-all-as-read)
- (elfeed-search-set-filter filter)
- (bury-buffer)))
-#+END_SRC
-Now execute this whenever feeds are fetched
-#+BEGIN_SRC emacs-lisp
-(defun my/elfeed-mark-read (entry)
- "Tag ENTRY as read if it contains certain tags"
- (when (member 'tRaffic (elfeed-entry-tags entry))
- (elfeed-untag entry 'unread)
- ))
-(add-hook 'elfeed-new-entry-hook 'my/elfeed-mark-read)
-#+END_SRC
-*** Elfeed Org
-Load elfeed org after adding ~my/elfeed-mark-read~ to
-~elfeed-new-entry-hook~. New entries need to get tagged by elfeed org
-first before marking them unread based on their tag.
-#+BEGIN_SRC emacs-lisp
-(use-package elfeed-org
- :straight t
- :config
- (elfeed-org)
- (setq rmh-elfeed-org-files (list "~/.emacs.d/elfeed.org")))
-#+END_SRC
-*** Hydra
-This creates a smart hydra based on all available tags (see
-https://cestlaz.github.io/posts/using-emacs-31-elfeed-3/).
-#+BEGIN_SRC emacs-lisp
-(defun z/hasCap (s) ""
- (let ((case-fold-search nil))
- (string-match-p "[[:upper:]]" s)
- ))
-(defun z/get-hydra-option-key (s)
- "returns single upper case letter (converted to lower) or first"
- (interactive)
- (let ( (loc (z/hasCap s)))
- (if loc
- (downcase (substring s loc (+ loc 1)))
- (substring s 0 1)
- )))
-
-;; (active blogs cs eDucation emacs local misc sports star tech unread webcomics)
-(defun mz/make-elfeed-cats (tags)
- "Returns a list of lists. Each one is line for the hydra configuratio in the form
- (c function hint)"
- (interactive)
- (mapcar (lambda (tag)
- (let* (
- (tagstring (symbol-name tag))
- (c (z/get-hydra-option-key tagstring))
- )
- (list c (append '(elfeed-search-set-filter) (list (format "@6-months-ago +%s" tagstring) ))tagstring )))
- tags))
-(defmacro mz/make-elfeed-hydra ()
- `(defhydra mz/hydra-elfeed ()
- "filter"
- ,@(mz/make-elfeed-cats (elfeed-db-get-all-tags))
- ("*" (elfeed-search-set-filter "@6-months-ago +star") "Starred")
- ("M" elfeed-toggle-star "Mark")
- ("A" (elfeed-search-set-filter "@6-months-ago") "All")
- ("T" (elfeed-search-set-filter "@1-day-ago") "Today")
- ("Q" bjm/elfeed-save-db-and-bury "Quit Elfeed" :color blue)
- ("q" nil "quit" :color blue)
- ))
-(defun mz/make-and-run-elfeed-hydra ()
- ""
- (interactive)
- (mz/make-elfeed-hydra)
- (mz/hydra-elfeed/body))
-#+END_SRC
-
-*** Youtube to Vlc
-Open a entry with vlc
-#+BEGIN_SRC emacs-lisp
-(defface elfeed-youtube
- '((t :foreground "#a9f"))
- "Marks YouTube videos in Elfeed."
- :group 'elfeed)
-
-(push '(youtube elfeed-youtube)
- elfeed-search-face-alist)
-
-(defun elfeed-show-vlc ()
- "Play the current entry with vlc."
- (interactive)
- (pop-to-buffer (shell-command (format "vlc %s &" (elfeed-entry-link elfeed-show-entry)))))
-
-(defun elfeed-search-vlc ()
- "Play the current entry with vlc."
- (interactive)
- (let ((entries (elfeed-search-selected)))
- (dolist (entry entries)
- (shell-command (format "vlc %s &" (elfeed-entry-link entry)))
- (elfeed-untag entry 'unread)
- (elfeed-search-update-entry entry)
- (unless (use-region-p) (forward-line)))))
-
-(define-key elfeed-show-mode-map "v" 'elfeed-show-vlc)
-(define-key elfeed-search-mode-map "v" 'elfeed-search-vlc)
-#+END_SRC
** Plotting data
=gnuplot= is a great option for plotting any kind of data, no matter