emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien <bzg@altern.org>
To: Tim Burt <tcburt@rochester.rr.com>
Cc: Jeffrey Brent McBeth <mcbeth@broggs.org>, emacs-orgmode@gnu.org
Subject: Re: org-capture, datetree, and tags
Date: Fri, 22 Feb 2013 14:56:06 +0100	[thread overview]
Message-ID: <87ehg8xxjd.fsf@bzg.ath.cx> (raw)
In-Reply-To: <m3ehg9j3l6.fsf@fluorine.burtket> (Tim Burt's message of "Thu, 21 Feb 2013 06:42:13 -0500")

Hi Tim,

Tim Burt <tcburt@rochester.rr.com> 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

  reply	other threads:[~2013-02-22 13:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-19 12:25 org-capture, datetree, and tags Jeffrey Brent McBeth
2013-02-20 11:40 ` Tim Burt
2013-02-21 11:42   ` Tim Burt
2013-02-22 13:56     ` Bastien [this message]
2013-02-23 12:18       ` Tim Burt
2013-02-24 21:05         ` Tim Burt
2013-02-20 11:43 ` Jeffrey Brent McBeth

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=87ehg8xxjd.fsf@bzg.ath.cx \
    --to=bzg@altern.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=mcbeth@broggs.org \
    --cc=tcburt@rochester.rr.com \
    /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).