Hi,

in the past I used the following function to add data to an org table:

(defun add-fitness (steps km kcal)
  "Add fitness data (STEPS KM KCAL)."
  (interactive "nsteps: \nnkm: \nnkcal: ")
  (find-file (locate-user-emacs-file "org/fitness.org"))
  (goto-char (point-max))
  (forward-line -1)
  (insert (format-time-string "| <%Y-%m-%d %a %H:%M> | ") (number-to-string 
steps) " | " (number-to-string km) " | " (number-to-string kcal) " | | | |\n")
  (if (string-search "Sat " (current-time-string))
      (insert "|--\n"))
  (forward-line -1)
  (org-ctrl-c-ctrl-c)
  (org-ctrl-c-star)
  (save-buffer))

but it stopped working a couple of days ago and now throws an error. I
guess that I am not supposed to call org-ctrl-c-ctrl-c and
org-ctrl-c-star in this way from a program, but I cannot figure out the
correct way to get what I need. Can you point me in the right direction?

Thanks,

-- 
Dieter Deyke
mailto:[email protected]
Get my Gnupg key:
gpg --keyserver keys.gnupg.net --recv-keys B116EA20

Reply via email to