Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode

This commit is contained in:
Carsten Dominik 2010-11-16 17:26:58 +01:00
commit 2bbba948ec
2 changed files with 8 additions and 8 deletions

View File

@ -57,9 +57,9 @@
"Replace newline character with ellipses. "Replace newline character with ellipses.
If STRING ends in a newline character, then remove the newline If STRING ends in a newline character, then remove the newline
character and replace it with ellipses." character and replace it with ellipses."
(if (and (stringp string) (string-match "[\n\r]" string)) (if (and (stringp string) (string-match "[\n\r]\\(.\\)?" string))
(concat (substring string 0 (match-beginning 0)) "...") (concat (substring string 0 (match-beginning 0))
string)) (if (match-string 1 string) "...")) string))
(defmacro sbe (source-block &rest variables) (defmacro sbe (source-block &rest variables)
"Return the results of calling SOURCE-BLOCK with VARIABLES. "Return the results of calling SOURCE-BLOCK with VARIABLES.

View File

@ -1623,7 +1623,7 @@ fontified, and then returned."
(font-lock-fontify-buffer) (font-lock-fontify-buffer)
(forward-line 2) (forward-line 2)
(buffer-substring (point) (progn (buffer-substring (point) (progn
(re-search-forward "^#\\+END" nil t) (re-search-forward "^[ \t]+#\\+END" nil t)
(point-at-bol))))) (point-at-bol)))))
(defun org-clock-report (&optional arg) (defun org-clock-report (&optional arg)
@ -1648,9 +1648,9 @@ buffer and update it."
(let ((pos (point)) start) (let ((pos (point)) start)
(save-excursion (save-excursion
(end-of-line 1) (end-of-line 1)
(and (re-search-backward "^#\\+BEGIN:[ \t]+clocktable" nil t) (and (re-search-backward "^[ \t]+#\\+BEGIN:[ \t]+clocktable" nil t)
(setq start (match-beginning 0)) (setq start (match-beginning 0))
(re-search-forward "^#\\+END:.*" nil t) (re-search-forward "^[ \t]+#\\+END:.*" nil t)
(>= (match-end 0) pos) (>= (match-end 0) pos)
start)))) start))))
@ -1741,7 +1741,7 @@ the currently selected interval size."
(and (memq dir '(left down)) (setq n (- n))) (and (memq dir '(left down)) (setq n (- n)))
(save-excursion (save-excursion
(goto-char (point-at-bol)) (goto-char (point-at-bol))
(if (not (looking-at "#\\+BEGIN: clocktable\\>.*?:block[ \t]+\\(\\S-+\\)")) (if (not (looking-at "^[ \t]+#\\+BEGIN:[ \t]+clocktable\\>.*?:block[ \t]+\\(\\S-+\\)"))
(error "Line needs a :block definition before this command works") (error "Line needs a :block definition before this command works")
(let* ((b (match-beginning 1)) (e (match-end 1)) (let* ((b (match-beginning 1)) (e (match-end 1))
(s (match-string 1)) (s (match-string 1))
@ -2134,7 +2134,7 @@ from the dynamic block defintion."
"Weekly report starting on: ") "Weekly report starting on: ")
(plist-get p1 :tstart) "\n") (plist-get p1 :tstart) "\n")
(setq step-time (org-dblock-write:clocktable p1)) (setq step-time (org-dblock-write:clocktable p1))
(re-search-forward "#\\+END:") (re-search-forward "^[ \t]+#\\+END:")
(when (and (equal step-time 0) stepskip0) (when (and (equal step-time 0) stepskip0)
;; Remove the empty table ;; Remove the empty table
(delete-region (point-at-bol) (delete-region (point-at-bol)