From mboxrd@z Thu Jan 1 00:00:00 1970 From: ajk@iu.edu (Andrew J. Korty) Subject: Re: tagging during creation Date: Mon, 05 Nov 2007 05:58:21 -0500 Message-ID: References: <87ir4nl6rq.fsf@bzg.ath.cx> <87k5p3jotp.fsf@bzg.ath.cx> <630A9B9D-9387-45C0-8E0A-82EF38D733D8@science.uva.nl> <87tzo29n4e.fsf@bzg.ath.cx> <898963DF-3FAD-4158-BF63-AE069C36E283@science.uva.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Iozey-0005TJ-2J for emacs-orgmode@gnu.org; Mon, 05 Nov 2007 05:58:24 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Iozew-0005T3-4x for emacs-orgmode@gnu.org; Mon, 05 Nov 2007 05:58:22 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Iozew-0005T0-2t for emacs-orgmode@gnu.org; Mon, 05 Nov 2007 05:58:22 -0500 Received: from locrian.itso.iu.edu ([149.166.143.64]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Iozew-0007dV-5s for emacs-orgmode@gnu.org; Mon, 05 Nov 2007 05:58:22 -0500 In-Reply-To: <898963DF-3FAD-4158-BF63-AE069C36E283@science.uva.nl> (Carsten Dominik's message of "Sun\, 4 Nov 2007 14\:46\:48 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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=3D tags "")) (org-set-tags)))))) =20 (add-hook 'remember-hook (lambda () (define-key (current-local-map) "=03=03" (lambda () (interactive) (if (string=3D (buffer-name (current-buffer)) "*Remember= *") (org-set-buffer-todo-tags)) (org-ctrl-c-ctrl-c))))) --=20 Andrew J. Korty, Deputy Information Security Officer Office of the Vice President for Information Technology and CIO Indiana University