[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] [PATCH]: Fix to spreadsheet ranges in A1 style
From: |
Bake Timmons |
Subject: |
[Orgmode] [PATCH]: Fix to spreadsheet ranges in A1 style |
Date: |
Sun, 19 Aug 2007 22:46:01 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) |
A simple elisp formula in the spreadsheet indicated a couple of errors
in the handling of ranges:
'(car '(A4..C4))
This was using org.el from the latest Emacs cvs MAIN branch. I have
appended a patch against this as one possible fix. Thanks.
--- src/emacs/lisp/textmodes/org.el 2007-08-18 20:37:11.000000000 -0400
+++ build/emacs/lisp/textmodes/org.el 2007-08-19 22:27:06.000000000 -0400
@@ -8839,6 +8839,7 @@
(if (eq lispp 'literal)
x
(prin1-to-string (if numbers (string-to-number x) x))))
+ elements
" ")
(concat "[" (mapconcat
(lambda (x)
@@ -9131,8 +9132,11 @@
((match-end 3)
;; format match, just advance
(setq start (match-end 0)))
- ((and (> (match-beginning 0) 0)
- (equal ?. (aref s (max (1- (match-beginning 0)) 0))))
+ ((let ((pos (match-beginning 0)))
+ (and (> pos 0)
+ (equal ?. (aref s (1- pos)))
+ ;; not using .. for a range reference
+ (or (< pos 2) (not (equal ?. (aref s (1- pos)))))))
;; 3.e5 or something like this. FIXME: is this ok????
(setq start (match-end 0)))
(t
- [Orgmode] [PATCH]: Fix to spreadsheet ranges in A1 style,
Bake Timmons <=