From 79105c48e2ce7273cc38f523dd4b1b0b70450b00 Mon Sep 17 00:00:00 2001 From: David Maus Date: Wed, 8 Feb 2012 20:09:48 +0100 Subject: [PATCH] Moved `org-in-clocktable-p' from org-clock.el to org.el * org-clock.el (org-in-clocktable-p): Moved to org.el. * org.el (org-in-clocktable-p): New function. Moved from org-clock.el Fixes a bug reported by suvayu ali in . `org-context' depends on the function but org.el does not depend on org-clock.el. --- lisp/org-clock.el | 11 ----------- lisp/org.el | 11 +++++++++++ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lisp/org-clock.el b/lisp/org-clock.el index 411e3a4bc..793ae57d3 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -1763,17 +1763,6 @@ buffer and update it." (org-combine-plists org-clock-clocktable-default-properties props)))) (org-update-dblock)) -(defun org-in-clocktable-p () - "Check if the cursor is in a clocktable." - (let ((pos (point)) start) - (save-excursion - (end-of-line 1) - (and (re-search-backward "^[ \t]*#\\+BEGIN:[ \t]+clocktable" nil t) - (setq start (match-beginning 0)) - (re-search-forward "^[ \t]*#\\+END:.*" nil t) - (>= (match-end 0) pos) - start)))) - (defun org-day-of-week (day month year) "Returns the day of the week as an integer." (nth 6 diff --git a/lisp/org.el b/lisp/org.el index ff59b6779..8139ce749 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -19275,6 +19275,17 @@ With prefix arg UNCOMPILED, load the uncompiled versions." (eval form) (error (format "%%![Error: %s]" error)))) +(defun org-in-clocktable-p () + "Check if the cursor is in a clocktable." + (let ((pos (point)) start) + (save-excursion + (end-of-line 1) + (and (re-search-backward "^[ \t]*#\\+BEGIN:[ \t]+clocktable" nil t) + (setq start (match-beginning 0)) + (re-search-forward "^[ \t]*#\\+END:.*" nil t) + (>= (match-end 0) pos) + start)))) + (defun org-in-commented-line () "Is point in a line starting with `#'?" (equal (char-after (point-at-bol)) ?#))