From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Burt Subject: [PATCH] datetree: Recognize year headline with tags as a match Date: Sun, 24 Feb 2013 16:03:22 -0500 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:35013) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9ijG-0006B3-8w for emacs-orgmode@gnu.org; Sun, 24 Feb 2013 16:03:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U9ijD-0006Zl-2m for emacs-orgmode@gnu.org; Sun, 24 Feb 2013 16:03:26 -0500 Received: from hrndva-omtalb.mail.rr.com ([71.74.56.122]:16853) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9ijD-0006ZZ-09 for emacs-orgmode@gnu.org; Sun, 24 Feb 2013 16:03:23 -0500 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode * lisp/org-datetree.el (org-datetree-find-year-create): Include regexp for tags. Syntax was taken directly from org-todo-line-tags-regexp in org.el. Change made to fix the problem where a year headline of a datetree was not matched if it had a tag. The :NOEXPORT: tag is one useful case that should be matched. Initial problem observation reported by Jeffrey McBeth on the org-mode mailing list. TINYCHANGE --- lisp/org-datetree.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org-datetree.el b/lisp/org-datetree.el index f2e35fa..0102393 100644 --- a/lisp/org-datetree.el +++ b/lisp/org-datetree.el @@ -72,7 +72,7 @@ tree can be found." (goto-char (prog1 (point) (widen)))))) (defun org-datetree-find-year-create (year) - (let ((re "^\\*+[ \t]+\\([12][0-9][0-9][0-9]\\)\\s-*$") + (let ((re "^\\*+[ \t]+\\([12][0-9][0-9][0-9]\\)\\(.*?\\([ \t]:[[:alnum:]:_@#%]+:\\)?\\s-*$\\)") match) (goto-char (point-min)) (while (and (setq match (re-search-forward re nil t)) -- 1.7.11.7