Update project, feeds and social configs to use-package

This commit is contained in:
Evie Litherland-Smith 2023-11-09 07:41:26 +00:00
parent c79c12892e
commit 1adf46af4a
2 changed files with 84 additions and 64 deletions

View file

@ -383,18 +383,17 @@ manually with something like this:
;; Shutdown server when last managed buffer is killed ;; Shutdown server when last managed buffer is killed
(customize-set-variable 'eglot-autoshutdown t) (customize-set-variable 'eglot-autoshutdown t)
(let ((elfeed-base-directory "~/.elfeed")) (setq project-switch-use-entire-map t
(setq elfeed-db-directory (expand-file-name "db" elfeed-base-directory) project-switch-commands
elfeed-enclosure-default-dir (expand-file-name "enclosures" elfeed-base-directory) '((project-dired "Browse directory")
rmh-elfeed-org-files (list (expand-file-name "feeds.org" elfeed-base-directory)))) (project-find-file "Find file")
(project-find-regexp "Find regexp")
(project-find-dir "Find directory")
(project-eshell "Eshell")))
(when (require 'elfeed nil :noerror) (setq magit-clone-default-directory "~/Projects/")
(keymap-global-set "C-c f f" #'elfeed) (use-package magit
(add-hook 'elfeed-search-mode-hook #'elfeed-update) :ensure t)
(when (require 'elfeed-org nil :noerror)
(elfeed-org))
(when (require 'elfeed-tube nil :noerror)
(elfeed-tube-setup)))
(when (require 'emms-setup nil :noerror) (when (require 'emms-setup nil :noerror)
(setq emms-player-list '(emms-player-mpv) (setq emms-player-list '(emms-player-mpv)
@ -418,21 +417,6 @@ manually with something like this:
("p" emms-previous) ("p" emms-previous)
("P" emms-pause)))) ("P" emms-pause))))
(setq project-switch-use-entire-map t
project-switch-commands
'((project-dired "Browse directory")
(project-find-file "Find file")
(project-find-regexp "Find regexp")
(project-find-dir "Find directory")
(project-eshell "Eshell")))
(setq magit-clone-default-directory "~/Projects/")
(require 'magit nil :noerror)
(setq mastodon-instance-url "https://tech.lgbt"
mastodon-active-user "Tux922")
(require 'mastodon nil :noerror)
;;; Vertico ;;; Vertico
(when (require 'vertico nil :noerror) (when (require 'vertico nil :noerror)
(require 'vertico-directory) (require 'vertico-directory)
@ -840,3 +824,28 @@ Depends on having `pdf-tools'."
(mu4e-alert-set-default-style 'libnotify) (mu4e-alert-set-default-style 'libnotify)
(mu4e-alert-enable-notifications) (mu4e-alert-enable-notifications)
(mu4e-alert-enable-mode-line-display)) (mu4e-alert-enable-mode-line-display))
(let ((elfeed-base-directory "~/.elfeed"))
(setq elfeed-db-directory (expand-file-name "db" elfeed-base-directory)
elfeed-enclosure-default-dir (expand-file-name "enclosures" elfeed-base-directory)
rmh-elfeed-org-files (list (expand-file-name "feeds.org" elfeed-base-directory))))
(use-package elfeed
:bind (("C-c f f" . elfeed)
("C-c f u" . elfeed-update))
:hook (elfeed-search-mode . elfeed-update)
:config
(use-package elfeed-org
:ensure t
:config (elfeed-org))
(use-package elfeed-tube
:ensure t
:config (elfeed-tube-setup)))
(setq mastodon-instance-url "https://tech.lgbt"
mastodon-active-user "Tux922")
(use-package mastodon
:commands mastodon)
(use-package ement
:commands ement-connect)

View file

@ -444,26 +444,26 @@ For reference information, see [[https://orgmode.com][Org-mode website]]
;; Shutdown server when last managed buffer is killed ;; Shutdown server when last managed buffer is killed
(customize-set-variable 'eglot-autoshutdown t) (customize-set-variable 'eglot-autoshutdown t)
#+END_SRC #+END_SRC
** Project
#+BEGIN_SRC emacs-lisp
(setq project-switch-use-entire-map t
project-switch-commands
'((project-dired "Browse directory")
(project-find-file "Find file")
(project-find-regexp "Find regexp")
(project-find-dir "Find directory")
(project-eshell "Eshell")))
#+END_SRC
** Version control
#+begin_src emacs-lisp
(setq magit-clone-default-directory "~/Projects/")
(use-package magit
:ensure t)
#+end_src
* Copy (to sort) * Copy (to sort)
For now I'll just copy all config into this file, to confirm that it works properly. For now I'll just copy all config into this file, to confirm that it works properly.
Will reorganise into separate sections later Will reorganise into separate sections later
** TODO Feeds
#+BEGIN_SRC emacs-lisp
(let ((elfeed-base-directory "~/.elfeed"))
(setq elfeed-db-directory (expand-file-name "db" elfeed-base-directory)
elfeed-enclosure-default-dir (expand-file-name "enclosures" elfeed-base-directory)
rmh-elfeed-org-files (list (expand-file-name "feeds.org" elfeed-base-directory))))
(when (require 'elfeed nil :noerror)
(keymap-global-set "C-c f f" #'elfeed)
(add-hook 'elfeed-search-mode-hook #'elfeed-update)
(when (require 'elfeed-org nil :noerror)
(elfeed-org))
(when (require 'elfeed-tube nil :noerror)
(elfeed-tube-setup)))
#+END_SRC
** TODO Media ** TODO Media
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(when (require 'emms-setup nil :noerror) (when (require 'emms-setup nil :noerror)
@ -489,27 +489,6 @@ Will reorganise into separate sections later
("P" emms-pause)))) ("P" emms-pause))))
#+END_SRC #+END_SRC
** TODO Project
#+BEGIN_SRC emacs-lisp
(setq project-switch-use-entire-map t
project-switch-commands
'((project-dired "Browse directory")
(project-find-file "Find file")
(project-find-regexp "Find regexp")
(project-find-dir "Find directory")
(project-eshell "Eshell")))
(setq magit-clone-default-directory "~/Projects/")
(require 'magit nil :noerror)
#+END_SRC
** TODO Social
#+BEGIN_SRC emacs-lisp
(setq mastodon-instance-url "https://tech.lgbt"
mastodon-active-user "Tux922")
(require 'mastodon nil :noerror)
#+END_SRC
** TODO Completion (Crafted) ** TODO Completion (Crafted)
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
;;; Vertico ;;; Vertico
@ -839,7 +818,8 @@ Will reorganise into separate sections later
(setq-default pdf-view-display-size 'fit-width))) (setq-default pdf-view-display-size 'fit-width)))
#+END_SRC #+END_SRC
* Email * Internet
** Email
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(setq sendmail-program (executable-find "msmtp") (setq sendmail-program (executable-find "msmtp")
send-mail-function #'smtpmail-send-it send-mail-function #'smtpmail-send-it
@ -934,3 +914,34 @@ Will reorganise into separate sections later
#+END_SRC #+END_SRC
** Feeds
#+BEGIN_SRC emacs-lisp
(let ((elfeed-base-directory "~/.elfeed"))
(setq elfeed-db-directory (expand-file-name "db" elfeed-base-directory)
elfeed-enclosure-default-dir (expand-file-name "enclosures" elfeed-base-directory)
rmh-elfeed-org-files (list (expand-file-name "feeds.org" elfeed-base-directory))))
(use-package elfeed
:bind (("C-c f f" . elfeed)
("C-c f u" . elfeed-update))
:hook (elfeed-search-mode . elfeed-update)
:config
(use-package elfeed-org
:ensure t
:config (elfeed-org))
(use-package elfeed-tube
:ensure t
:config (elfeed-tube-setup)))
#+END_SRC
** Social
#+BEGIN_SRC emacs-lisp
(setq mastodon-instance-url "https://tech.lgbt"
mastodon-active-user "Tux922")
(use-package mastodon
:commands mastodon)
(use-package ement
:commands ement-connect)
#+END_SRC