* [PATCH] Allow datetree to find years with trailing whitespace.
@ 2012-05-25 18:16 Matt Lundin
2012-05-25 21:22 ` Bastien
0 siblings, 1 reply; 2+ messages in thread
From: Matt Lundin @ 2012-05-25 18:16 UTC (permalink / raw)
To: Org Mode
* lisp/org-datetree.el: Fix regexp to allow datetree to find headings
with trailing whitespace. This fixes a bug in which an existing
datetree heading (e.g., "* 2012 ") would not be found by
org-datetree-find-year-create if it had trailing whitespace. This can
cause problems, for instance, if one is using column view on the date
tree, since editing subheadings with column view adds whitespace at
the end of the top heading.
---
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 192d1d6..8c04507 100644
--- a/lisp/org-datetree.el
+++ b/lisp/org-datetree.el
@@ -63,7 +63,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]\\)$")
+ (let ((re "^\\*+[ \t]+\\([12][0-9][0-9][0-9]\\)\\s-*$")
match)
(goto-char (point-min))
(while (and (setq match (re-search-forward re nil t))
--
1.7.10.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Allow datetree to find years with trailing whitespace.
2012-05-25 18:16 [PATCH] Allow datetree to find years with trailing whitespace Matt Lundin
@ 2012-05-25 21:22 ` Bastien
0 siblings, 0 replies; 2+ messages in thread
From: Bastien @ 2012-05-25 21:22 UTC (permalink / raw)
To: Matt Lundin; +Cc: Org Mode
Hi Matt,
Matt Lundin <mdl@imapmail.org> writes:
> * lisp/org-datetree.el: Fix regexp to allow datetree to find headings
> with trailing whitespace. This fixes a bug in which an existing
> datetree heading (e.g., "* 2012 ") would not be found by
> org-datetree-find-year-create if it had trailing whitespace. This can
> cause problems, for instance, if one is using column view on the date
> tree, since editing subheadings with column view adds whitespace at
> the end of the top heading.
Applied in master, thanks!
--
Bastien
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-05-25 23:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-25 18:16 [PATCH] Allow datetree to find years with trailing whitespace Matt Lundin
2012-05-25 21:22 ` Bastien
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.