aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorÓscar Nájera <hi@oscarnajera.com>2022-04-05 17:55:41 +0200
committerÓscar Nájera <hi@oscarnajera.com>2022-04-05 17:55:41 +0200
commitab733e1df6d84331c220fe12778e66851f916c62 (patch)
treee5f0fdcedd3f898a733b472c23ac17348a022d4a /config
parenta298aa21ad4b16eea42b37b7bbc317e1a9695e49 (diff)
downloaddotfiles-ab733e1df6d84331c220fe12778e66851f916c62.tar.gz
dotfiles-ab733e1df6d84331c220fe12778e66851f916c62.tar.bz2
dotfiles-ab733e1df6d84331c220fe12778e66851f916c62.zip
cleanup emacs dot
Diffstat (limited to 'config')
-rw-r--r--config/doom/config.org55
-rw-r--r--config/doom/custom.el1
-rw-r--r--config/doom/init.el6
3 files changed, 39 insertions, 23 deletions
diff --git a/config/doom/config.org b/config/doom/config.org
index 1063299..1fe34a4 100644
--- a/config/doom/config.org
+++ b/config/doom/config.org
@@ -17,6 +17,14 @@ numbers are disabled. For relative line numbers, set this to `relative'.
#+begin_src emacs-lisp
;(setq display-line-numbers-type 'relative)
#+end_src
+** Frame title includes file being used
+#+BEGIN_SRC emacs-lisp
+ ;;http://emacs-fu.blogspot.fr/2011/01/setting-frame-title.html
+ (setq frame-title-format
+ '("" invocation-name ": "(:eval (if (buffer-file-name)
+ (abbreviate-file-name (buffer-file-name))
+ "%b"))))
+#+END_SRC
** Keybindings
#+begin_src emacs-lisp
(map! :leader
@@ -179,11 +187,24 @@ this new window.
(add-to-list 'org-latex-packages-alist '("AUTO" "babel" nil))
)
#+END_SRC
+** Feeds
+#+begin_src emacs-lisp
+(after! elfeed
+ (set-evil-initial-state! 'elfeed-search-mode 'emacs)
+ (setq elfeed-feeds
+ '("https://sachachua.com/blog/feed"
+ "https://www.howardism.org/index.xml")))
+
+#+end_src
+
+#+RESULTS:
+| https://sachachua.com/blog/feed | https://www.howardism.org/index.xml |
+
* Email
** Notmuch
#+begin_src emacs-lisp :tangle "packages.el"
-(package! notmuch :pin "3df2281746d57abbb45790ecb432ef40533c30bc")
-(package! org-mime :pin "eb21c02ba8f97fe69c14dc657a7883b982664649")
+(package! notmuch :pin "7b5921877e748338359a25dae578771f768183af")
+(package! org-mime :pin "a7bf07316f93015e4f853ea0fc5b8d05b4a7695d")
(package! ol-notmuch :pin "126fb446d8fa9e54cf21103afaf506fd81273c02")
#+end_src
#+BEGIN_SRC emacs-lisp
@@ -240,19 +261,18 @@ this new window.
("flagged" . notmuch-search-flagged-face)
("unread" . notmuch-search-unread-face)))
+ (defun notmuch-toggle-tag (tag tags-present)
+ (concat (if (member tag tags-present) "-" "+") tag))
+
(defun notmuch-show-delete-message ()
"Delete current message if already marked as deleted undo."
(interactive)
- (apply #'notmuch-show-tag-message
- (if (member "deleted" (notmuch-show-get-tags))
- '("-deleted") '("+deleted" "-inbox" "-unread"))))
+ (notmuch-show-tag-message (notmuch-toggle-tag "deleted" (notmuch-show-get-tags))))
(defun notmuch-show-tag-spam ()
"Tag spam on current message if already marked as spam undo."
(interactive)
- (apply #'notmuch-show-tag-message
- (if (member "spam" (notmuch-show-get-tags))
- '("-spam") '("+spam" "-inbox" "-unread"))))
+ (notmuch-show-tag-message (notmuch-toggle-tag "spam" (notmuch-show-get-tags))))
(defun notmuch-show-delete-thread-then-exit ()
"Delete all messages in the current buffer, then exit back to search results."
@@ -264,9 +284,7 @@ this new window.
"Delete all messages in the current thread or undelete"
(interactive)
(notmuch-search-tag
- (if (member "deleted" (notmuch-search-get-tags))
- '("-deleted")
- '("+deleted" "-inbox" "-unread"))))
+ (list (notmuch-toggle-tag "deleted" (notmuch-search-get-tags)))))
(defun notmuch-search-delete-all()
"Delete all messages in the current buffer"
@@ -274,15 +292,12 @@ this new window.
(notmuch-search-tag-all
'("+deleted" "-inbox" "-unread")))
-
(define-key notmuch-tree-mode-map "d"
(lambda ()
"delete message"
(interactive)
(notmuch-tree-tag
- (if (member "deleted" (notmuch-tree-get-tags))
- '("-deleted")
- '("+deleted" "-inbox" "-unread"))))))
+ (list (notmuch-toggle-tag "deleted" (notmuch-tree-get-tags)))))))
(use-package! org-mime
:after (org notmuch)
@@ -346,19 +361,21 @@ Emacs mode for managing ledger text files
:init
(defun on/cardano-set-network ()
(interactive)
- (let* ((networks '((:mainnet "/tmp/alinamn.socket" "--mainnet")
- (:testnet "/tmp/alinatn.socket" "--testnet-magic" "1097911063")
- (:alonzo-purple "~/test-cardano/purple/socket" "--testnet-magic" "8")))
+ (let* ((networks '((:mainnet "/tmp/alinamn.socket" "http://localhost:8090" "--mainnet")
+ (:testnet "/tmp/alinatn.socket" "http://localhost:8091" "--testnet-magic" "1097911063")
+ ))
(pick
(alist-get
(completing-read "Pick network" networks)
networks nil nil #'string=)))
(setq cardano-cli-node-socket (expand-file-name (car pick))
- cardano-cli-network-args (cdr pick))))
+ cardano-api-url (cadr pick)
+ cardano-cli-network-args (cddr pick))))
:config
(setq cardano-log-level 'debug)
(setq cardano-cli-command (expand-file-name "~/dev/cardano/cardano-node/cli"))
(setq cardano-address-keyring-dir "~/dev/cardano/emacs-wallet/keys/demo"))
+ (setq cardano-address-keyring-dir "~/dev/cardano/emacs-wallet/keys/HD")
#+end_src
* Books
#+begin_src emacs-lisp :tangle "packages.el"
diff --git a/config/doom/custom.el b/config/doom/custom.el
index 3b13532..585b5a0 100644
--- a/config/doom/custom.el
+++ b/config/doom/custom.el
@@ -10,7 +10,6 @@
(eval progn
(make-variable-buffer-local 'cider-jack-in-nrepl-middlewares)
(add-to-list 'cider-jack-in-nrepl-middlewares "shadow.cljs.devtools.server.nrepl/middleware"))
-
(cider-custom-cljs-repl-init-form . "(do (require '[shadow.cljs.devtools.server :as server]) (require '[shadow.cljs.devtools.api :as shadow]) (server/start!) (shadow/watch :app) (shadow/nrepl-select :app))")
(org-startup-folded . showall))))
(custom-set-faces
diff --git a/config/doom/init.el b/config/doom/init.el
index ae434c0..4a70cac 100644
--- a/config/doom/init.el
+++ b/config/doom/init.el
@@ -73,7 +73,7 @@
vc ; version-control and Emacs, sitting in a tree
:term
- ;;eshell ; the elisp shell that works everywhere
+ eshell ; the elisp shell that works everywhere
;;shell ; simple shell REPL for Emacs
;;term ; basic terminal emulator for Emacs
;;vterm ; the best terminal emulation in Emacs
@@ -177,10 +177,10 @@
:app
;;calendar
- ;;emms
+ emms
;;everywhere ; *leave* Emacs!? You must be joking
;;irc ; how neckbeards socialize
- (rss +org) ; emacs as an RSS reader
+ rss ; emacs as an RSS reader
;;twitter ; twitter client https://twitter.com/vnought
:config