|
|
|
|
@ -4,15 +4,34 @@ |
|
|
|
|
#+options: *:t ::t |
|
|
|
|
|
|
|
|
|
* TODO Tasks that need attention |
|
|
|
|
** TODO files saved with mu4e have restrictive permissions. |
|
|
|
|
** TODO Add directory name somewhere in mu4e:headers |
|
|
|
|
** TODO Mouse still shows tooltips in mu4e:view mode |
|
|
|
|
** TODO Find something to put the C-z prefix to good use |
|
|
|
|
** TODO Remove mouse hints from modeline (maybe done?) |
|
|
|
|
Maybe this is done… I still need to understand if there are other |
|
|
|
|
help-echo stuff lying around |
|
|
|
|
|
|
|
|
|
There are mouse hints in flyspell |
|
|
|
|
** TODO org-babel open-line creates two newlines. |
|
|
|
|
** TODO BUG!!!!!!!!!!!! invalid target location, and the capture is gone. |
|
|
|
|
** TODO C-a does not work as expected when the subtree is expanded |
|
|
|
|
** TODO migrate from patching org-mode to a more sustainable option |
|
|
|
|
the issue is that I wanted to make sure that nothing would break by |
|
|
|
|
managing conflicts by hand, but this is not happening in practice |
|
|
|
|
** TODO Fix git diff stuff being unreadable |
|
|
|
|
** TODO The window management is sometimes frustrating |
|
|
|
|
** TODO Autosort token for some subtrees |
|
|
|
|
I forgot; perhaps we can do it on save? |
|
|
|
|
** TODO Work on a "welcome" read-only org page for each activity in |
|
|
|
|
which we put links to what should be done in that activity. For |
|
|
|
|
instance |
|
|
|
|
|
|
|
|
|
** TODO explore [[https://blog.modelworks.ch/managing-papers-with-org-mode-and-reftex/][this possibility]] about org-mode paper managing |
|
|
|
|
|
|
|
|
|
** TODO Find something to put the C-z prefix to good use |
|
|
|
|
|
|
|
|
|
** DONE fix the issue with highlighting bleeding over the margin for |
|
|
|
|
~ace-window~ |
|
|
|
|
** DONE files saved with mu4e have restrictive permissions. |
|
|
|
|
[[*Save attachments with more reasonable permissions][Fixed here]] |
|
|
|
|
** DONE can we run a task with an org-link? |
|
|
|
|
For instance, I want to call kmail in "zero inbox proton" |
|
|
|
|
i can run elisp code... |
|
|
|
|
@ -22,24 +41,10 @@ |
|
|
|
|
candidates |
|
|
|
|
- [ ] Implement action for ignoring contacts |
|
|
|
|
|
|
|
|
|
** TODO remove duplicates in contacts list with double spaces and such |
|
|
|
|
** DONE take care of the "dear To" when completing the name in an email |
|
|
|
|
** DONE make an alist for names to nicknames when completing the name… |
|
|
|
|
** TODO how to "open with" attachments with mu4e? |
|
|
|
|
** DONE investigate what is wrong with inline-pdf image width |
|
|
|
|
I need to cycle the mode on/off to make it work as intended |
|
|
|
|
** TODO fix the issue with highlighting bleeding over the margin for |
|
|
|
|
~ace-window~ |
|
|
|
|
** TODO The window management is sometimes frustrating |
|
|
|
|
** TODO Autosort token for some subtrees |
|
|
|
|
** TODO Work on a "welcome" read-only org page for each activity in |
|
|
|
|
which we put links to what should be done in that activity. For |
|
|
|
|
instance |
|
|
|
|
|
|
|
|
|
** TODO revert org-files on frame activation. |
|
|
|
|
What was the deal with auto-revert-mode again? |
|
|
|
|
** TODO explore [[https://blog.modelworks.ch/managing-papers-with-org-mode-and-reftex/][this possibility]] about org-mode paper managing |
|
|
|
|
|
|
|
|
|
* TODO Features to explore |
|
|
|
|
** Study how to implement no-scroll mode |
|
|
|
|
|
|
|
|
|
@ -486,6 +491,8 @@ |
|
|
|
|
'("%e" mode-line-format-left |
|
|
|
|
mode-line-separator |
|
|
|
|
mode-line-format-right)) |
|
|
|
|
|
|
|
|
|
(setq mode-line-default-help-echo nil) |
|
|
|
|
#+end_src |
|
|
|
|
The following has been found in [[https://www.masteringemacs.org/article/hiding-replacing-modeline-strings][here]] to clean up the modeline |
|
|
|
|
I modified it marginally to avoid using the loop monster |
|
|
|
|
@ -711,6 +718,13 @@ |
|
|
|
|
(propertize "." 'display `((margin left-margin) |
|
|
|
|
,(propertize "×" 'face 'flyspell-margin-incorrect)))) |
|
|
|
|
#+end_src |
|
|
|
|
|
|
|
|
|
#+begin_src emacs-lisp |
|
|
|
|
(advice-add 'make-flyspell-overlay :filter-return (lambda (overlay) |
|
|
|
|
(overlay-put overlay 'help-echo nil) |
|
|
|
|
overlay)) |
|
|
|
|
#+end_src |
|
|
|
|
|
|
|
|
|
** Fringe treatment |
|
|
|
|
*** Add margin marker for current line |
|
|
|
|
Add marker for current line in the margin (see |
|
|
|
|
@ -888,116 +902,138 @@ |
|
|
|
|
** mu4e |
|
|
|
|
These are some standard config items |
|
|
|
|
#+begin_src emacs-lisp |
|
|
|
|
(require 'smtpmail) |
|
|
|
|
(require 'mu4e) |
|
|
|
|
(require 'helm-mu) |
|
|
|
|
(global-set-key (kbd "C-x μ") 'mu4e) |
|
|
|
|
(global-set-key (kbd "C-x 5 μ") (eval-with-new-frame (mu4e))) |
|
|
|
|
|
|
|
|
|
(defalias 'μ 'mu4e) |
|
|
|
|
|
|
|
|
|
(setq mu4e-maildir "~/.mail" |
|
|
|
|
mu4e-attachment-dir "~/attachments" |
|
|
|
|
mu4e-html2text-command "w3m -dump -T text/html -cols 72 -o display_link_number=true -o auto_image=false -o display_image=false -o ignore_null_img_alt=true" |
|
|
|
|
mu4e-headers-show-threads nil |
|
|
|
|
mu4e-headers-sort-direction "descending" |
|
|
|
|
mail-user-agent 'mu4e-user-agent |
|
|
|
|
read-mail-command 'mu4e |
|
|
|
|
mu4e-update-interval 120 |
|
|
|
|
mu4e-view-use-gnus t |
|
|
|
|
message-kill-buffer-on-exit t |
|
|
|
|
mu4e-compose-format-flowed t |
|
|
|
|
fill-flowed-encode-column 998 |
|
|
|
|
mm-text-html-renderer 'gnus-w3m |
|
|
|
|
mu4e-read-option-use-builtin nil |
|
|
|
|
mu4e-completing-read-function 'completing-read |
|
|
|
|
mu4e-modeline-support nil |
|
|
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
(let (p1 p2 myLine) |
|
|
|
|
(setq p1 (line-beginning-position) ) |
|
|
|
|
(setq p2 (line-end-position) ) |
|
|
|
|
(setq myLine (buffer-substring-no-properties p1 p2))) |
|
|
|
|
|
|
|
|
|
(defun get-buffer-current-line () |
|
|
|
|
(let ((p (line-beginning-position)) |
|
|
|
|
(q (line-end-position))) |
|
|
|
|
(buffer-substring-no-properties p q))) |
|
|
|
|
|
|
|
|
|
(defun get-buffer-to-eol () |
|
|
|
|
(let ((p (point)) |
|
|
|
|
(q (line-end-position))) |
|
|
|
|
(buffer-substring-no-properties p q))) |
|
|
|
|
|
|
|
|
|
(defun format-zoom-meeting () |
|
|
|
|
(if (boundp 'zoom-link) |
|
|
|
|
(if (boundp 'zoom-passcode) |
|
|
|
|
(concat zoom-summary |
|
|
|
|
" [[" zoom-link "][link]] (" zoom-passcode ")\n SCHEDULED: " zoom-scheduled-time) |
|
|
|
|
(concat zoom-summary |
|
|
|
|
" [[" zoom-link "][link]]\n SCHEDULED: " zoom-scheduled-time)) |
|
|
|
|
(concat zoom-summary "\n SCHEDULED: " zoom-scheduled-time))) |
|
|
|
|
|
|
|
|
|
(defun create-item-for-meeting (msg) |
|
|
|
|
"Search for messages sent by the sender of the message at point." |
|
|
|
|
(makunbound 'zoom-link) |
|
|
|
|
(makunbound 'zoom-passcode) |
|
|
|
|
(save-excursion |
|
|
|
|
(beginning-of-buffer) |
|
|
|
|
(cond ((search-forward "Join Zoom Meeting" nil t) |
|
|
|
|
(message "found zoom meeting") |
|
|
|
|
(right-char) |
|
|
|
|
(setq zoom-link (get-buffer-current-line)) |
|
|
|
|
(when (search-forward "Passcode:" nil t) |
|
|
|
|
(setq zoom-passcode (get-buffer-current-line))) |
|
|
|
|
(beginning-of-buffer) |
|
|
|
|
(search-forward "Time:") |
|
|
|
|
(search-forward "<") |
|
|
|
|
(left-char) |
|
|
|
|
(setq zoom-scheduled-time (get-buffer-to-eol)) |
|
|
|
|
(search-backward "Summary:") |
|
|
|
|
(right-word) |
|
|
|
|
(right-word) |
|
|
|
|
(left-word) |
|
|
|
|
(setq zoom-summary (get-buffer-to-eol)) |
|
|
|
|
(org-capture nil "z")) |
|
|
|
|
((search-forward "Accept ]") |
|
|
|
|
(message "found generic meeting") |
|
|
|
|
(search-forward "Summary:") |
|
|
|
|
(right-word) |
|
|
|
|
(right-word) |
|
|
|
|
(left-word) |
|
|
|
|
(setq zoom-summary (get-buffer-to-eol)) |
|
|
|
|
(search-forward "Location:") |
|
|
|
|
(right-word) |
|
|
|
|
(left-word) |
|
|
|
|
(setq zoom-summary (concat zoom-summary " @" (get-buffer-to-eol))) |
|
|
|
|
(search-forward "Time:") |
|
|
|
|
(search-forward "<") |
|
|
|
|
(left-char) |
|
|
|
|
(setq zoom-scheduled-time (get-buffer-to-eol)) |
|
|
|
|
(org-capture nil "z"))))) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; define 'z' as the shortcut |
|
|
|
|
(add-to-list 'mu4e-view-actions |
|
|
|
|
'("zCreate agenda item for meeting" . create-item-for-meeting) t) |
|
|
|
|
(advice-add 'mu4e-update-mail-and-index :around |
|
|
|
|
(lambda (orig-fun &rest args) |
|
|
|
|
"Only trigger an update if the server is the one that should |
|
|
|
|
currently be active; otherwise each mu4e instance will trigger an |
|
|
|
|
update" |
|
|
|
|
(when (string-equal server-name (kde-current-activity-name)) |
|
|
|
|
(apply orig-fun args)))) |
|
|
|
|
(require 'smtpmail) |
|
|
|
|
(require 'mu4e) |
|
|
|
|
(require 'helm-mu) |
|
|
|
|
(global-set-key (kbd "C-x μ") 'mu4e) |
|
|
|
|
(global-set-key (kbd "C-x 5 μ") (eval-with-new-frame (mu4e))) |
|
|
|
|
|
|
|
|
|
(defalias 'μ 'mu4e) |
|
|
|
|
|
|
|
|
|
(setq mu4e-maildir "~/.mail" |
|
|
|
|
mu4e-attachment-dir "~/attachments" |
|
|
|
|
mu4e-html2text-command "w3m -dump -T text/html -cols 72 -o display_link_number=true -o auto_image=false -o display_image=false -o ignore_null_img_alt=true" |
|
|
|
|
mu4e-headers-show-threads nil |
|
|
|
|
mu4e-headers-sort-direction "descending" |
|
|
|
|
mail-user-agent 'mu4e-user-agent |
|
|
|
|
read-mail-command 'mu4e |
|
|
|
|
mu4e-update-interval 120 |
|
|
|
|
mu4e-view-use-gnus t |
|
|
|
|
message-kill-buffer-on-exit t |
|
|
|
|
mu4e-compose-format-flowed t |
|
|
|
|
fill-flowed-encode-column 998 |
|
|
|
|
mm-text-html-renderer 'gnus-w3m |
|
|
|
|
mu4e-read-option-use-builtin nil |
|
|
|
|
mu4e-completing-read-function 'completing-read |
|
|
|
|
mu4e-modeline-support nil |
|
|
|
|
|
|
|
|
|
(advice-add 'mu4e~header-line-format :around |
|
|
|
|
(lambda (orig-fun &rest args) |
|
|
|
|
(let ((mu4e-use-fancy-chars t) |
|
|
|
|
(mu4e--mark-fringe-len 5)) |
|
|
|
|
(apply orig-fun args)))) |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
(let (p1 p2 myLine) |
|
|
|
|
(setq p1 (line-beginning-position) ) |
|
|
|
|
(setq p2 (line-end-position) ) |
|
|
|
|
(setq myLine (buffer-substring-no-properties p1 p2))) |
|
|
|
|
|
|
|
|
|
(defun get-buffer-current-line () |
|
|
|
|
(let ((p (line-beginning-position)) |
|
|
|
|
(q (line-end-position))) |
|
|
|
|
(buffer-substring-no-properties p q))) |
|
|
|
|
|
|
|
|
|
(defun get-buffer-to-eol () |
|
|
|
|
(let ((p (point)) |
|
|
|
|
(q (line-end-position))) |
|
|
|
|
(buffer-substring-no-properties p q))) |
|
|
|
|
|
|
|
|
|
(defun format-zoom-meeting () |
|
|
|
|
(if (boundp 'zoom-link) |
|
|
|
|
(if (boundp 'zoom-passcode) |
|
|
|
|
(concat zoom-summary |
|
|
|
|
" [[" zoom-link "][link]] (" zoom-passcode ")\n SCHEDULED: " zoom-scheduled-time) |
|
|
|
|
(concat zoom-summary |
|
|
|
|
" [[" zoom-link "][link]]\n SCHEDULED: " zoom-scheduled-time)) |
|
|
|
|
(concat zoom-summary "\n SCHEDULED: " zoom-scheduled-time))) |
|
|
|
|
|
|
|
|
|
(defun create-item-for-meeting (msg) |
|
|
|
|
"Search for messages sent by the sender of the message at point." |
|
|
|
|
(makunbound 'zoom-link) |
|
|
|
|
(makunbound 'zoom-passcode) |
|
|
|
|
(save-excursion |
|
|
|
|
(beginning-of-buffer) |
|
|
|
|
(cond ((search-forward "Join Zoom Meeting" nil t) |
|
|
|
|
(message "found zoom meeting") |
|
|
|
|
(right-char) |
|
|
|
|
(setq zoom-link (get-buffer-current-line)) |
|
|
|
|
(when (search-forward "Passcode:" nil t) |
|
|
|
|
(setq zoom-passcode (get-buffer-current-line))) |
|
|
|
|
(beginning-of-buffer) |
|
|
|
|
(search-forward "Time:") |
|
|
|
|
(search-forward "<") |
|
|
|
|
(left-char) |
|
|
|
|
(setq zoom-scheduled-time (get-buffer-to-eol)) |
|
|
|
|
(search-backward "Summary:") |
|
|
|
|
(right-word) |
|
|
|
|
(right-word) |
|
|
|
|
(left-word) |
|
|
|
|
(setq zoom-summary (get-buffer-to-eol)) |
|
|
|
|
(org-capture nil "z")) |
|
|
|
|
((search-forward "Accept ]") |
|
|
|
|
(message "found generic meeting") |
|
|
|
|
(search-forward "Summary:") |
|
|
|
|
(right-word) |
|
|
|
|
(right-word) |
|
|
|
|
(left-word) |
|
|
|
|
(setq zoom-summary (get-buffer-to-eol)) |
|
|
|
|
(search-forward "Location:") |
|
|
|
|
(right-word) |
|
|
|
|
(left-word) |
|
|
|
|
(setq zoom-summary (concat zoom-summary " @" (get-buffer-to-eol))) |
|
|
|
|
(search-forward "Time:") |
|
|
|
|
(search-forward "<") |
|
|
|
|
(left-char) |
|
|
|
|
(setq zoom-scheduled-time (get-buffer-to-eol)) |
|
|
|
|
(org-capture nil "z"))))) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; define 'z' as the shortcut |
|
|
|
|
(add-to-list 'mu4e-view-actions |
|
|
|
|
'("zCreate agenda item for meeting" . create-item-for-meeting) t) |
|
|
|
|
(advice-add 'mu4e-update-mail-and-index :around |
|
|
|
|
(lambda (orig-fun &rest args) |
|
|
|
|
"Only trigger an update if the server is the one that should |
|
|
|
|
currently be active; otherwise each mu4e instance will trigger an |
|
|
|
|
update" |
|
|
|
|
(when (string-equal server-name (kde-current-activity-name)) |
|
|
|
|
(apply orig-fun args)))) |
|
|
|
|
|
|
|
|
|
(advice-add 'mu4e~header-line-format :around |
|
|
|
|
(lambda (orig-fun &rest args) |
|
|
|
|
(let ((mu4e-use-fancy-chars t) |
|
|
|
|
(mu4e--mark-fringe-len 5)) |
|
|
|
|
(apply orig-fun args)))) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#+end_src |
|
|
|
|
*** This is an attempt to highlight the current context when composing |
|
|
|
|
#+begin_src emacs-lisp |
|
|
|
|
(add-hook 'mu4e-compose-mode-hook |
|
|
|
|
(defun my-do-compose-stuff () |
|
|
|
|
(setq header-line-format-right '("Context: " |
|
|
|
|
(:eval (mu4e-context-name (mu4e-context-current)))) |
|
|
|
|
header-line-separator |
|
|
|
|
'(:eval (let* ((len-left 0) |
|
|
|
|
(len-right (length (format-mode-line header-line-format-right))) |
|
|
|
|
(len-separator (- (+ (window-width) 2 2 2) (+ len-left len-right)))) |
|
|
|
|
(format (format "%%%ds" len-separator) "")))) |
|
|
|
|
(put 'header-line-format-right 'risky-local-variable t) |
|
|
|
|
(put 'header-line-separator 'risky-local-variable t) |
|
|
|
|
(setq header-line-format '("" header-line-separator |
|
|
|
|
header-line-format-right)))) |
|
|
|
|
#+end_src |
|
|
|
|
*** Save attachments with more reasonable permissions |
|
|
|
|
#+begin_src emacs-lisp |
|
|
|
|
(setq mm-attachment-file-modes #o644) |
|
|
|
|
#+end_src |
|
|
|
|
|
|
|
|
|
*** Recipient handling |
|
|
|
|
Add aliases (i.e. mailing groups) to [[file://~/.mailrc][the .mailrc file]] |
|
|
|
|
|
|
|
|
|
@ -1088,7 +1124,7 @@ |
|
|
|
|
"Professor · U Toronto\n")))) |
|
|
|
|
|
|
|
|
|
,(make-mu4e-context |
|
|
|
|
:name "CMP Editor" |
|
|
|
|
:name (propertize "CMP Editor" 'face 'org-level-1) |
|
|
|
|
:enter-func |
|
|
|
|
(lambda () (mu4e-message "Switch to the CMP Editor context")) |
|
|
|
|
:leave-func |
|
|
|
|
@ -1109,6 +1145,53 @@ |
|
|
|
|
( mu4e-compose-signature . (concat |
|
|
|
|
"Jacopo De Simoi (he · him)\n" |
|
|
|
|
"Associate Editor for CMP\n" |
|
|
|
|
"Professor · U Toronto\n")))) |
|
|
|
|
|
|
|
|
|
,(make-mu4e-context |
|
|
|
|
:name (propertize "JMD Editor" 'face 'org-level-2) |
|
|
|
|
:enter-func |
|
|
|
|
(lambda () (mu4e-message "Switch to the JMD Editor context")) |
|
|
|
|
:leave-func |
|
|
|
|
(lambda () (mu4e-message "Leave the JMD Editor context")) |
|
|
|
|
;; we match based on the maildir of the message |
|
|
|
|
:match-func (lambda (msg) |
|
|
|
|
(when msg |
|
|
|
|
(string-match-p "^/math/editorial.JMD" (mu4e-message-field |
|
|
|
|
msg :maildir)))) |
|
|
|
|
:vars '( ( user-mail-address . "jacopods@math.utoronto.ca" ) |
|
|
|
|
( user-full-name . "Jacopo De Simoi" ) |
|
|
|
|
( mu4e-sent-folder . "/math/Sent") |
|
|
|
|
( mu4e-drafts-folder . "/math/Drafts") |
|
|
|
|
( mu4e-trash-folder . "/math/Trash") |
|
|
|
|
( mu4e-refile-folder . "/math/editorial.JMD.Archive") |
|
|
|
|
( smtpmail-stream-type . starttls ) |
|
|
|
|
( smtpmail-smtp-service . 587 ) |
|
|
|
|
( mu4e-compose-signature . (concat |
|
|
|
|
"Jacopo De Simoi (he · him)\n" |
|
|
|
|
"Editor for JMD\n" |
|
|
|
|
"Professor · U Toronto\n")))) |
|
|
|
|
,(make-mu4e-context |
|
|
|
|
:name (propertize "AMQ Editor" 'face 'org-level-3) |
|
|
|
|
:enter-func |
|
|
|
|
(lambda () (mu4e-message "Switch to the AMQ Editor context")) |
|
|
|
|
:leave-func |
|
|
|
|
(lambda () (mu4e-message "Leave the AMQ Editor context")) |
|
|
|
|
;; we match based on the maildir of the message |
|
|
|
|
:match-func (lambda (msg) |
|
|
|
|
(when msg |
|
|
|
|
(string-match-p "^/math/editorial.AMQ" (mu4e-message-field |
|
|
|
|
msg :maildir)))) |
|
|
|
|
:vars '( ( user-mail-address . "jacopods@math.utoronto.ca" ) |
|
|
|
|
( user-full-name . "Jacopo De Simoi" ) |
|
|
|
|
( mu4e-sent-folder . "/math/Sent") |
|
|
|
|
( mu4e-drafts-folder . "/math/Drafts") |
|
|
|
|
( mu4e-trash-folder . "/math/Trash") |
|
|
|
|
( mu4e-refile-folder . "/math/editorial.AMQ.Archive") |
|
|
|
|
( smtpmail-stream-type . starttls ) |
|
|
|
|
( smtpmail-smtp-service . 587 ) |
|
|
|
|
( mu4e-compose-signature . (concat |
|
|
|
|
"Jacopo De Simoi (he · him)\n" |
|
|
|
|
"Editor for AMQ\n" |
|
|
|
|
"Professor · U Toronto\n")))))) |
|
|
|
|
|
|
|
|
|
;; set `mu4e-context-policy` and `mu4e-compose-policy` to tweak when mu4e should |
|
|
|
|
@ -1386,8 +1469,7 @@ |
|
|
|
|
(setq org-file-apps |
|
|
|
|
'((auto-mode . emacs) |
|
|
|
|
("\\.x?html?\\'" . "xdg-open %s") |
|
|
|
|
("\\.djvu\\'" . "xdg-open \"%s\"") |
|
|
|
|
("\\.pdf\\'" . "xdg-open \"%s\""))) |
|
|
|
|
("\\.djvu\\'" . "xdg-open \"%s\""))) |
|
|
|
|
#+end_src |
|
|
|
|
*** Agenda |
|
|
|
|
Set the canonical binding for the agenda |
|
|
|
|
@ -1506,7 +1588,12 @@ |
|
|
|
|
; the bit below adds a blank line before the first scheduled item |
|
|
|
|
(mapconcat #'identity list "\n"))) |
|
|
|
|
#+end_src |
|
|
|
|
|
|
|
|
|
- Local holidays |
|
|
|
|
#+begin_src emacs-lisp |
|
|
|
|
(setq ontario-statutory-holidays |
|
|
|
|
'((holiday-fixed 1 1 "New Year's Day") |
|
|
|
|
(holiday-float 2 1 3 "Family Day"))) |
|
|
|
|
#+end_src |
|
|
|
|
- Sleeker time-grid |
|
|
|
|
#+begin_src emacs-lisp |
|
|
|
|
(setq org-agenda-sort-notime-is-late nil) |
|
|
|
|
@ -1561,11 +1648,6 @@ |
|
|
|
|
(year (nth 2 date)) |
|
|
|
|
(iso-week (org-days-to-iso-week |
|
|
|
|
(calendar-absolute-from-gregorian date))) |
|
|
|
|
;; (weekyear (cond ((and (= month 1) (>= iso-week 52)) |
|
|
|
|
;; (1- year)) |
|
|
|
|
;; ((and (= month 12) (<= iso-week 1)) |
|
|
|
|
;; (1+ year)) |
|
|
|
|
;; (t year))) |
|
|
|
|
(weekstring (format " W%02d" iso-week) |
|
|
|
|
)) |
|
|
|
|
(format "%s%s - %4d·%02d·%02d" |
|
|
|
|
@ -1595,29 +1677,16 @@ |
|
|
|
|
(t year))) |
|
|
|
|
(weekstring (format " W%02d" iso-week))) |
|
|
|
|
|
|
|
|
|
;; (format (concat "\n" |
|
|
|
|
;; "%9s %s %4d%s\n" |
|
|
|
|
;; "%9s \n" |
|
|
|
|
;; "%9s %-10s\n" |
|
|
|
|
;; "%9s \n" |
|
|
|
|
;; "%9s %s\n") |
|
|
|
|
;; (figlet-num day 0) monthname year weekstring |
|
|
|
|
;; (figlet-num day 1) |
|
|
|
|
;; (figlet-num day 2) dayname |
|
|
|
|
;; (figlet-num day 3) |
|
|
|
|
;; (figlet-num day 4) (sunrise-sunset)) |
|
|
|
|
|
|
|
|
|
(let ((solar-info (solar-sunrise-sunset-string-list (calendar-current-date))) |
|
|
|
|
(spacer " ") |
|
|
|
|
) |
|
|
|
|
(spacer " ")) |
|
|
|
|
(concat "\n" |
|
|
|
|
(format " %4d·%02d " year month) "\n" |
|
|
|
|
(format "%9s" (figlet-num day 0 2)) spacer (format "%s%s" dayname weekstring) "\n" |
|
|
|
|
(format "%9s" (figlet-num day 1 2)) spacer (car solar-info) "\n" |
|
|
|
|
(format "%9s" (figlet-num day 2 2)) spacer (cadr solar-info) "\n" |
|
|
|
|
(format "%9s" (figlet-num day 3 2)) spacer (caddr solar-info) "\n" |
|
|
|
|
(format "%9s" (figlet-num day 4 2)) "\n" |
|
|
|
|
))))) |
|
|
|
|
(format "%9s" (figlet-num day 4 2)) "\n"))))) |
|
|
|
|
|
|
|
|
|
(require 'solar) |
|
|
|
|
(defun solar-sunrise-sunset-string-list (date &optional nolocation) |
|
|
|
|
"String of *local* times of sunrise, sunset, and daylight on Gregorian DATE. |
|
|
|
|
@ -1633,8 +1702,6 @@ |
|
|
|
|
(format "%s hours daylight" |
|
|
|
|
(nth 2 l))))) |
|
|
|
|
|
|
|
|
|
(solar-sunrise-sunset-string-list (calendar-current-date)) |
|
|
|
|
|
|
|
|
|
(defun left-right-align (s1 s2) |
|
|
|
|
(concat s1 (make-string (- (window-body-width) (length s1) (length s2)) ?\ ) s2 "\n")) |
|
|
|
|
|
|
|
|
|
@ -1644,10 +1711,10 @@ |
|
|
|
|
|
|
|
|
|
(setq org-agenda-format-date #'org-agenda-format-date-figlet) |
|
|
|
|
(setq org-agenda-prefix-format |
|
|
|
|
'((agenda . " %i %6c %s %?-12t") |
|
|
|
|
(todo . " %i %6c · ") |
|
|
|
|
(tags . " %i %6c · ") |
|
|
|
|
(search . " %i %6c · "))) |
|
|
|
|
'((agenda . " %i %7c %s %?-12t") |
|
|
|
|
(todo . " %i %7c · ") |
|
|
|
|
(tags . " %i %7c · ") |
|
|
|
|
(search . " %i %7c · "))) |
|
|
|
|
|
|
|
|
|
(advice-add 'org-agenda-get-scheduled :around |
|
|
|
|
(lambda (orig-fun &rest args) |
|
|
|
|
@ -3092,7 +3159,9 @@ |
|
|
|
|
#+begin_src emacs-lisp |
|
|
|
|
(byte-recompile-directory "~/.emacs.d/bibretrieve" 0) |
|
|
|
|
(load "bibretrieve") |
|
|
|
|
(setq bibretrieve-backends '(("msn" . 10))) |
|
|
|
|
(setq bibretrieve-backends '(("msn" . 10) |
|
|
|
|
("arxiv" . 10) |
|
|
|
|
("zbm" . 5))) |
|
|
|
|
(require 'biblio) |
|
|
|
|
#+end_src |
|
|
|
|
|
|
|
|
|
@ -3506,7 +3575,10 @@ |
|
|
|
|
("C-SPC" . avy-goto-word-or-subword-1) |
|
|
|
|
("M-s" . avy-goto-word-or-subword-1) |
|
|
|
|
("M-g M-g" . avy-goto-line) |
|
|
|
|
("M-g g" . avy-goto-line))) |
|
|
|
|
("M-g g" . avy-goto-line) |
|
|
|
|
("M-g M-c" . avy-goto-char) |
|
|
|
|
("M-g c" . avy-goto-char) |
|
|
|
|
)) |
|
|
|
|
(require 'ace-window) |
|
|
|
|
(global-set-key (kbd "M-o") 'ace-window) |
|
|
|
|
(setq aw-keys '(?f ?j ?d ?k ?s ?l ?a ?g ?h) |
|
|
|
|
@ -3540,6 +3612,32 @@ |
|
|
|
|
(add-hook 'nov-mode-hook |
|
|
|
|
#'(lambda () (setq-local show-trailing-whitespace nil))) |
|
|
|
|
|
|
|
|
|
#+end_src |
|
|
|
|
** ediff |
|
|
|
|
#+begin_src emacs-lisp |
|
|
|
|
(setq ediff-window-setup-function 'ediff-setup-windows-plain) |
|
|
|
|
(defvar my-ediff-last-windows nil) |
|
|
|
|
(defun my-store-pre-ediff-winconfig () |
|
|
|
|
(setq my-ediff-last-windows (current-window-configuration))) |
|
|
|
|
|
|
|
|
|
(defun my-restore-pre-ediff-winconfig () |
|
|
|
|
(set-window-configuration my-ediff-last-windows)) |
|
|
|
|
|
|
|
|
|
(add-hook 'ediff-before-setup-hook #'my-store-pre-ediff-winconfig) |
|
|
|
|
(add-hook 'ediff-quit-hook #'my-restore-pre-ediff-winconfig) |
|
|
|
|
|
|
|
|
|
#+end_src |
|
|
|
|
** Ellama |
|
|
|
|
Set default provider to be mistral (for now eh) |
|
|
|
|
#+begin_src emacs-lisp |
|
|
|
|
(setq ellama-provider |
|
|
|
|
(make-llm-ollama |
|
|
|
|
;; this model should be pulled to use it |
|
|
|
|
;; value should be the same as you print in terminal during pull |
|
|
|
|
:chat-model "llama3" |
|
|
|
|
:embedding-model "nomic-embed-text" |
|
|
|
|
:default-chat-non-standard-params '(("num_ctx" . 8192)))) |
|
|
|
|
|
|
|
|
|
#+end_src |
|
|
|
|
** TODO Phase out Package.el |
|
|
|
|
Load package.el |
|
|
|
|
|