From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: org-capture, datetree, and tags Date: Fri, 22 Feb 2013 14:56:06 +0100 Message-ID: <87ehg8xxjd.fsf@bzg.ath.cx> References: <20130219122529.GB26449@broggs.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:56433) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8t6i-000729-K5 for emacs-orgmode@gnu.org; Fri, 22 Feb 2013 08:56:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U8t6g-000595-De for emacs-orgmode@gnu.org; Fri, 22 Feb 2013 08:56:12 -0500 Received: from mail-we0-x22b.google.com ([2a00:1450:400c:c03::22b]:47853) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8t6g-00058g-7k for emacs-orgmode@gnu.org; Fri, 22 Feb 2013 08:56:10 -0500 Received: by mail-we0-f171.google.com with SMTP id u54so539373wey.2 for ; Fri, 22 Feb 2013 05:56:09 -0800 (PST) In-Reply-To: (Tim Burt's message of "Thu, 21 Feb 2013 06:42:13 -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: Tim Burt Cc: Jeffrey Brent McBeth , emacs-orgmode@gnu.org Hi Tim, Tim Burt writes: > : (defun org-datetree-find-year-create (year) > : (let ((re "^\\*+[ \t]+\\([12][0-9][0-9][0-9]\\)[ \t]*\\(:[[:alnum:]_@]*\\)*:*[ \t]*$") > : match) > I've tested with the following headlines: > - 2013 > - both with and without trailing spaces > - 2013 :abc: > - 2013 :abc123: > - 2013 :abc123:_underscore:@attaboy:: > - 2013 :noexport: > > Any comments on the regular expression are welcome before I make > patch. Thanks for working on fixing this. The more or less standard regexp for tags-till-end-of-line is this: :[[:alnum:]_@#%:]*[ \t]*$ ^ With * if you want to match headlines with no tag. Please have a look at this page before submitting a patch: http://orgmode.org/worg/org-contribute.html#sec-5 Thanks! -- Bastien