Category Archives: org

External brains – current state

Being the primary caregiver for a toddler means I’m distracted, often interrupted, and somewhat sleep-deprived, so using external brains (paper, phone, laptop) helps a lot. Here are a few things I rely on them to keep so that I can declutter my mind, worry less, and be more present:

  • Daily journal: This lets me tell W- stories about A-, appreciate A-‘s progress, and feel good about where the time went. I use Memento Database on my Android phone to add datestamped, categorized text notes to a Google Sheets spreadsheet.
  • Weekly/monthly review: This lets me appreciate progress over a longer period and plan for the next one. I edit the daily journal entries in Memento to set their importance (1: weekly highlight, 2: monthly), then filter, sort, group, and export the entries. I copy the text into Tasks Free (which synchronizes via Google Tasks) and then edit the text on my phone while A- nurses and sleeps. If I manage to have computer time, I might use Emacs to fill in more of my weekly or monthly review.
  • Tasks (next actions, inbox, waiting, thoughts, and assorted other lists): Tasks Free on my phone, since I can check it or add to it any time. I jot ideas/thoughts down here too, since I can write while nursing A- in bed. If I run out of battery, I charge my phone and move to W-‘s old phone, so I can keep writing. After I draft a thought that might be a good blog post, I copy it into the WordPress app and post it so that I can find it again later. (And so that other people might chime in with insights!) If I have time, I might copy a thought into Emacs, flesh it out further, and post it with org2blog.
  • Calendar: Google calendars – one for appointments, one for activity options. This way, I can hide all the optional stuff quickly.
  • Longer-term reminders, notes, work in progress: Org files. It’s so nice to be able to schedule tasks and have detailed notes on how to complete those tasks. I also really like being able to break things down with outlines and think out loud with code snippets. The weekly agenda review helps me catch reminders.
  • Photos and videos: I sync a Wi-Fi-enabled camera with my phone, then erase everything off the camera. Google Photos automatically uploads everything and shares them with W-. I post selected things to a Facebook closed group for kiddo updates.
  • Time and activity log: I track my time for curiosity. I made my own tracker (quantifiedawesone.com), and I made another button-based interface for easier tracking on my phone. That interface also lets me quickly log data to baby-connect.com, where I track A-‘s sleep, nursing, and potty use. I made my own visualizations, too.
  • Reference info: Org. Document scans in Dropbox or Owncloud, some GPG-encrypted.
  • Book notes: I’ve been reading mostly e-books from the library, so I take screenshots on my phone and they go through my photo workflow. I use Tasks Free to capture quick notes about paper books. I’d like to get back to sketchnotes when I have more focused time.
  • New words: I’m tracking this out of curiosity. She has said 350+ different words, and she’s not even 2 years old yet. :) Many of the words come from songs and books, so it helps to think of concrete experiences she can associate them with.
  • Scenarios, just-in-case notes: Org. Good for managing risks and worrying less.
  • Processes: Org. Good for step-by-step instructions when I’m sleep-deprived or doing something infrequently.
  • Finances: Ledger-cli. Text-based accounting, yay! I have some reports in ledger-mode and some in an Org file. I update this monthly or so.
  • Cooking: We manage our grocery list in OurGroceries because of the multiuser real-time sync. Recipes tend to be looked up on the Internet and then copied into a paper notebook or onto an index card when we like them. Meal plan is written on scrap paper and stuck to the front of the fridge.

I want to get better at structuring my observations of A-‘s progress, planning follow-up activities, and keeping the overall picture in mind. Since I’m roughly categorizing the daily journal entries in Memento / Google Sheets, I can probably create a table that will make it easy to see if there are neglected areas, and then extend that to plan ideas. Or, well, as much planning as one can do with a toddler, really – more like keeping an eye out for opportunities to build on A-‘s interests. So far it’s been okay, though. I’ve been learning about basic principles and skill components from textbooks on early childhood education, and that makes it a bit easier for me to improvise. I have a rough outline of areas to think about on a regular basis, and a few ideas to explore over the next few months.

I also want to get better at managing my book notes and other ideas I want to revisit at the appropriate time. I’m a little lacking on the review side, since most of my writing time is taken up by capturing observations and the occasional reflection. So far, this has also been okay. I just have to trust that whatever I’m writing down will still make sense to me in a few months or years, and the most important stuff will turn up on my radar at the appropriate time. Schedule-based reminders are easy, but things wait for all sorts of other factors. For example, there are lots of practical life skill exercises I picked up from the Montessori education books that will be a better fit when A-‘s fine motor skills improve.

I’d like to get back to drawing someday, although it may have to wait until I have more dedicated time. Whenever I start sketching out a thought, A- likes drawing on my paper or asking me to draw stuff for her. It’s all good, though, since it encourages us to scribble. It just means that I can’t take a picture and reuse the drawing – I have to type it up anyway, so I may as well explore the thought on my phone unless I want to think nonlinearly.

I’ll experiment with using timestamped notes in Memento to help me with offline logging when we go on our trip. I might also just spring for Internet access once we’re off the plane, since that’s useful for other things as well.

I’ve got a fair bit of clutter in my Org files, but I trust that the outlining tools will help me reorganize as needed. I tend to do just-in-time organizing: instead of starting with an outline and drilling down, I might capture a bunch of thoughts, refile them as the structure becomes clearer, and then work up and down from there.

I don’t spend nearly as much time on the computer as I might want to for optimal external-brain management, but the current system is surprisingly workable. Shifting more of my writing to my phone (including the weekly/monthly summaries) made a difference, since I don’t have to keep as much in my head or get constrained by computer time. I look forward to tweaking how things work as A- becomes more independent and as I learn more.

What do I want from my Org Mode files?

What do I want from the notes I keep in Org Mode, how’s that working out, and how can I improve?

Remind me of important tasks, especially recurring ones or ones in the far future
This works pretty well, especially with my weekly review. I mostly trust it, although it might be nice to use the timeline view to review tasks over the next few years just to make sure the important ones are there. And backups!
Keep detailed checklists, instructions, and notes, so that I don’t miss any steps or have to figure things out again when I’m sleep-deprived
I’ve found this useful when dealing with my business paperwork, and I look forward to documenting more routines.
Capture quick thoughts and tasks so that they don’t clutter up my mind
org-capture is good when I’m at my computer, and Google Tasks is a decent inbox when I’m away. Not very good at reviewing and refiling the items, though, but I can do that when I have more discretionary time.
Break bigger projects down into manageable tasks
I don’t have the brainspace right now to work on projects, so most of these have been shelved. I need to tweak my Org refile targets to make organizing things easier. I might be running into a limit with too many targets. Sometimes I can’t use org-refile to select a task that I already know exists.
Help me untangle my thoughts or keep a trail of breadcrumbs as I solve problems
Pretty good at this. Limited by computer time at the moment.
Pull together information and help me summarize
The code I wrote for my weekly and monthly reviews is working well. The code for Emacs News is decent, too, although I can save a little more time if I fix my function for opening all links in a region.
Draft blog posts
This is working well. It could be a little better if I sorted out image uploading and resizing, but my current workflow is fine.
Help me make the most of my limited computer time by prioritizing small tasks that move me forward
This is probably the weakest area. Right now, I tend to prioritize drawing, then checking my agenda for urgent/quick tasks, and maybe writing if I can squeeze it in. I mostly save writing for my phone, though, because I can write on my phone and I can’t do the other tasks then. Coding might help me improve efficiency, but that might have to wait until I have more focused time. It’s okay, I’ll get back to that someday. I think getting better at writing and posting will pay off well enough in the short term. If I give myself permission to post short, possibly incomplete thoughts (like I tell people to! :) ), I’ll get more stuff out there, and then I can build up from there.
Keep notes on people
Little memories, triggers for thoughtfulness, etc. I’m definitely the bottleneck here, not Org.
Help me review my decisions
It’s good to write down goals, options considered, criteria, trade-offs, reasons, predicted results, and so on. My bottleneck is probably taking the time to do so. People are good at rationalization, so I’m not trying to judge whether something was a good decision or a bad decision, but it’s interesting to see what decisions and evaluations reveal about my preferences and values.
Remind me about tools, how to use them, why, and so on
This is partly why I have a literate configuration – so the outline can remind me about stuff I’ve already coded. It’s also handy to keep track of commands and scripts that help me with various tasks. I just need to remember to copy and paste stuff as I do things.

