emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] datetree: Recognize year headline with tags as a match
@ 2013-02-24 21:03 Tim Burt
  2013-02-25  9:48 ` Bastien
  0 siblings, 1 reply; 4+ messages in thread
From: Tim Burt @ 2013-02-24 21:03 UTC (permalink / raw)
  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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] datetree: Recognize year headline with tags as a match
  2013-02-24 21:03 [PATCH] datetree: Recognize year headline with tags as a match Tim Burt
@ 2013-02-25  9:48 ` Bastien
  2013-02-25 14:04   ` Jeffrey Brent McBeth
  0 siblings, 1 reply; 4+ messages in thread
From: Bastien @ 2013-02-25  9:48 UTC (permalink / raw)
  To: Tim Burt; +Cc: emacs-orgmode

Hi Tim,

Tim Burt <tcburt@rochester.rr.com> writes:

> * 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.

Applied, thanks a lot for the patch and the detailed change log!

Best,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] datetree: Recognize year headline with tags as a match
  2013-02-25  9:48 ` Bastien
@ 2013-02-25 14:04   ` Jeffrey Brent McBeth
  2013-02-25 21:21     ` Tim Burt
  0 siblings, 1 reply; 4+ messages in thread
From: Jeffrey Brent McBeth @ 2013-02-25 14:04 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

On Mon, Feb 25, 2013 at 10:48:16AM +0100, Bastien wrote:
> Hi Tim,
> 
> Tim Burt <tcburt@rochester.rr.com> writes:
> 
> > * 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.
> 
> Applied, thanks a lot for the patch and the detailed change log!
> 
> Best,

I can confirm that latest git fixes my use case.  Thank you both so much.

Jeff

-- 
"The man who does not read good books has no advantage over 
 the man who cannot read them."
 -- Mark Twain

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] datetree: Recognize year headline with tags as a match
  2013-02-25 14:04   ` Jeffrey Brent McBeth
@ 2013-02-25 21:21     ` Tim Burt
  0 siblings, 0 replies; 4+ messages in thread
From: Tim Burt @ 2013-02-25 21:21 UTC (permalink / raw)
  To: Jeffrey Brent McBeth; +Cc: Bastien, emacs-orgmode

Jeffrey Brent McBeth <mcbeth@broggs.org> writes:

> On Mon, Feb 25, 2013 at 10:48:16AM +0100, Bastien wrote:
>> Hi Tim,
>> 
>> Tim Burt <tcburt@rochester.rr.com> writes:
>> 
>> > * 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.
>> 
>> Applied, thanks a lot for the patch and the detailed change log!
>> 
>> Best,
>
> I can confirm that latest git fixes my use case.  Thank you both so much.

Excellent all the way 'round.


>
> Jeff

-- 
Tim Burt
www.rketburt.org
"It is healthful to every sane man to utter the art within him;" -- GK Chesterton

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-02-25 21:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-24 21:03 [PATCH] datetree: Recognize year headline with tags as a match Tim Burt
2013-02-25  9:48 ` Bastien
2013-02-25 14:04   ` Jeffrey Brent McBeth
2013-02-25 21:21     ` Tim Burt

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).