<commit_before>(defun add-todo ()
  "Create a new TODO entry."
  (interactive)
  (let ((beg (progn (search-backward "###")
                    (search-forward "blocker")
                    (move-beginning-of-line nil)))
        (end (progn (next-line)
                    (search-forward "###")
                    (move-beginning-of-line nil))))
    (kill-ring-save beg end)
    (search-backward "###")
    (insert "### ")
    (insert (format-time-string "%Y-%m-%d"
                                (time-add (current-time)
                                          (days-to-time 1))))
    (insert "\n\nDone:\n\nKudos:\n\n")
    (yank)
    (search-backward "Done")
    (next-line)
    (move-end-of-line nil)))

(defun add-pivotal-tasks ()
  (interactive)
  (save-excursion
    (progn
      (search-forward "###")
      (previous-line)
      (insert (shell-command-to-string "p todo")))))

(defun mark-as-done ()
  (interactive)
  (save-excursion
    (progn
      (move-beginning-of-line nil)
      (kill-visual-line 1)
      (search-backward "Done")
      (search-forward "\n\n")
      (previous-line)
      (yank))))

(defun fold-todos-except-top ()
  (interactive)
  ;; Move to top header and collapse everything.
  (beginning-of-buffer)
  (markdown-cycle)
  ;; Unfold the next level of headers and move down.
  (markdown-cycle)
  (next-line 2)
  ;; Unfold the next level of headers and move down.
  (markdown-cycle)
  (next-line 2)
  ;; Unfold the last level of headers.
  (markdown-cycle)<commit_msg>fix calling pivotal from emacs client<commit_after>(defun add-todo ()
  "Create a new TODO entry."
  (interactive)
  (let ((beg (progn (search-backward "###")
                    (search-forward "blocker")
                    (move-beginning-of-line nil)))
        (end (progn (next-line)
                    (search-forward "###")
                    (move-beginning-of-line nil))))
    (kill-ring-save beg end)
    (search-backward "###")
    (insert "### ")
    (insert (format-time-string "%Y-%m-%d"
                                (time-add (current-time)
                                          (days-to-time 1))))
    (insert "\n\nDone:\n\nKudos:\n\n")
    (yank)
    (search-backward "Done")
    (next-line)
    (move-end-of-line nil)))

(defun add-pivotal-tasks ()
  (interactive)
  (save-excursion
    (progn
      (search-forward "###")
      (previous-line)
      (insert (shell-command-to-string "/bin/bash --login $HOME/bin/p todo")))))

(defun mark-as-done ()
  (interactive)
  (save-excursion
    (progn
      (move-beginning-of-line nil)
      (kill-visual-line 1)
      (search-backward "Done")
      (search-forward "\n\n")
      (previous-line)
      (yank))))

(defun fold-todos-except-top ()
  (interactive)
  ;; Move to top header and collapse everything.
  (beginning-of-buffer)
  (markdown-cycle)
  ;; Unfold the next level of headers and move down.
  (markdown-cycle)
  (next-line 2)
  ;; Unfold the next level of headers and move down.
  (markdown-cycle)
  (next-line 2)
  ;; Unfold the last level of headers.
  (markdown-cycle)
{'fraction_non_alphanumeric': 0.1603527106466362, 'fraction_numerical': 0.002612671456564337, 'mean_word_length': 2.050796812749004, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1353661', 'n_tokens_mistral': 1064, 'n_tokens_neox': 1021, 'n_words': 228}