emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Tim Burt <tcburt@rochester.rr.com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: [PATCH] datetree: Recognize year headline with tags as a match
Date: Sun, 24 Feb 2013 16:03:22 -0500	[thread overview]
Message-ID: <m338wl77c5.fsf@fluorine.burtket> (raw)


* 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

             reply	other threads:[~2013-02-24 21:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-24 21:03 Tim Burt [this message]
2013-02-25  9:48 ` [PATCH] datetree: Recognize year headline with tags as a match Bastien
2013-02-25 14:04   ` Jeffrey Brent McBeth
2013-02-25 21:21     ` Tim Burt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m338wl77c5.fsf@fluorine.burtket \
    --to=tcburt@rochester.rr.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).