* Bug: Org Table: Field formulas with hline-address on right-hand side don't work anymore [7.8.09]
@ 2012-05-07 8:46 Tobias Nähring
0 siblings, 0 replies; 10+ messages in thread
From: Tobias Nähring @ 2012-05-07 8:46 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 6498 bytes --]
Emacs : GNU Emacs 23.4.1 (i686-pc-cygwin, GTK+ Version 2.24.8)
of 2012-01-29 on fiona
Package: Org-mode version 7.8.09
This bug concerns org-tables.
Field formulas with hline-address on right-hand side don't work anymore.
See the formula below the next table.
There, the address on the right-hand side is @II$1.
The result in @3$1 should be 3.
Nevertheless, re-calculation delivers nothing. The entry of @3$1 remains on the old value (whatever was entered before).
If one replaces "@II$1" with "@3$1" within the formula one gets the right result.
|---|
| 1 |
| 2 |
|---|
| 0 |
#+TBLFM: @II$1=vsum(@I$1..@II$1)
I already tried to turn on "Debug Formulas" but this did not help. This gave just no change in the reaction of the re-calculate command.
Note, that on the other hand the formula below the next table works. As expected, the 1 in field @1$1 is replaced with the 3 from field @II$1.
|---|
| 1 |
| 2 |
|---|
| 3 |
#+TBLFM: @1$1=@II$1
Pityingly, I can't easily reproduce the former version of orgmode where this
worked. (I installed over the former version without backup. I should not have done this.)
Please, inform me if this version number is really important for
the bug-fix. Maybe, I find the time to put more effort in this. I.e., install former version until I get one where the field formulas work.
A fast fix would be great since I need the hline-references in field formulas very much (large variable number of columns in tables, calculate maximum norm of column sections and stuff like that...,). I have old org-files where I need to re-calculate stuff like that.
current state:
==============
(setq
org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook)
org-metaup-hook '(org-babel-load-in-session-maybe)
org-after-todo-state-change-hook '(org-clock-out-if-current)
org-export-latex-format-toc-function 'org-export-latex-format-toc-default
org-tab-first-hook '(org-hide-block-toggle-maybe org-src-native-tab-command-maybe
org-babel-hide-result-toggle-maybe)
org-src-mode-hook '(org-src-babel-configure-edit-buffer
org-src-mode-configure-edit-buffer)
org-confirm-shell-link-function 'y-or-n-p
org-export-first-hook '(org-beamer-initialize-open-trackers)
org-agenda-before-write-hook '(org-agenda-add-entry-text)
org-babel-pre-tangle-hook '(save-buffer)
org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
org-cycle-show-empty-lines
org-optimize-window-after-visibility-change)
org-descriptive-links nil
org-export-preprocess-before-normalizing-links-hook '(org-remove-file-link-modifiers)
org-mode-hook '((lambda nil
(org-defkey org-mouse-map [mouse-3] (quote org-mouse-3-menu))
(setq pcomplete-default-completion-function
(quote (lambda nil (hippie-expand nil))))
)
#[nil "\300\301\302\303\304$\207"
[org-add-hook change-major-mode-hook org-show-block-all append
local]
5]
#[nil "\300\301\302\303\304$\207"
[org-add-hook change-major-mode-hook org-babel-show-result-all
append local]
5]
org-babel-result-hide-spec org-babel-hide-all-hashes)
org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe)
org-confirm-elisp-link-function 'yes-or-no-p
org-export-interblocks '((src org-babel-exp-non-block-elements))
org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
org-occur-hook '(org-first-headline-recenter)
org-from-is-user-regexp "\\<U-ITIHQ\\\\Tobias\\.Naehring\\>"
org-export-preprocess-before-selecting-backend-code-hook '(org-beamer-select-beamer-code)
org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc
org-beamer-auto-fragile-frames
org-beamer-place-default-actions-for-lists)
org-metadown-hook '(org-babel-pop-to-session-maybe)
org-export-blocks '((src org-babel-exp-src-block nil)
(export-comment org-export-blocks-format-comment t)
(ditaa org-export-blocks-format-ditaa nil)
(dot org-export-blocks-format-dot nil))
)
Best regards
Tobias Nähring
Engineering / Software Development
--
_________________________________
ITI News & Events
New Version: SimulationX 3.5 <http://www.itisim.com/simulationx/system-simulation/current-version/simulationx-35/>
SimulationX Info Day Stuttgart, 21 May <http://www.iti.de/aktuelles/events/839-21052012-simulationx-informationstag-stuttgart/>
VDI Congress "Drivetrain for Vehicles", 19-20 June <http://www.itisim.com/events/858-19th-20th-june-2012-getriebe-in-fahrzeugen/>
www.itisim.com <http://www.itisim.com>
ITI GmbH
Webergasse 1
01067 Dresden Germany
T +49 (351) 26050 124
F +49 (351) 26050 155
Naehring@itisim.com <mailto:Naehring@itisim.com>
Managing Director/Geschäftsführer
Jens O. Schindler · Dr. Andreas Uhlig
Commercial Register/Handelsregister
Amtsgericht Dresden · HRB 2331
USt.-IdNr.: DE140297717
Diese E-Mail ist streng vertraulich und nur für den
Empfänger bestimmt. Sie kann Informationen
enthalten, die rechtliche, geschäftliche oder andere
Vergünstigungen bedeuten.
Sollten Sie nicht der ausdrückliche Empfänger
sein, dürfen Sie diese Informationen nicht benutzen,
veröffentlichen oder vervielfältigen.
The information in this e-mail is strictly confidential, is intended
solely for the addressee, and may be privileged. If you are not the
intended addressee you must not disclose, print or take action
based upon this transmission and should delete it from
your system.
[-- Attachment #1.2: Type: text/html, Size: 19991 bytes --]
[-- Attachment #2: image001.gif --]
[-- Type: image/gif, Size: 11535 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Bug: Org Table: Field formulas with hline-address on right-hand side don't work anymore [7.8.09]
@ 2012-05-08 6:55 "Tobias Nähring"
2012-05-08 17:15 ` Achim Gratz
0 siblings, 1 reply; 10+ messages in thread
From: "Tobias Nähring" @ 2012-05-08 6:55 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 4916 bytes --]
Emacs : GNU Emacs 23.4.1 (i686-pc-cygwin, GTK+ Version 2.24.8)
of 2012-01-29 on fiona
Package: Org-mode version 7.8.09
This bug concerns org-tables.
Field formulas with hline-address on right-hand side don't work anymore.
See the formula below the next table.
There, the address on the right-hand side is @II$1.
The result in @3$1 should be 3.
Nevertheless, re-calculation delivers nothing. The entry of @3$1 remains on
the old value (whatever was entered before).
If one replaces "@II$1" with "@3$1" within the formula one gets the right
result.
|---|
| 1 |
| 2 |
|---|
| 0 |
#+TBLFM: @II$1=vsum(@I$1..@II$1)
I already tried to turn on “Debug Formulas” but this did not help. This
gave just no change in the reaction of the re-calculate command.
Note, that on the other hand the formula below the next table works. As
expected, the 1 in field @1$1 is replaced with the 3 from field @II$1.
|---|
| 1 |
| 2 |
|---|
| 3 |
#+TBLFM: @1$1=@II$1
Pityingly, I can't easily reproduce the former version of orgmode where
this
worked. (I installed over the former version without backup. I should not
have done this.)
Please, inform me if this version number is really important for
the bug-fix. Maybe, I find the time to put more effort in this. I.e.,
install former version until I get one where the field formulas work.
A fast fix would be great since I need the hline-references in field
formulas very much (large variable number of columns in tables, calculate
maximum norm of column sections and stuff like that…,). I have old
org-files where I need to re-calculate stuff like that.
current state:
==============
(setq
org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
org-speed-command-hook '(org-speed-command-default-hook
org-babel-speed-command-hook)
org-metaup-hook '(org-babel-load-in-session-maybe)
org-after-todo-state-change-hook '(org-clock-out-if-current)
org-export-latex-format-toc-function 'org-export-latex-format-toc-default
org-tab-first-hook '(org-hide-block-toggle-maybe
org-src-native-tab-command-maybe
org-babel-hide-result-toggle-maybe)
org-src-mode-hook '(org-src-babel-configure-edit-buffer
org-src-mode-configure-edit-buffer)
org-confirm-shell-link-function 'y-or-n-p
org-export-first-hook '(org-beamer-initialize-open-trackers)
org-agenda-before-write-hook '(org-agenda-add-entry-text)
org-babel-pre-tangle-hook '(save-buffer)
org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
org-cycle-show-empty-lines
org-optimize-window-after-visibility-change)
org-descriptive-links nil
org-export-preprocess-before-normalizing-links-hook
'(org-remove-file-link-modifiers)
org-mode-hook '((lambda nil
(org-defkey org-mouse-map [mouse-3] (quote
org-mouse-3-menu))
(setq
pcomplete-default-completion-function
(quote (lambda nil (hippie-expand nil))))
)
#[nil "\300\301\302\303\304$\207"
[org-add-hook change-major-mode-hook
org-show-block-all append
local]
5]
#[nil "\300\301\302\303\304$\207"
[org-add-hook change-major-mode-hook
org-babel-show-result-all
append local]
5]
org-babel-result-hide-spec
org-babel-hide-all-hashes)
org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
org-babel-execute-safely-maybe)
org-confirm-elisp-link-function 'yes-or-no-p
org-export-interblocks '((src org-babel-exp-non-block-elements))
org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
org-occur-hook '(org-first-headline-recenter)
org-from-is-user-regexp "\\<U-ITIHQ\\\\Tobias\\.Naehring\\>"
org-export-preprocess-before-selecting-backend-code-hook
'(org-beamer-select-beamer-code)
org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc
org-beamer-auto-fragile-frames
org-beamer-place-default-actions-for-lists)
org-metadown-hook '(org-babel-pop-to-session-maybe)
org-export-blocks '((src org-babel-exp-src-block nil)
(export-comment
org-export-blocks-format-comment t)
(ditaa org-export-blocks-format-ditaa
nil)
(dot org-export-blocks-format-dot nil))
)
Best regards,
Tobias
[-- Attachment #2: Type: text/html, Size: 10010 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug: Org Table: Field formulas with hline-address on right-hand side don't work anymore [7.8.09]
2012-05-08 6:55 "Tobias Nähring"
@ 2012-05-08 17:15 ` Achim Gratz
2012-05-09 5:46 ` Achim Gratz
0 siblings, 1 reply; 10+ messages in thread
From: Achim Gratz @ 2012-05-08 17:15 UTC (permalink / raw)
To: emacs-orgmode
Tobias Nähring writes:
> This bug concerns org-tables.
Posting the same bug report multiple times isn't going to magically
speed up its resolution.
> Field formulas with hline-address on right-hand side don't work
> anymore.
It seems to me that it's rather the left-hand address that is the
problem. Also, it is an initialization problem: once the calc machinery
has worked once, that very same formula you give works just as it should
until you leave the table and try again. Beyond that, I don't think I
know enough about the innards of org-table to help.
> Pityingly, I can't easily reproduce the former version of orgmode
> where this worked. (I installed over the former version without
> backup. I should not have done this.)
If you install from Git you can install any version desired.
> A fast fix would be great since I need the hline-references in field
> formulas very much (large variable number of columns in tables,
> calculate maximum norm of column sections and stuff like that…,). I
> have old org-files where I need to re-calculate stuff like that.
You might consider one of these workarounds:
|---|
| 1 |
| 2 |
|---|
| 3 |
#+TBLFM: @>$1=vsum(@I$1..@II$1)
|---|
| 1 |
| 2 |
|---|
| 3 |
#+TBLFM: @II=vsum(@I$1..@II$1)
Regards
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
Factory and User Sound Singles for Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug: Org Table: Field formulas with hline-address on right-hand side don't work anymore [7.8.09]
2012-05-08 17:15 ` Achim Gratz
@ 2012-05-09 5:46 ` Achim Gratz
2012-05-10 7:15 ` Tobias
2012-05-10 10:04 ` Carsten Dominik
0 siblings, 2 replies; 10+ messages in thread
From: Achim Gratz @ 2012-05-09 5:46 UTC (permalink / raw)
To: emacs-orgmode
Interestingly, this seems to have been broken ever since org-table got
split into its own file; i.e. the only working versions I could find are
5.x ones and the first broken version is fe939ecb95, which splits org.el
into more files and moves them into /lisp. Since I don't think that
code inside the functions was altered during that split, this smacks of
a missing defvar or autoload in either org-table or org.
Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
Samples for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldSamplesExtra
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug: Org Table: Field formulas with hline-address on right-hand side don't work anymore [7.8.09]
2012-05-09 5:46 ` Achim Gratz
@ 2012-05-10 7:15 ` Tobias
2012-05-10 10:19 ` Carsten Dominik
2012-05-10 10:04 ` Carsten Dominik
1 sibling, 1 reply; 10+ messages in thread
From: Tobias @ 2012-05-10 7:15 UTC (permalink / raw)
To: emacs-orgmode
First I have to apologize for posting the bug report twice. The first report has
been sent from my company. I thought that this bug-report does not make it to
the list because the e-mail address at my company is not subscribed to the list.
Therefore, I subscribed with my private e-mail address and sent the bug report
once more.
Now, some digging about the bug. I have investigated org-table-recalculate and
the functions called therein.
The only place where @II is handled correctly is:
org-table-get-descriptor-line
This function is only called within:
org-table-get-range
This function is called at the end of:
org-table-expand-lhs-ranges
But at the beginning of this function the cond condition
(string-match "^@-?[-+I0-9]+\\$-?[0-9]+$" lhs)
already filteres out this case. The field descriptor is not regarded as a range
but as a fixed field.
I changed
(string-match "^@-?[-+I0-9]+\\$-?[0-9]+$" lhs)
into
(string-match "^@-?[-+0-9]+\\$-?[0-9]+$" lhs)
without the I in the first character set. This seems to fix the bug. But I am
not sure about the side effects.
Best regards,
Tobias
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug: Org Table: Field formulas with hline-address on right-hand side don't work anymore [7.8.09]
2012-05-09 5:46 ` Achim Gratz
2012-05-10 7:15 ` Tobias
@ 2012-05-10 10:04 ` Carsten Dominik
2012-05-10 17:50 ` Achim Gratz
1 sibling, 1 reply; 10+ messages in thread
From: Carsten Dominik @ 2012-05-10 10:04 UTC (permalink / raw)
To: Achim Gratz; +Cc: emacs-orgmode
On 9.5.2012, at 07:46, Achim Gratz wrote:
> Interestingly, this seems to have been broken ever since org-table got
> split into its own file; i.e. the only working versions I could find are
> 5.x ones and the first broken version is fe939ecb95, which splits org.el
> into more files and moves them into /lisp. Since I don't think that
> code inside the functions was altered during that split, this smacks of
> a missing defvar or autoload in either org-table or org.
Hello Achim and Tobias,
I cannot even find a 5.x version where this worked. In fact, hline
expressions were never allowed for the LHS of a formula, and I believe
they never worked in this way.
I also do not see a compelling reason to make them work.
Regards
- Carsten
>
>
> Regards,
> Achim.
> --
> +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
>
> Samples for the Waldorf Blofeld:
> http://Synth.Stromeko.net/Downloads.html#BlofeldSamplesExtra
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug: Org Table: Field formulas with hline-address on right-hand side don't work anymore [7.8.09]
2012-05-10 7:15 ` Tobias
@ 2012-05-10 10:19 ` Carsten Dominik
0 siblings, 0 replies; 10+ messages in thread
From: Carsten Dominik @ 2012-05-10 10:19 UTC (permalink / raw)
To: Tobias; +Cc: emacs-orgmode
On 10.5.2012, at 09:15, Tobias wrote:
> First I have to apologize for posting the bug report twice. The first report has
> been sent from my company. I thought that this bug-report does not make it to
> the list because the e-mail address at my company is not subscribed to the list.
> Therefore, I subscribed with my private e-mail address and sent the bug report
> once more.
>
> Now, some digging about the bug. I have investigated org-table-recalculate and
> the functions called therein.
>
> The only place where @II is handled correctly is:
> org-table-get-descriptor-line
> This function is only called within:
> org-table-get-range
> This function is called at the end of:
> org-table-expand-lhs-ranges
> But at the beginning of this function the cond condition
> (string-match "^@-?[-+I0-9]+\\$-?[0-9]+$" lhs)
> already filteres out this case. The field descriptor is not regarded as a range
> but as a fixed field.
> I changed
> (string-match "^@-?[-+I0-9]+\\$-?[0-9]+$" lhs)
> into
> (string-match "^@-?[-+0-9]+\\$-?[0-9]+$" lhs)
> without the I in the first character set. This seems to fix the bug. But I am
> not sure about the side effects.
On the other hand (referring to my message in this thread just a few minutes ago) this analysis here is correct and making the change Tobias is proposing probably would work without side effects.
So I step back from my earlier post and I applied the change Tobias was proposing.
- Carsten
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug: Org Table: Field formulas with hline-address on right-hand side don't work anymore [7.8.09]
2012-05-10 10:04 ` Carsten Dominik
@ 2012-05-10 17:50 ` Achim Gratz
2012-05-10 18:57 ` Carsten Dominik
0 siblings, 1 reply; 10+ messages in thread
From: Achim Gratz @ 2012-05-10 17:50 UTC (permalink / raw)
To: emacs-orgmode
Carsten Dominik writes:
> I cannot even find a 5.x version where this worked.
It does work, but you have to be very careful not to pick up another org
or org-install at all (i.e. you'll never get it to work with Emacs23
unless you forcefully remove org and all its autoloads from the Emacs
install). But further investigation with the debugger then shows that
the reason why it works is a bug when matching the lhs (or so I think,
it is very hard to understand why it choses that code path) that then
leads to the formula being recognized as a "numbered" equation; in other
words the part "@II$" is completely ignored. Why this then breaks after
org-table.el moved into a separate file is another mystery, but
fortunately it doesn't have to be solved... :-)
Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
Wavetables for the Terratec KOMPLEXER:
http://Synth.Stromeko.net/Downloads.html#KomplexerWaves
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug: Org Table: Field formulas with hline-address on right-hand side don't work anymore [7.8.09]
2012-05-10 17:50 ` Achim Gratz
@ 2012-05-10 18:57 ` Carsten Dominik
2012-05-10 19:32 ` Achim Gratz
0 siblings, 1 reply; 10+ messages in thread
From: Carsten Dominik @ 2012-05-10 18:57 UTC (permalink / raw)
To: Achim Gratz; +Cc: emacs-orgmode
On 10.5.2012, at 19:50, Achim Gratz wrote:
> Carsten Dominik writes:
>> I cannot even find a 5.x version where this worked.
>
> It does work, but you have to be very careful not to pick up another org
> or org-install at all (i.e. you'll never get it to work with Emacs23
> unless you forcefully remove org and all its autoloads from the Emacs
> install). But further investigation with the debugger then shows that
> the reason why it works is a bug when matching the lhs (or so I think,
> it is very hard to understand why it choses that code path) that then
> leads to the formula being recognized as a "numbered" equation; in other
> words the part "@II$" is completely ignored. Why this then breaks after
> org-table.el moved into a separate file is another mystery, but
> fortunately it doesn't have to be solved... :-)
My mother has this quote in her kitchen:
Next to the honorable art to get things done, there is the honorable are to leave things undone (bad translation, but you get the idea….
Thanks!
- Carsten
>
>
> Regards,
> Achim.
> --
> +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
>
> Wavetables for the Terratec KOMPLEXER:
> http://Synth.Stromeko.net/Downloads.html#KomplexerWaves
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Bug: Org Table: Field formulas with hline-address on right-hand side don't work anymore [7.8.09]
2012-05-10 18:57 ` Carsten Dominik
@ 2012-05-10 19:32 ` Achim Gratz
0 siblings, 0 replies; 10+ messages in thread
From: Achim Gratz @ 2012-05-10 19:32 UTC (permalink / raw)
To: emacs-orgmode
Carsten Dominik writes:
> My mother has this quote in her kitchen: Next to the honorable art to
> get things done, there is the honorable are to leave things undone
> (bad translation, but you get the idea….
Our master in vocational training had the bottom drawer in his desk
labeled "Self-Completion" (with a polished and engraved brass plate, no
less). Once a year he'd sift through all the files and circular letters
he had put there and indeed, there was nothing left to do except for
dropping them into the paper bin. :-)
Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
Factory and User Sound Singles for Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2012-05-10 19:32 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-07 8:46 Bug: Org Table: Field formulas with hline-address on right-hand side don't work anymore [7.8.09] Tobias Nähring
-- strict thread matches above, loose matches on Subject: below --
2012-05-08 6:55 "Tobias Nähring"
2012-05-08 17:15 ` Achim Gratz
2012-05-09 5:46 ` Achim Gratz
2012-05-10 7:15 ` Tobias
2012-05-10 10:19 ` Carsten Dominik
2012-05-10 10:04 ` Carsten Dominik
2012-05-10 17:50 ` Achim Gratz
2012-05-10 18:57 ` Carsten Dominik
2012-05-10 19:32 ` Achim Gratz
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.