summaryrefslogtreecommitdiff
path: root/lisp/org
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/org')
-rw-r--r--lisp/org/org-clock.el3
-rw-r--r--lisp/org/org-mouse.el4
-rw-r--r--lisp/org/org.el5
3 files changed, 7 insertions, 5 deletions
diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el
index 41e799f9898..c0a45b3ad13 100644
--- a/lisp/org/org-clock.el
+++ b/lisp/org/org-clock.el
@@ -1656,7 +1656,8 @@ Optional argument N tells to change by that many units."
(save-excursion ; Do not replace this with `with-current-buffer'.
(org-no-warnings (set-buffer (org-clocking-buffer)))
(goto-char org-clock-marker)
- (if (org-looking-back (concat "^[ \t]*" org-clock-string ".*"))
+ (if (org-looking-back (concat "^[ \t]*" org-clock-string ".*")
+ (line-beginning-position))
(progn (delete-region (1- (point-at-bol)) (point-at-eol))
(org-remove-empty-drawer-at "LOGBOOK" (point)))
(message "Clock gone, cancel the timer anyway")
diff --git a/lisp/org/org-mouse.el b/lisp/org/org-mouse.el
index 160099ff055..9b218147b65 100644
--- a/lisp/org/org-mouse.el
+++ b/lisp/org/org-mouse.el
@@ -191,7 +191,7 @@ Changing this variable requires a restart of Emacs to get activated."
(interactive)
(end-of-line)
(skip-chars-backward "\t ")
- (when (org-looking-back ":[A-Za-z]+:")
+ (when (org-looking-back ":[A-Za-z]+:" (line-beginning-position))
(skip-chars-backward ":A-Za-z")
(skip-chars-backward "\t ")))
@@ -645,7 +645,7 @@ This means, between the beginning of line and the point."
'org-mode-restart))))
((or (eolp)
(and (looking-at "\\( \\|\t\\)\\(+:[0-9a-zA-Z_:]+\\)?\\( \\|\t\\)+$")
- (org-looking-back " \\|\t")))
+ (org-looking-back " \\|\t" (- (point) 2))))
(org-mouse-popup-global-menu))
((funcall get-context :checkbox)
(popup-menu
diff --git a/lisp/org/org.el b/lisp/org/org.el
index 3e032d46646..54924a9964a 100644
--- a/lisp/org/org.el
+++ b/lisp/org/org.el
@@ -7679,7 +7679,7 @@ command."
(re-search-forward org-outline-regexp-bol)
(beginning-of-line 0))
(skip-chars-backward " \r\n")
- (and (not (looking-back "^\*+"))
+ (and (not (looking-back "^\*+" (line-beginning-position)))
(looking-at "[ \t]+") (replace-match ""))
(unless (eobp) (forward-char 1))
(when (looking-at "^\\*")
@@ -8658,7 +8658,8 @@ links."
(when (equal (marker-buffer org-clock-marker) (current-buffer))
(save-excursion
(goto-char org-clock-marker)
- (looking-back "^.*") (match-string-no-properties 0))))
+ (buffer-substring-no-properties (line-beginning-position)
+ (point)))))
start beg end stars re re2
txt what tmp)
;; Find beginning and end of region to sort