emacs: org-extend-today-until

This commit is contained in:
Pavel Korytov 2023-12-21 15:22:42 +03:00
parent bea3dd52b4
commit d5935d4b04
2 changed files with 49 additions and 4 deletions

View file

@ -3249,6 +3249,8 @@ Returns (<buffer> . <workspace-index>) or nil."
(setq org-refile-use-outline-path 'file)
(setq org-outline-path-complete-in-steps nil)
(setq org-extend-today-until 4)
(defun my/generate-inbox-note-name ()
(format
"%s/inbox-notes/%s%s.org"
@ -3542,7 +3544,6 @@ TYPE may be `ts', `ts-active', `ts-inactive', `clocked', or
:title "Review: Stale tasks"
:sort '(todo priority date)
:super-groups '((:auto-outline-path-file t))))
(cons "Review: Clocked" #'my/org-ql-clocked-report)
(cons "Review: Recently timestamped" #'my/org-ql-view-recent-items)
(cons "Review: Unlinked to meetings"
(list :buffers-files #'org-agenda-files
@ -3961,7 +3962,8 @@ KEYS is a list of cons cells like (<label> . <time>)."
(setq org-journal-file-type 'weekly)
(setq org-journal-file-format "%Y-%m-%d.org")
(setq org-journal-date-format "%A, %Y-%m-%d")
(setq org-journal-enable-encryption t))
(setq org-journal-enable-encryption t)
(setq org-journal-time-format-post-midnight "PM: %R "))
(use-package org-journal-tags
:straight (:host github :repo "SqrtMinusOne/org-journal-tags")
@ -5060,6 +5062,17 @@ With ARG, repeats or can move backward if negative."
(dolist (file files)
(telega-chatbuf-attach-file file))))
(defun my/telega-save-to-dired (msg arg)
(interactive
(list (telega-msg-for-interactive)
(prefix-numeric-value current-prefix-arg)))
(if (eq arg 4)
(let ((default-directory
(with-current-buffer (my/get-good-buffer 'dired-mode "Dired buffer: ")
(dired-current-directory))))
(telega-msg-save msg))
(telega-msg-save msg)))
(defun my/dired-attach-to-notmuch (files notmuch-buffer)
(interactive
(list (dired-get-marked-files nil nil #'dired-nondirectory-p)
@ -5118,6 +5131,11 @@ With ARG, repeats or can move backward if negative."
"ai" #'my/dired-attach-to-ement
"an" #'my/dired-attach-to-mastodon))
(with-eval-after-load 'telega
(general-define-key
:keymaps 'telega-msg-button-map
"S" #'my/telega-save-to-dired))
(when my/is-termux
(straight-use-package 'vterm))

View file

@ -4538,6 +4538,12 @@ Refile settings
(setq org-outline-path-complete-in-steps nil)
#+end_src
My day ends late sometimes. Thanks John Wigley.
#+begin_src emacs-lisp
(setq org-extend-today-until 4)
#+end_src
**** Capture templates
Settings for Org capture mode. The goal here is to have a non-disruptive process to capture various ideas.
@ -4907,7 +4913,6 @@ Putting all the above in =org-ql-views=.
:title "Review: Stale tasks"
:sort '(todo priority date)
:super-groups '((:auto-outline-path-file t))))
(cons "Review: Clocked" #'my/org-ql-clocked-report)
(cons "Review: Recently timestamped" #'my/org-ql-view-recent-items)
(cons "Review: Unlinked to meetings"
(list :buffers-files #'org-agenda-files
@ -5423,7 +5428,8 @@ And it was interesting to find the reinforcement effect of checked dates on the
(setq org-journal-file-type 'weekly)
(setq org-journal-file-format "%Y-%m-%d.org")
(setq org-journal-date-format "%A, %Y-%m-%d")
(setq org-journal-enable-encryption t))
(setq org-journal-enable-encryption t)
(setq org-journal-time-format-post-midnight "PM: %R "))
#+end_src
So, [[https://github.com/SqrtMinusOne/org-journal-tags][org-journal-tags]] is my package that implements a tagging system for org-journal.
@ -7041,6 +7047,20 @@ Attach file to telega.
(telega-chatbuf-attach-file file))))
#+end_src
Save a file to a dired buffer.
#+begin_src emacs-lisp
(defun my/telega-save-to-dired (msg arg)
(interactive
(list (telega-msg-for-interactive)
(prefix-numeric-value current-prefix-arg)))
(if (eq arg 4)
(let ((default-directory
(with-current-buffer (my/get-good-buffer 'dired-mode "Dired buffer: ")
(dired-current-directory))))
(telega-msg-save msg))
(telega-msg-save msg)))
#+end_src
Attach files to notmuch.
#+begin_src emacs-lisp
(defun my/dired-attach-to-notmuch (files notmuch-buffer)
@ -7110,6 +7130,13 @@ And the keybindings:
"ai" #'my/dired-attach-to-ement
"an" #'my/dired-attach-to-mastodon))
#+end_src
#+begin_src emacs-lisp
(with-eval-after-load 'telega
(general-define-key
:keymaps 'telega-msg-button-map
"S" #'my/telega-save-to-dired))
#+end_src
** Shells / Terminals
*** vterm
My terminal emulator of choice.