[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: using ses programatically (was: a ses question)
|
From: |
andrés ramírez |
|
Subject: |
Re: using ses programatically (was: a ses question) |
|
Date: |
Sun, 05 Nov 2023 14:58:26 +0000 |
Hi. Vincent.
My comments below.
>>>>> "Vincent" == Vincent Belaïche <vincent.b.1@hotmail.fr> writes:
Vincent> Dear Andrès,
Vincent> I drafted a macro ses-setq to allow access a SES spreadsheet
programatically, and I
Vincent> updated your code to use it. This allowed to remove all the
workarounds. Please note
Vincent> that ses-setq is just a draft, far from complete. I intend to add
some switches to
Vincent> allow access the cells eaither by cell name or by row col, and to
modify either value
Vincent> or formula.
That's great. Just to mention again I have a newt-C-language app that
calls emacs this way:
--8<---------------cut here---------------start------------->8---
system ("cp workbook.ses /tmp; cp smeter.el /tmp; emacs -Q --batch -l
/tmp/smeter.el /tmp/smeteroutput -f smeter/further-processing > /dev/null
2>&1");
--8<---------------cut here---------------end--------------->8---
And when the calling ends. It reads ses-output from /tmp/smeter.mail.
The C-language app does not known anything about emacs. So the logic of
calculation is within workbook.ses. That way when calculation logic
changes. The newt-C-language-App does not need to be changed. Just the
formulae within workbook.ses would be changed, which BTW is simpler than
re-compiling the
newt-C-language-App.
[...]
The published version works as expected. Thanks for It.
But. I have a question. If emacs does NOT have the ses-setq
buffer (29.1 as an example). Which function calls should I do for having
backward compatibility with older emacsen?.
I see ses-setq calls ses-write-cells. I added a call to ses-write-cells
after every call to ses-set-cell. But It did NOT work as expected.
Do You think It is possible to have that behaviour without using
ses-setq on older emacsen?
Vincent> PS: I need to improve the macro, notable setting a cell value
should also affect its
Vincent> formula if any.
Ok.
BTW: JIC ses-setq is using 'cl-pushnew' this week there has been a long
discussion on emacs-devel about 'use or not to use those cl- prefixes
macros' an alternatives that are preloaded on emacs by default.
Best Regards
Andrés Ramírez
- RE: a ses question, (continued)
- RE: a ses question, Vincent Belaïche, 2023/11/01
- RE: a ses question, Vincent Belaïche, 2023/11/01
- RE: a ses question, Vincent Belaïche, 2023/11/02
- RE: a ses question, Vincent Belaïche, 2023/11/02
- RE: a ses question, Vincent Belaïche, 2023/11/02
- Re: a ses question, Stefan Monnier, 2023/11/02
- RE: a ses question, Vincent Belaïche, 2023/11/03
- RE: a ses question, Vincent Belaïche, 2023/11/04
- Re: a ses question, andrés ramírez, 2023/11/04
- Message not available
- RE: using ses programatically (was: a ses question), Vincent Belaïche, 2023/11/05
- Re: using ses programatically (was: a ses question),
andrés ramírez <=
- RE: using ses programatically (was: a ses question), Vincent Belaïche, 2023/11/05
- Re: using ses programatically (was: a ses question), andrés ramírez, 2023/11/05
- RE: using ses programatically (was: a ses question), Vincent Belaïche, 2023/11/19
- Re: using ses programatically (was: a ses question), andrés ramírez, 2023/11/19
- RE: using ses programatically (was: a ses question), Vincent Belaïche, 2023/11/19
- RE: using ses programatically (was: a ses question), Vincent Belaïche, 2023/11/19
- Re: using ses programatically (was: a ses question), andrés ramírez, 2023/11/19