6091 comments
2357 subscribers
6240 on Twitter
Subscribe! Feed reader E-mail

April 16, 2004

Bulk view

Got my FSF papers back!

I’m now an official contributor and my part of ERC can be merged into GNU Emacs eventually. Yay!

Short URL: http://sachachua.com/blog/p/1975

Scheduling tasks in the diary

(defun sacha/planner-diary-schedule-task (time)
  "Add a diary entry for the current task at TIME."
  (interactive "MTime: ")
  (save-window-excursion
    (save-excursion
      (save-restriction
        (let ((info (planner-current-task-info)))
          (sacha/planner-diary-add-entry
           (planner-task-date info)
           (concat time " | " (planner-task-description info) "")))))))

(defun sacha/planner-diary-add-entry (date text &optional annotation)
  "Prompt for a diary entry to add to `diary-file'."
  (interactive
   (list
    (if (or current-prefix-arg
            (not (string-match planner-date-regexp (planner-page-name))))
        (planner-read-date)
      (planner-page-name))
    (read-string
     "Diary entry: ")))
  (save-excursion
    (save-window-excursion
      (make-diary-entry
       (concat
        (let ((cal-date (planner-filename-to-calendar-date date)))
          (calendar-date-string cal-date t t))
        " " text
        (or annotation
            (let ((annotation (run-hook-with-args-until-success
                               'planner-annotation-functions)))
              (if annotation
                  (concat " " annotation)
                "")))))
      (planner-goto date)
      (planner-diary-insert-diary-maybe))))

../../notebook/emacs/planner-config.el

Short URL: http://sachachua.com/blog/p/1974

Get the highlights as a PDF!

Stories from my Twenties: Highlights from a Decade of Blogging

Free sample!