Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dotfiles
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tim van Deurzen
dotfiles
Commits
0b650016
Commit
0b650016
authored
Nov 11, 2021
by
Tim van Deurzen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated with some experimental functions for filtering roam nodes.
parent
da839e06
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
221 additions
and
198 deletions
+221
-198
doom-emacs/config.el
doom-emacs/config.el
+84
-66
doom-emacs/init.el
doom-emacs/init.el
+137
-132
No files found.
doom-emacs/config.el
View file @
0b650016
...
@@ -76,32 +76,10 @@
...
@@ -76,32 +76,10 @@
org-id-track-globally
t
)
org-id-track-globally
t
)
(
setq
org-roam-directory
"~/org/roam/"
(
setq
org-roam-directory
"~/org/roam/"
org-roam-v2-ack
t
)
org-roam-v2-ack
t
)
(
cl-defmethod
org-roam-node-filetitle
((
node
org-roam-node
))
"Return the file TITLE for the node."
(
org-roam-get-keyword
"TITLE"
(
org-roam-node-file
node
)))
(
cl-defmethod
org-roam-node-hierarchy
((
node
org-roam-node
))
"Return the hierarchy for the node."
(
let
((
title
(
org-roam-node-title
node
))
(
olp
(
org-roam-node-olp
node
))
(
level
(
org-roam-node-level
node
))
(
filetitle
(
org-roam-node-filetitle
node
)))
(
concat
(
if
(
>
level
0
)
(
concat
filetitle
" → "
))
(
if
(
>
level
1
)
(
concat
(
string-join
olp
" → "
)
" → "
))
title
))
)
(
cl-defmethod
org-roam-node-directories
((
node
org-roam-node
))
(
if-let
((
dirs
(
file-name-directory
(
file-relative-name
(
org-roam-node-file
node
)
org-roam-directory
))))
(
format
"(%s)"
(
string-join
(
f-split
dirs
)
"/"
))
""
))
(
setq
org-roam-node-display-template
"${directories:10} ${hierarchy:40} ${tags:20}"
)
(
setq
org-roam-capture-templates
(
setq
org-roam-capture-templates
'
((
"d"
"default"
plain
'
((
"d"
"default"
plain
"%?"
"%?"
...
@@ -135,49 +113,89 @@
...
@@ -135,49 +113,89 @@
;; org-gcal-client-secret "6AQ7_vtvqLTeL-ltDcwrIvao"
;; org-gcal-client-secret "6AQ7_vtvqLTeL-ltDcwrIvao"
;; org-gcal-file-alist '(("tim.vandeurzen@gmail.com" . "~/org/agendas/google.org")))
;; org-gcal-file-alist '(("tim.vandeurzen@gmail.com" . "~/org/agendas/google.org")))
(
use-package!
org-super-agenda
(
org-roam-db-autosync-mode
))
:after
org-agenda
:config
;(defun vulpea-agenda-files-update (&rest _)
(
setq
org-agenda-custom-commands
; "Update the value of `org-agenda-files'."
'
((
"z"
"Custom Day"
; (setq org-agenda-files (vulpea-project-files)))
((
agenda
""
((
org-agenda-span
'day
)
;
(
org-super-agenda-groups
;(advice-add 'org-agenda :before #'vulpea-agenda-files-update)
'
((
:log
t
)
(
:name
"Schedule"
(
add-hook!
org-mode
:append
:time-grid
t
)
#'
visual-line-mode
(
:habit
t
)
#'
org-appear-mode
)
(
:name
"Scheduled future"
:scheduled
future
)
(
defun
tim/org-roam-filter-by-tag
(
tag
)
(
:name
"Scheduled past"
(
lambda
(
node
)
:scheduled
past
)
(
member
tag
(
org-roam-node-tags
node
))))
(
:name
"Due today"
:deadline
today
)
(
defun
ayrat555/org-roam-directories
()
(
:name
"Overdue"
(
let
((
files
(
directory-files
org-roam-directory
)))
:deadline
past
)
(
seq-filter
(
lambda
(
name
)
(
:name
"Due soon"
(
and
(
file-directory-p
(
concat
org-roam-directory
name
))
:deadline
future
)
(
not
(
string-prefix-p
"."
name
))))
(
:name
"Waiting"
files
)))
:todo
"WAITING"
:order
10
)
))))))
(
defun
tim/org-roam-find-project-workspace
()
(
"w"
"Custom Week"
(
interactive
)
((
agenda
""
((
org-agenda-span
'week
)
(
org-super-agenda-groups
(
let*
((
directory
(
completing-read
"org-roam directory: "
(
ayrat555/org-roam-directories
)))
'
((
:log
t
)
(
org-roam-directory
(
expand-file-name
directory
org-roam-directory
)))
(
:name
"Schedule"
(
org-roam-node-find
:time-grid
t
)
nil
(
:name
"Planning"
nil
:scheduled
t
)
(
tim/org-roam-filter-by-tag
directory
))
(
:name
"Due"
))
:deadline
t
)
(
:name
"Overdue"
(
map!
:leader
:deadline
past
)
(
:prefix-map
(
"n"
.
"notes"
)
))))))
(
:prefix
(
"w"
.
"workspace"
)
))
:desc
"New project in a workspace"
"n"
#'
tim/org-roam-find-project-workspace
)))
(
org-super-agenda-mode
))
)
(
use-package!
org-super-agenda
:after
org-agenda
(
org-roam-autosync-mode
)
:config
(
setq
org-agenda-custom-commands
'
((
"z"
"Custom Day"
((
agenda
""
((
org-agenda-span
'day
)
(
org-super-agenda-groups
'
((
:log
t
)
(
:name
"Schedule"
:time-grid
t
)
(
:habit
t
)
(
:name
"Scheduled future"
:scheduled
future
)
(
:name
"Scheduled past"
:scheduled
past
)
(
:name
"Due today"
:deadline
today
)
(
:name
"Overdue"
:deadline
past
)
(
:name
"Due soon"
:deadline
future
)
(
:name
"Waiting"
:todo
"WAITING"
:order
10
)
))))))
(
"w"
"Custom Week"
((
agenda
""
((
org-agenda-span
'week
)
(
org-super-agenda-groups
'
((
:log
t
)
(
:name
"Schedule"
:time-grid
t
)
(
:name
"Planning"
:scheduled
t
)
(
:name
"Due"
:deadline
t
)
(
:name
"Overdue"
:deadline
past
)
))))))
))
(
org-super-agenda-mode
))
;; Here are some additional functions/macros that could help you configure Doom:
;; Here are some additional functions/macros that could help you configure Doom:
...
...
doom-emacs/init.el
View file @
0b650016
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment