Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> For example, I'm using it with org-capture to track sleep data straight into the table, which results in a table row for each day (with an auto-generated timestamp).

I'm curious how one would do that. Would you mind sharing your capture template?



My capture templates are here https://github.com/karlicoss/dotemacs/blob/d3d26d4315868298b...

, but sleep logging is in a 'private' config for some reason, so I'll just paste it here:

  (setq --my/extra-capture-templates
      '(("s"
         "sleep"
         table-line
         (file+headline "/path/to/capture.org" "sleep table")
         "| %U | %? | | | |")))
"sleep table" is the heading, under which the table is contained. So:

- I press the capture hotkey (F4 for me)

- then 's' which prompts me for a table line

- %U automatically substitutes the timestamp

- the cursor is placed at %? (second column), so I can just log whatever I need to, tab for the next column, and then finish capture


What’s the advantage to this over a csv in excel?

I track my blood pressure similarly. The entry is simple and I can read the csv into R/python whenever I want to visualize it.


You can keep it all in one file, along with the code and results of its execution.

That org capture template will feed new data into a table; below it, in the same .org file, you can keep your R code and your Python code and whatever other code you prototype (I often write Elisp code), and you can execute all that code inside the .org file.

This approach is not giving you any new features, it's just optimizing for convenience. Think of .org files as Jupyter notebooks on steroids :).


I was going to say, sounds like Jupyter. Is there much of an advantage I'm missing out on as someone who prefers GUIs over the terminal and vim/emacs?


Org lets you do that all in one place :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: