[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: master badcd38 1/2: Correct a whole bunch of bugs coming with rename
RE: master badcd38 1/2: Correct a whole bunch of bugs coming with renamed cell relocation.
Mon, 25 Jan 2016 10:08:19 +0100
If I had a time machine at hand, I would first use it to correct
the biggest mistake I have done in my life... :-/
Anyway, as you noted I had sent my previous message before I
could finish writing it. Here is the continuation for information
about my intentions concerning SES:
After this [porting the correction to emacs-25 branch], I think
that I need to redesign the way that SES does the whole
relocation in order to be able to support easily column/row/cell
transposition/permutation. The current scheme is that fomulas,
reference lists, deferred write list, and deferred eval list, all
of them contain cell symbols. I would like to change this and
have directly the cell structures (ie 5 element vectors harboring
almost all the cell data) instead of the symbols, or rather, as
far as formula are concerned, some sort of (ses* CELL) sexp
holding that cell structure CELL. This way, when doing any
permutation of cells you just need :
1) save the cell value from cell symbol to cell property list
2) carry out the cell permutation
3) to update the standard symbol (eg change A1 to B1 if you transpose
the 2 first cells) in cells that were permutated, and push them to
the deferred write list,
4) to get back the value from cell property into value of updated
So you don't need any longer to do any changes in formulas or
reference lists. That would be quite more simple, IMHO, for all
The cost of that (replacing symbols by cell) is to convert from
the cell structure to the cell symbol, resp. vice versa, in the
following occasion :
- writing resp. reading the SES file
- writing editing resp. reading editing the formula.
The motivation for such a change is that it would allow
completely generic permutation : in the current scheme you rely
on this that the permutation is a translation, so you can
relocate values by reading values before they are written. Well,
one could make this more generically, as any permutation can be
decomposed in finite number of cycles, and within a cycle you
could also propagate the move.
So, yes, I could also keep the current scheme of using symbols to
refer to cells, provided that cell value relocation is carried
out in a clever way.
But anyway, either way would require a rather deep redesign to
support generic cell permutation, and as far as this is needed I
had rather make it in a way which seems more adequate to me (ie
use cell rather than symbol to refer to cells).
The above would be some major change in SES, and since that does not
correct any bug, but rather enables new features/better maintenance,
that won't go the the emacs-25 branch.
> From: address@hidden
> To: address@hidden
> Subject: Re: master badcd38 1/2: Correct a whole bunch of bugs coming with
> renamed cell relocation.
> Date: Wed, 20 Jan 2016 14:42:46 -0500
> CC: address@hidden
> Vincent Belaïche wrote:
>> So yes, as these are bugs, I would like to port these correction also
>> on the emacs-25 branch.
> Ideally you would hop in your time machine and make the changes on the
> emacs-25 branch in the first place, then let them get merged to master.
> If you don't have a time machine to hand, then just do it that way next
> time. :)