Overall, I’m okay with input and output. Processing is my bottleneck at the moment. If I either fix that org-refile issue I’ve been running into, or come up with an alternative flexible search that will help me find outline entries when I don’t quite remember the headline, that should make processing a bit easier. A bit of outline gardening would help, too – archiving things that are no longer relevant, refiling notes and improving their headlines/text for searchability, maybe prioritizing tasks based on costs and benefits… I’m not entirely sure I’d be comfortable doing that on my phone, so it will have to wait for computer time.

In the meantime, I’m glad I have a place to accumulate (and eventually organize) all those notes!

Using categories to organize your Org agenda

D.C. Toedt wanted to share this tip for Org Mode agenda organization:

I’ve just discovered that it helps to add a :CATEGORY: property to the top-level, non-TODO heading that identifies the project.  Using your example:

* Project ABC
  :PROPERTIES:
  :CATEGORY: ABC
  :END:

** TODO A task related to Project ABC
** TODO Another task related to ABC
*** TODO Subtask
SCHEDULED: 

In my bog-standard org-mode setup, this results in “ABC” being displayed in the far-left column of the agenda instead of just “todo” (which seems to be the default). This is great — it means that, in the text of the “Subtask” todo entry itself, I don’t need to include a reminder of what project the todo entry is associated with.

Here’s an agenda mockup to illustrate the point, augmented with a “default” entry from my own to-do list:

  todo:       Scheduled:  Follow up on expense reimbursement request
  ABC:        Scheduled:  Subtask

This also allows filtering the agenda by the category.


Thanks for sharing, D.C.!

