-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path2021-03-21-todo-items-in-org-roam,-an-update.html
47 lines (43 loc) · 3.7 KB
/
2021-03-21-todo-items-in-org-roam,-an-update.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="alternate"
type="application/rss+xml"
href="https://magnus.therning.org/feed.xml"
title="RSS feed for https://magnus.therning.org/">
<title>Todo items in org-roam, an update</title>
<meta name="author" content="Magnus Therning"><meta name="referrer" content="no-referrer"><link href= "static/style.css" rel="stylesheet" type="text/css" /><link href= "static/htmlize.css" rel="stylesheet" type="text/css" /><link href= "static/extra_style.css" rel="stylesheet" type="text/css" /></head>
<body>
<div id="preamble" class="status"><div class="nav-bar"><a class="nav-link" href="./index.html">Top</a><a class="nav-link" href="./archive.html">Archive</a><a class="nav-link align-right" href="./feed.xml"><img src="static/rss-feed-icon.png" style="height: 24px;" /></a></div></div>
<div id="content">
<div class="post-date">21 Mar 2021</div><h1 class="post-title"><a href="https://magnus.therning.org/2021-03-21-todo-items-in-org-roam,-an-update.html">Todo items in org-roam, an update</a></h1>
<p>
I got an email from Mr Z with a nice modification to the code in my post on
<a href="2021-03-14-keeping-todo-items-in-org-roam.html">keeping todo items in org-roam</a>.
</p>
<p>
He already had a bunch of agenda files that he wanted to keep using (I had so
few of them that I'd simply converted them to roam files). Here's the solution
he shared with me:
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span class="org-rainbow-delimiters-depth-1">(</span><span class="org-keyword">defvar</span> <span class="org-variable-name">roam-extra-original-org-agenda-files</span> nil
<span class="org-doc">"Original value of `</span><span class="org-doc"><span class="org-constant">org-agenda-files</span></span><span class="org-doc">'."</span><span class="org-rainbow-delimiters-depth-1">)</span>
<span class="org-rainbow-delimiters-depth-1">(</span><span class="org-keyword">defun</span> <span class="org-function-name">roam-extra:update-todo-files</span> <span class="org-rainbow-delimiters-depth-2">(</span><span class="org-type">&rest</span> _<span class="org-rainbow-delimiters-depth-2">)</span>
<span class="org-doc">"Update the value of `</span><span class="org-doc"><span class="org-constant">org-agenda-files</span></span><span class="org-doc">'."</span>
<span class="org-rainbow-delimiters-depth-2">(</span><span class="org-keyword">unless</span> roam-extra-original-org-agenda-files
<span class="org-rainbow-delimiters-depth-3">(</span><span class="org-keyword">setq</span> roam-extra-original-org-agenda-files org-agenda-files<span class="org-rainbow-delimiters-depth-3">)</span><span class="org-rainbow-delimiters-depth-2">)</span>
<span class="org-rainbow-delimiters-depth-2">(</span><span class="org-keyword">setq</span> org-agenda-files
<span class="org-rainbow-delimiters-depth-3">(</span>append roam-extra-original-org-agenda-files
<span class="org-rainbow-delimiters-depth-4">(</span>roam-extra:todo-files<span class="org-rainbow-delimiters-depth-4">)</span><span class="org-rainbow-delimiters-depth-3">)</span><span class="org-rainbow-delimiters-depth-2">)</span><span class="org-rainbow-delimiters-depth-1">)</span>
</pre>
</div>
<p>
It's a rather nice modification I think. Thanks to Mr Z for agreeing to let me
share it here.
</p>
<div class="taglist"><a href="https://magnus.therning.org/tags.html">Tags</a>: <a href="https://magnus.therning.org/tag-emacs.html">emacs</a> <a href="https://magnus.therning.org/tag-org-mode.html">org-mode</a> <a href="https://magnus.therning.org/tag-org-roam.html">org-roam</a> </div></div>
<div id="postamble" class="status"><!-- org-static-blog-page-postamble --></div>
</body>
</html>