summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2013-04-16 08:23:52 +0200
committerBastien Guerry <bzg@altern.org>2013-04-16 08:23:52 +0200
commit7c466e470c4ce26913777e0ec0ce5f9a3ac764f4 (patch)
tree9dc10ffea3f046ec608e35af97df56fc956c841d
parentcb658482c3daba69bc3a76660879192aabe54d1b (diff)
downloadorg-mode-7c466e470c4ce26913777e0ec0ce5f9a3ac764f4.tar.gz
org-list.el (org-sort-list): Don't move point when matching time values
* org-list.el (org-sort-list): Don't move point when matching time values. Thanks to Samuel Wales for reporting this bug.
-rw-r--r--lisp/org-list.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/org-list.el b/lisp/org-list.el
index 5bc5a15..628dd0a 100644
--- a/lisp/org-list.el
+++ b/lisp/org-list.el
@@ -2858,9 +2858,10 @@ ignores hidden links."
;; If it is a timer list, convert timer to seconds
((org-at-item-timer-p)
(org-timer-hms-to-secs (match-string 1)))
- ((or (re-search-forward org-ts-regexp (point-at-eol) t)
- (re-search-forward org-ts-regexp-both
- (point-at-eol) t))
+ ((or (save-excursion
+ (re-search-forward org-ts-regexp (point-at-eol) t))
+ (save-excursion (re-search-forward org-ts-regexp-both
+ (point-at-eol) t)))
(org-time-string-to-seconds (match-string 0)))
(t (org-float-time now))))
((= dcst ?f)