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 @@
org-id-track-globally
t
)
(
setq
org-roam-directory
"~/org/roam/"
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
'
((
"d"
"default"
plain
"%?"
...
...
@@ -135,49 +113,89 @@
;; org-gcal-client-secret "6AQ7_vtvqLTeL-ltDcwrIvao"
;; org-gcal-file-alist '(("tim.vandeurzen@gmail.com" . "~/org/agendas/google.org")))
(
use-package!
org-super-agenda
:after
org-agenda
: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
))
)
(
org-roam-autosync-mode
)
(
org-roam-db-autosync-mode
))
;(defun vulpea-agenda-files-update (&rest _)
; "Update the value of `org-agenda-files'."
; (setq org-agenda-files (vulpea-project-files)))
;
;(advice-add 'org-agenda :before #'vulpea-agenda-files-update)
(
add-hook!
org-mode
:append
#'
visual-line-mode
#'
org-appear-mode
)
(
defun
tim/org-roam-filter-by-tag
(
tag
)
(
lambda
(
node
)
(
member
tag
(
org-roam-node-tags
node
))))
(
defun
ayrat555/org-roam-directories
()
(
let
((
files
(
directory-files
org-roam-directory
)))
(
seq-filter
(
lambda
(
name
)
(
and
(
file-directory-p
(
concat
org-roam-directory
name
))
(
not
(
string-prefix-p
"."
name
))))
files
)))
(
defun
tim/org-roam-find-project-workspace
()
(
interactive
)
(
let*
((
directory
(
completing-read
"org-roam directory: "
(
ayrat555/org-roam-directories
)))
(
org-roam-directory
(
expand-file-name
directory
org-roam-directory
)))
(
org-roam-node-find
nil
nil
(
tim/org-roam-filter-by-tag
directory
))
))
(
map!
:leader
(
:prefix-map
(
"n"
.
"notes"
)
(
:prefix
(
"w"
.
"workspace"
)
:desc
"New project in a workspace"
"n"
#'
tim/org-roam-find-project-workspace
)))
(
use-package!
org-super-agenda
:after
org-agenda
: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:
...
...
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