The category actually defaults to the first part of your filename.org, so todo.org becomes todo, organizer.org becomes organizer, etc. I keep an organizer.org, routines.org, business.org, etc. Keeping my routine tasks in routines.org allows me to filter them with a custom agenda command like:

            ("w" "Weekly review" agenda ""
             ((org-agenda-span 7)
              (org-agenda-log-mode 1)) "~/Dropbox/agenda/this-week.html")

            ("W" "Weekly review sans routines" agenda ""
             ((org-agenda-span 7)
              (org-agenda-log-mode 1)
              (org-agenda-tag-filter-preset '("-routine"))) "~/Dropbox/agenda/this-week-nonroutine.html")

so that I can see all the tasks (including routine tasks) in my regular weekly review, and just the special stuff in a separate view. You can see the whole definition of org-agenda-custom-commands in my Emacs configuration.

Update 2016-12-18: Oops! I just remembered that filtering by -routine is actually made possible by the #+FILETAGS: :routine: I have in routines.org, which has the additional benefit of allowing me to mark tasks in other files as routine by adding the :routine: tag to them. You can, however, still use categories to filter your agenda. < (org-agenda-filter-by-category) in an agenda view will filter by category, or use a match filter like CATEGORY="routines" to match on the category. Also, it turns out you can set up category icons by customizing org-agenda-category-icon-alist – hmm…

D.C.’s tip is handy if you want to keep those groups of tasks in one file, but still want that kind of visual indication in your agenda (and the ability to filter by it).

Have fun!

Publishing Emacs News as plain text, HTML, and attached Org file

Update 2016-02-05: Since @ThierryStoehr linked to this post about Emacs News-related code, I figured I’d add a link to the other support functions I’ve been using to help me with Emacs News summarization. There’s also this bit:

(let ((date (org-read-date nil nil "-mon")))
    (concat
     (my/org-list-from-rss "http://planet.emacsen.org/atom.xml" date) "\n"
     (shell-command-to-string (concat "~/bin/list-reddit-links.coffee emacs " date)) "\n"
     (shell-command-to-string (concat "~/bin/list-reddit-links.coffee org-mode " date)) "\n"
     "- New packages:\n"
     (my/list-new-packages) 
     "\n"))

Handy little things!

——

I’ve been publishing these weekly summaries of Emacs-related links on my blog and to the emacs-tangents mailing list / newsgroup. I started by posting plain text from Org Mode’s ASCII export, and people asked for Org Mode and HTML formats. So here’s some code that prepares things for pasting into a Gnus message buffer.

It turns out that order matters for multipart/alternative – start with plain text, then include richer alternatives. First time around, I put the HTML version first, so people didn’t end up seeing it. Anyway, here’s something that shows up properly now: text/plain, then text/html, with text/x-org attached. The heavy lifting is done with org-export-string-as, which exports into different formats.

  (defun my/share-emacs-news ()
    "Prepare current subtree for yanking into post."
    (interactive)
    ;; Draft Gnus article
    (save-restriction
      (org-narrow-to-subtree)
      (let ((org-export-html-preamble nil)
            (org-html-toplevel-hlevel 3)
            output)
        (setq output
              (apply
               'format
               "<#multipart type=alternative>
<#part type=\"text/plain\" disposition=inline>
%s
<#/part>
<#part type=\"text/html\" disposition=inline>
%s
<#/part>
<#/multipart>
<#part type=\"text/x-org\" disposition=attachment name=\"emacs-news.org\">
%s
<#/part>
"
               (mapcar
                (lambda (format)
                  (org-export-string-as (buffer-substring (point-min) (point-max)) format t))
                '(ascii html org))))
        (kill-new output))))

Howard Abrams showed me something like this in June 2015’s Emacs Hangout (~1:18:26) using org-mime-org-buffer-htmlize, which probably does the job in a much cooler way. =) I thought he had a blog post about it, but I can’t seem to find it. Anyway, there’s my little hack above!

Making my to-do list more detailed; process versus outcome

Some time ago, I wrote some code to make it easier for me to update my web-based Quantified Awesome time logs from Org Mode in Emacs, clocking into specific tasks or quickly selecting routine tasks with a few keyboard shortcuts. I’ve been refining my/org-clock-in-and-track, my/org-clock-in-and-track-by-name, and defhydra my/quantified-hydra, and I’ve been getting used to the new workflow. The more I smooth out the workflow, the more possibilities open up. Because I’ve set it up to prompt me for a time estimate before I start a task, I can see a running clock and timer in my modeline, and Emacs lets me know if I’m running over my estimate. Come to think of it, this makes it even easier to track at the detailed task level than to track at just the medium-level categories available through my web or mobile shortcuts. (If you’re curious about the Emacs Lisp code, you can check out my Emacs configuration.)

I’ve also been sorting out my workflow for quickly adding tasks. C-c r t (org-capture, with the t template I defined in org-capture-templates) displays a buffer where I can type in the task information and set a time estimate. From there, I can file it under the appropriate project with C-c C-w (org-refile), or maybe schedule it with C-c C-s (org-schedule).

Since both creating and tracking tasks are now easier, I’ve been gradually adding small, routine tasks to my task list. This includes household tasks such as vacuuming and quick computer-based tasks such as checking for replies to @emacs. These tasks are in my routines.org file or tagged with the :routine: tag, so I can sort them in my Org agenda view or filter them out if I want.

It might be interesting to bring that data from Emacs to my mobile phone, but it’s not particularly important at the moment. I’m usually home, so I can just check my org-agenda throughout the day. If I’m out for some errands, my errand list is short enough to remember (or quickly note somewhere), and I can use my phone to quickly jot short notes to add to my to-do list when I get back.

The next step for that workflow would probably be to improve my views of unscheduled tasks, choosing new things to work on based on their time estimates, contexts, or projects. I already have a few org-agenda-custom-commands for these, although I still need to tweak them so that they feel like they make sense. Project navigation works out pretty well, though, and it’ll get better as I gradually clean up my Org files.

It feels a little odd to use my to-do list this much throughout the day, compared to the less-structured approach of deciding at each moment. The day feels less leisurely and expansive. Still, there’s a certain satisfaction in crossing things off and knowing I’m taking care of the little things. I’ll find a new balance between the number of items on my list and the time I want to use to follow the butterflies of my interest or energy. Maybe I’ll use tags or priorities to highlight energizing tasks, the dessert tasks to my vegetable tasks. (Ooh, I wonder how I can get different colours in my org-agenda.) In the meantime, I think that fleshing out my to-do list even more – capturing the little routines that might get forgotten if I get more fuzzy-brained or distracted – may help me in the long run.

I think one of the things about working with a list of small, varied tasks is that there’s less of that feeling of accomplishing a big, non-routine chunk. One way I can work around this is to pick a dessert-y project focus for the morning and finish several tasks related to it, before getting through the rest of the routine tasks. There’s also a different approach: focusing on the process instead of the outcome, cultivating the satisfaction of steady progress instead of the exhilaration of a win. If I keep on improving my workflow for managing tasks, ideas, and reviews, I think it will pay off even as circumstances change.

2015-12-04e Process versus outcome -- index card #productivity #mindset #perspective #stoicism #philosophy

2015-12-04c Preparing for steady progress -- index card #productivity #fuzzy #preparation

Org Mode tables and fill-in quizzes – Latin verb conjugation drills in Emacs

I was looking for a Latin verb conjugation drill similar to these ones for and nouns and pronouns. I liked the instant feedback and the ability to quickly get hints. I couldn’t find an online drill I liked, though, so I made my own with Emacs and Org. (Because… why not?)

I wrote some code that would take a table like this:

present – 1st sing. – ago / agere agO
present – 2nd sing. – ago / agere agis
present – 3rd sing. – ago / agere agit
present – 1st plu. – ago / agere agimus
present – 2nd plu. – ago / agere agitis
present – 3rd plu. – ago / agere agunt
imperfect – 1st sing. – ago / agere agEbam
imperfect – 2nd sing. – ago / agere agEbAs
imperfect – 3rd sing. – ago / agere agEbat
imperfect – 1st plu. – ago / agere agEbAmus
imperfect – 2nd plu. – ago / agere agEbAtis
imperfect – 3rd plu. – ago / agere agEbant
future – 1st sing. – ago / agere agam
future – 2nd sing. – ago / agere agEs
future – 3rd sing. – ago / agere agEt
future – 1st plu. – ago / agere agEmus
future – 2nd plu. – ago / agere agEtis
future – 3rd plu. – ago / agere agent

I can call my/make-fill-in-quiz to get a quiz buffer that looks like this. If I get stuck, ? shows me a hint in the echo area.

latin-verb-drills-0

To make it easier, I’ve left case-fold-search set to nil so that I don’t have to match the case (uppercase vowels = macrons), but I can set case-fold-search to t if I want to make sure I’ve got the macrons in the right places.

Here’s the code to display the quiz buffer.

     (require 'widget)
     (defun my/check-widget-value (widget &rest ignore)
       "Provide visual feedback for WIDGET."
       (cond
        ((string= (widget-value widget) "?")
         ;; Asking for hint
         (message "%s" (widget-get widget :correct))
         (widget-value-set widget ""))
        ;; Use string-match to obey case-fold-search 
        ((string-match 
          (concat "^"
                  (regexp-quote (widget-get widget :correct))
                  "$")
          (widget-value widget))
         (message "Correct")
         (goto-char (widget-field-start widget))
         (goto-char (line-end-position))
         (insert "✓")
         (widget-forward 1)
         )))

   (defun my/make-fill-in-quiz (&optional quiz-table)
     "Create an fill-in quiz for the Org table at point.
The Org table's first column should have the questions and the second column 
should have the answers."
     (interactive (list (org-babel-read-table)))
     (with-current-buffer (get-buffer-create "*Quiz*")
       (kill-all-local-variables)
       (let ((inhibit-read-only t))
         (erase-buffer))
       (remove-overlays)
       (mapc (lambda (row)
               (widget-insert (car row))
               (widget-insert "\t")
               (widget-create 'editable-field
                              :size 15
                              :correct (cadr row)
                              :notify 'my/check-widget-value)
               (widget-insert "\n"))    
             quiz-table)
       (widget-create 'push-button
                      :table quiz-table
                      :notify (lambda (widget &rest ignore)
                                (my/make-fill-in-quiz (widget-get widget :table))) 
                      "Reset")
       (use-local-map widget-keymap)
       (widget-setup)
       (goto-char (point-min))
       (widget-forward 1)
       (switch-to-buffer (current-buffer))))

Incidentally, I generated the table above from a larger table of Latin verb conjugations in the appendix of Wheelock’s Latin, specified like this:

#+NAME: present-indicative-active
| laudO    | moneO   | agO    | audiO   | capiO   |
| laudAs   | monEs   | agis   | audIs   | capis   |
| laudat   | monet   | agit   | audit   | capit   |
| laudAmus | monEmus | agimus | audImus | capimus |
| laudAtis | monEtis | agitis | audItis | capitis |
| laudant  | monent  | agunt  | audiunt | capiunt |

#+NAME: imperfect-indicative-active
| laudAbam   | monEbam   | agEbam   | audiEbam   | capiEbam   |
| laudAbas   | monEbas   | agEbAs   | audiEbAs   | capiEbas   |
| laudAbat   | monEbat   | agEbat   | audiEbat   | capiEbat   |
| laudAbAmus | monEbAmus | agEbAmus | audiEbAmus | capiEbAmus |
| laudAbAtis | monEbAtis | agEbAtis | audiEbAtis | capiEbAtis |
| laudAbant  | monEbant  | agEbant  | audiEbant  | capiEbant  |

#+NAME: future-indicative-active
| laudAbO    | monEbO    | agam   | audiam     | capiam     |
| laudAbis   | monEbis   | agEs   | audiEs     | capiEs     |
| laudAbit   | monEbit   | agEt   | audiet     | capiet     |
| laudAbimus | monEbimus | agEmus | audiEmus   | capiEmus   |
| laudAbitis | monEbitis | agEtis | audiEtis   | capiEtis   |
| laudAbunt  | monEbunt  | agent  | audient    | capient    |

with the code:

#+begin_src emacs-lisp :var present=present-indicative-active :var imperfect=imperfect-indicative-active :var future=future-indicative-active
  (defun my/label-latin-with-verbs (table verbs persons tense)
    (apply 'append
           (-zip-with (lambda (row person) 
                        (-zip-with (lambda (word verb)
                                     (list word (format "%s - %s - %s" tense person verb)))
                                   row verbs))
                      table (-cycle persons))))
  (apply 'append 
         (mapcar (lambda (tense)
                   (my/label-latin-with-verbs 
                    (symbol-value tense)
                    '("laudo / laudare" "moneo / monEre" "ago / agere" "audiO / audIre" "capiO / capere")
                    '("1st sing." "2nd sing." "3rd sing." "1st plu." "2nd plu." "3rd plu.")
                    (symbol-name tense)))
                 '(present imperfect future)))

#+end_src

This uses dash.el for the -zip-with and -cycle functions. There’s probably a much better way to process the lists, but I’m still getting the hang of thinking properly functionally… =)

Anyway, I’m sure it will be handy for a number of other quiz-like things. org-drill and org-drill-table will probably come in handy for flashcards, too!