summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Dominik <carsten.dominik@gmail.com>2011-06-15 08:55:09 +0200
committerCarsten Dominik <carsten.dominik@gmail.com>2011-06-15 08:55:09 +0200
commitfaccb8d58ca8b257fa16f5fc7a37999d0a3773bf (patch)
tree7aeb3da24d78a5f7c00be3856ade74cd4c465dfa
parente78ed7bbde8f7af554642306cd7b3c14976c8633 (diff)
downloadorg-mode-faccb8d58ca8b257fa16f5fc7a37999d0a3773bf.tar.gz
Make S-up/down/left/right in indented clocktable BEGIN lines
* lisp/org.el (org-find-dblock): (org-clocktable-try-shift): Make regexp work also when #+begin line is indentex. Achim Gratz writes: It wasn't possible to use S-up/down/left/right on the clocktable BEGIN line when the whole table was indented. Interestingly enough calling the function directly would work, it turned out to be a regexp in org.el that was still pinned to bol. There was a second one further down that is used to recognize dynamic blocks that got the same treatment. TINYCHANGE
-rw-r--r--lisp/org.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/org.el b/lisp/org.el
index ef81192..ade1f25 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -3902,7 +3902,7 @@ If yes, offer to stop it and to save the buffer with the changes."
(defun org-clocktable-try-shift (dir n)
"Check if this line starts a clock table, if yes, shift the time block."
- (when (org-match-line "#\\+BEGIN: clocktable\\>")
+ (when (org-match-line "^[ \t]*#\\+BEGIN:[ \t]+clocktable\\>")
(org-clocktable-shift dir n)))
;; Autoload org-timer.el
@@ -10598,7 +10598,7 @@ If not found, stay at current position and return nil."
(let (pos)
(save-excursion
(goto-char (point-min))
- (setq pos (and (re-search-forward (concat "^#\\+BEGIN:[ \t]+" name "\\>")
+ (setq pos (and (re-search-forward (concat "^[ \t]*#\\+BEGIN:[ \t]+" name "\\>")
nil t)
(match-beginning 0))))
(if pos (goto-char pos))