From 66db8836b5479e4ef8cd88319101d16ac8851848 Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Sat, 31 May 2014 10:47:55 +0200 Subject: [PATCH] org-table.el (org-table-copy-down): Fix bug * org-table.el (org-table-copy-down): When the text above does not contain a number, fall back on incrementing by one. --- lisp/org-table.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/org-table.el b/lisp/org-table.el index d1f968682..8cd8f8b02 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -1183,8 +1183,10 @@ to a number. In the case of a timestamp, increment by days." (- (org-time-string-to-absolute txt) (org-time-string-to-absolute txt-up))) ((string-match org-ts-regexp3 txt) 1) - (t (- (string-to-number txt) - (string-to-number txt-up))))) + ((string-match "^[0-9]+\\(\.[0-9]+\\)?" txt-up) + (- (string-to-number txt) + (string-to-number (match-string 0 txt-up)))) + (t 1))) (t 1))) (if (not txt) (user-error "No non-empty field found") -- 2.11.4.GIT