Compare commits
11 Commits
bc215fbaa4
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
eba0032e01
|
|||
|
9ec0a48bdb
|
|||
|
f3357e1a36
|
|||
|
957e38635e
|
|||
|
de766e6e6f
|
|||
|
b92fb9394f
|
|||
|
fc4aac14a1
|
|||
|
81c7014c65
|
|||
|
a498c5a811
|
|||
|
e9e35a2635
|
|||
|
12e9d6ae30
|
@@ -326,6 +326,7 @@ This returns a hash table of cid -> path."
|
|||||||
ARG is passed directly to `message-send'."
|
ARG is passed directly to `message-send'."
|
||||||
;; This has to return a non-nil value so that org knows we handled the C-c C-c
|
;; This has to return a non-nil value so that org knows we handled the C-c C-c
|
||||||
(interactive "P")
|
(interactive "P")
|
||||||
|
(save-current-buffer
|
||||||
(let ((modified (buffer-modified-p))
|
(let ((modified (buffer-modified-p))
|
||||||
;; we only restore the restriction if the sending below fails
|
;; we only restore the restriction if the sending below fails
|
||||||
(old-rest (cons (point-min) (point-max))))
|
(old-rest (cons (point-min) (point-max))))
|
||||||
@@ -343,7 +344,7 @@ ARG is passed directly to `message-send'."
|
|||||||
(insert save-text)
|
(insert save-text)
|
||||||
(narrow-to-region (car old-rest) (cdr old-rest))
|
(narrow-to-region (car old-rest) (cdr old-rest))
|
||||||
(restore-buffer-modified-p modified)
|
(restore-buffer-modified-p modified)
|
||||||
'failed)))))
|
'failed))))))
|
||||||
|
|
||||||
(defun org-mu4e-send-and-exit (&optional arg)
|
(defun org-mu4e-send-and-exit (&optional arg)
|
||||||
"Call `org-mu4e-send', the save and kill the buffer.
|
"Call `org-mu4e-send', the save and kill the buffer.
|
||||||
|
|||||||
32
init.el
32
init.el
@@ -4,6 +4,13 @@
|
|||||||
(require 'cl-lib)
|
(require 'cl-lib)
|
||||||
(require 'xdg)
|
(require 'xdg)
|
||||||
|
|
||||||
|
;; Setup PATH
|
||||||
|
(dolist (file '("/usr/local/sbin" "~/.local/bin" "~/.ghcup/bin"
|
||||||
|
"/usr/bin/site_perl" "/usr/bin/vendor_perl"
|
||||||
|
"/usr/bin/core_perl"))
|
||||||
|
(add-to-list 'exec-path (directory-file-name
|
||||||
|
(expand-file-name file))))
|
||||||
|
|
||||||
;; Some other config files
|
;; Some other config files
|
||||||
(cl-eval-when (compile load eval)
|
(cl-eval-when (compile load eval)
|
||||||
(add-to-list 'load-path (expand-file-name "elisp" user-emacs-directory))
|
(add-to-list 'load-path (expand-file-name "elisp" user-emacs-directory))
|
||||||
@@ -2076,6 +2083,7 @@ This is :around advice, so OLDFUN is the real function
|
|||||||
:ensure nil
|
:ensure nil
|
||||||
:hook (sh-mode . my/-setup-sh-mode)
|
:hook (sh-mode . my/-setup-sh-mode)
|
||||||
:init
|
:init
|
||||||
|
(add-to-list 'auto-mode-alist '("/\\.envrc\\'" . sh-mode))
|
||||||
(defun my/-setup-sh-mode ()
|
(defun my/-setup-sh-mode ()
|
||||||
(add-hook 'completion-at-point-functions #'cape-file nil t)))
|
(add-hook 'completion-at-point-functions #'cape-file nil t)))
|
||||||
|
|
||||||
@@ -2332,6 +2340,11 @@ Note that this erases the buffer before doing anything."
|
|||||||
(keymap-set java-ts-mode-map "C-c C-b" #'inferior-cc-eval-buffer)
|
(keymap-set java-ts-mode-map "C-c C-b" #'inferior-cc-eval-buffer)
|
||||||
(keymap-set java-ts-mode-map "C-M-x" #'inferior-cc-eval-defun))
|
(keymap-set java-ts-mode-map "C-M-x" #'inferior-cc-eval-defun))
|
||||||
|
|
||||||
|
;; racket
|
||||||
|
(use-package racket-mode
|
||||||
|
:hook ((racket-mode . rainbow-delimiters-mode)
|
||||||
|
(racket-mode . evil-cleverparens-mode)))
|
||||||
|
|
||||||
;; jupyter
|
;; jupyter
|
||||||
(use-package jupyter
|
(use-package jupyter
|
||||||
:hook (jupyter-repl-mode . my/-setup-jupyter-mode)
|
:hook (jupyter-repl-mode . my/-setup-jupyter-mode)
|
||||||
@@ -2837,10 +2850,10 @@ Actually, return the method name."
|
|||||||
("ga" "git add $*")
|
("ga" "git add $*")
|
||||||
("gcm" "git commit -m ${string-join $* \" \"}")
|
("gcm" "git commit -m ${string-join $* \" \"}")
|
||||||
("ldg" "ledger -f \"$HOME/docs/finance/finances.ledger\" $*")
|
("ldg" "ledger -f \"$HOME/docs/finance/finances.ledger\" $*")
|
||||||
("tp" "trash-put $*")
|
("tp" "clash put $*")
|
||||||
("trr" "trash-restore $*")
|
("trr" "clash restore $*")
|
||||||
("tre" "trash-empty $*")
|
("tre" "clash empty $*")
|
||||||
("trm" "trash-rm $*")
|
("trm" "clash empty $*")
|
||||||
("rm" "echo 'rm: I''m unsafe! Don''t use me.'; false")
|
("rm" "echo 'rm: I''m unsafe! Don''t use me.'; false")
|
||||||
("\\rm" "eshell/rm")))
|
("\\rm" "eshell/rm")))
|
||||||
|
|
||||||
@@ -3218,6 +3231,9 @@ The name is compared with the field name using TESTFN (defaults to `equal')."
|
|||||||
("C-c k" . khard-insert-email-contact))
|
("C-c k" . khard-insert-email-contact))
|
||||||
:init
|
:init
|
||||||
(require 'mu4e)
|
(require 'mu4e)
|
||||||
|
(evil-define-key '(normal motion) mu4e-headers-mode-map
|
||||||
|
"j" #'next-line
|
||||||
|
"k" #'previous-line)
|
||||||
(evil-define-key '(normal motion) mu4e-main-mode-map "q" #'bury-buffer)
|
(evil-define-key '(normal motion) mu4e-main-mode-map "q" #'bury-buffer)
|
||||||
(evil-define-key '(normal motion) mu4e-view-mode-map
|
(evil-define-key '(normal motion) mu4e-view-mode-map
|
||||||
"gy" #'mu4e-view-save-url
|
"gy" #'mu4e-view-save-url
|
||||||
@@ -3266,7 +3282,7 @@ This is the same as `evil-ret' except that it works for links in
|
|||||||
(concat "flag:unread AND NOT flag:trashed AND NOT "
|
(concat "flag:unread AND NOT flag:trashed AND NOT "
|
||||||
"maildir:/protonmail/Trash AND NOT maildir:/protonmail/Spam AND NOT "
|
"maildir:/protonmail/Trash AND NOT maildir:/protonmail/Spam AND NOT "
|
||||||
"maildir:/ucsc-gmail/[Gmail]/Trash AND NOT "
|
"maildir:/ucsc-gmail/[Gmail]/Trash AND NOT "
|
||||||
"maildir:/ucsc-gmail/[Gmail]/Spam")
|
"maildir:/ucsc-gmail/[Gmail]/Spam AND NOT maildir:\"/ucsc-gmail/[Gmail]/All Mail\"")
|
||||||
"Flag for mail which will appear as \"unread\" and will be notified.")
|
"Flag for mail which will appear as \"unread\" and will be notified.")
|
||||||
(setq message-kill-buffer-on-exit t
|
(setq message-kill-buffer-on-exit t
|
||||||
message-confirm-send t
|
message-confirm-send t
|
||||||
@@ -3304,7 +3320,8 @@ This is the same as `evil-ret' except that it works for links in
|
|||||||
(mu4e-refile-folder . "/protonmail/Archive")
|
(mu4e-refile-folder . "/protonmail/Archive")
|
||||||
(mu4e-sent-folder . "/protonmail/Sent")
|
(mu4e-sent-folder . "/protonmail/Sent")
|
||||||
(mu4e-drafts-folder . "/protonmail/Drafts")
|
(mu4e-drafts-folder . "/protonmail/Drafts")
|
||||||
(mu4e-trash-folder . "/protonmail/Trash")))
|
(mu4e-trash-folder . "/protonmail/Trash")
|
||||||
|
(mu4e-sent-messages-behavior . sent)))
|
||||||
(make-mu4e-context
|
(make-mu4e-context
|
||||||
:name "School"
|
:name "School"
|
||||||
:match-func (lambda (msg)
|
:match-func (lambda (msg)
|
||||||
@@ -3319,7 +3336,8 @@ This is the same as `evil-ret' except that it works for links in
|
|||||||
(mu4e-refile-folder . "/ucsc-gmail/[Gmail]/All Mail")
|
(mu4e-refile-folder . "/ucsc-gmail/[Gmail]/All Mail")
|
||||||
(mu4e-sent-folder . "/ucsc-gmail/[Gmail]/Sent Mail")
|
(mu4e-sent-folder . "/ucsc-gmail/[Gmail]/Sent Mail")
|
||||||
(mu4e-drafts-folder . "/ucsc-gmail/[Gmail]/Drafts")
|
(mu4e-drafts-folder . "/ucsc-gmail/[Gmail]/Drafts")
|
||||||
(mu4e-trash-folder . "/ucsc-gmail/[Gmail]/Trash"))))))
|
(mu4e-trash-folder . "/ucsc-gmail/[Gmail]/Trash")
|
||||||
|
(mu4e-sent-messages-behavior . delete))))))
|
||||||
(use-package mu4e-alert
|
(use-package mu4e-alert
|
||||||
:after mu4e
|
:after mu4e
|
||||||
:hook (after-init . mu4e-alert-enable-notifications)
|
:hook (after-init . mu4e-alert-enable-notifications)
|
||||||
|
|||||||
Reference in New Issue
Block a user