Re: [O] [PATCH] Add check for assignment to hline relative references in table formulas.
Hi Achim On Thu, Nov 7, 2013 at 8:37 PM, Achim Gratz wrote: > I've fixed the failing test since it wasn't checking hline expressions > and hence should not have relied on undocumented behaviour in the first > place. I agree that testing of "LHS hline ref range" and testing of something else (in this case "comparison") at the same time in the same ert-deftest has also disadvantages. But why did you only remove test coverage of "LHS hline ref range" instead of move it into a new ert-deftest? Michael
Re: [O] [PATCH] Add check for assignment to hline relative references in table formulas.
Achim Gratz writes: > Achim Gratz writes: >> Besides, that change breaks test-org-table/compare, which for whatever >> reason uses just such a LHS construct. > > I've fixed the failing test since it wasn't checking hline expressions > and hence should not have relied on undocumented behaviour in the first > place. Thanks for the fix Achim. -- Bastien
Re: [O] [PATCH] Add check for assignment to hline relative references in table formulas.
Achim Gratz writes: > Besides, that change breaks test-org-table/compare, which for whatever > reason uses just such a LHS construct. I've fixed the failing test since it wasn't checking hline expressions and hence should not have relied on undocumented behaviour in the first place. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Factory and User Sound Singles for Waldorf rackAttack: http://Synth.Stromeko.net/Downloads.html#WaldorfSounds
Re: [O] [PATCH] Add check for assignment to hline relative references in table formulas.
Hi, Achim Gratz writes: > Bastien writes: >>> * org-table.el (org-table-recalculate): Generate user error if >>> an hline relative reference is use on the LHS of a formula. >> >> Applied, thanks! > > Rick is listed as a contributor, so the TINYCHANGE marker is wrong. Yes, I realized that. > Besides, that change breaks test-org-table/compare, which for whatever > reason uses just such a LHS construct. Rick, can you have a look at this problem? Thanks, -- Bastien
Re: [O] [PATCH] Add check for assignment to hline relative references in table formulas.
Bastien writes: >> * org-table.el (org-table-recalculate): Generate user error if >> an hline relative reference is use on the LHS of a formula. > > Applied, thanks! Rick is listed as a contributor, so the TINYCHANGE marker is wrong. Besides, that change breaks test-org-table/compare, which for whatever reason uses just such a LHS construct. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ SD adaptations for Waldorf Q V3.00R3 and Q+ V3.54R2: http://Synth.Stromeko.net/Downloads.html#WaldorfSDada
Re: [O] [PATCH] Add check for assignment to hline relative references in table formulas.
Hi Rick, Rick Frankel writes: > * org-table.el (org-table-recalculate): Generate user error if > an hline relative reference is use on the LHS of a formula. Applied, thanks! -- Bastien
[O] [PATCH] Add check for assignment to hline relative references in table formulas.
* org-table.el (org-table-recalculate): Generate user error if an hline relative reference is use on the LHS of a formula. --- lisp/org-table.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/org-table.el b/lisp/org-table.el index 246cf8d..a3197d3 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -3001,6 +3001,8 @@ known that the table will be realigned a little later anyway." ;; Insert constants in all formulas (setq eqlist (mapcar (lambda (x) + (if (string-match "^@-?I+" (car x)) + (user-error "Can't assign to hline relative reference")) (when (string-match "\\`$[<>]" (car x)) (setq lhs1 (car x)) (setq x (cons (substring -- 1.8.0