[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] Re: tagging during creation
From: |
Andrew J. Korty |
Subject: |
[Orgmode] Re: tagging during creation |
Date: |
Mon, 05 Nov 2007 05:58:21 -0500 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (darwin) |
Here's what I use:
(defun org-set-buffer-todo-tags ()
"Set tags for all tagless TODO headings in the current buffer."
(save-excursion
(goto-char (point-min))
(while (re-search-forward "\\* \\(?:TODO\\|ACTION\\|WAITING\\) " nil t)
(let ((tags (org-get-tags)))
(if (or (not tags) (string= tags ""))
(org-set-tags))))))
(add-hook 'remember-hook
(lambda ()
(define-key (current-local-map) ""
(lambda ()
(interactive)
(if (string= (buffer-name (current-buffer)) "*Remember*")
(org-set-buffer-todo-tags))
(org-ctrl-c-ctrl-c)))))
--
Andrew J. Korty, Deputy Information Security Officer
Office of the Vice President for Information Technology and CIO
Indiana University