From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?iso-8859-1?Q?Vincent_Bela=EFche?= Newsgroups: gmane.emacs.devel Subject: RE: using ses programatically (was: a ses question) Date: Sun, 24 Dec 2023 11:51:30 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/related; boundary="_006_PAXP192MB160822CA99C7F81B665AF5C5849BAPAXP192MB1608EURP_"; type="multipart/alternative" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29803"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel , "boruch_baum@gmx.com" To: =?iso-8859-1?Q?andr=E9s_ram=EDrez?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Dec 24 15:40:22 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rHPeP-0007YD-Rb for ged-emacs-devel@m.gmane-mx.org; Sun, 24 Dec 2023 15:40:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rHPdh-0005ie-He; Sun, 24 Dec 2023 09:39:37 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rHN65-00065x-3X for emacs-devel@gnu.org; Sun, 24 Dec 2023 06:56:45 -0500 Original-Received: from mail-vi1eur02olkn2082c.outbound.protection.outlook.com ([2a01:111:f400:fe16::82c] helo=EUR02-VI1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rHN61-0001Z7-TN for emacs-devel@gnu.org; Sun, 24 Dec 2023 06:56:44 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Gi9I3KU34/0IQMQR065oqJEAAusJ28e9DM3IDx7vbyZud68ajMgGiALerjTu65G+1iXBliklrqOaPJeB7zFxfaHQHR2qnvu9tou+b52CU4b6Wslr4B8ZZJhEh7ZPzH5VJxoUbtbsXB55ZhauzCcvs9po1nMN7HGfViUCjIL6T3MoM2lm9fIW+L25IKAFUYwUlWLJCmBdMwl0kKNVJqkOd0S0N4at1WlctlPliw3D2GMSvExEn1bk83KmfkGU1W1A0sYmGbylrA+irIydGIbyCB1Z60UJpC/Hh+s8aWRAmFBDJIXLCtDAZwqAKLugZw9Gf3gH7PDnFahP6GB2NvhwqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=bZ5iBFV9yvI8e9ymzbJelIB93SOsI4BuD/pQ/c7spa4=; b=oQN6umBGfuHvj+cORikehKSAz+MaBiO6imeke2zln55Y26p8UMxvIjx5rr/AuGn3UczdT4roPeGBElkxXZm8irMq208nNlC/7wNb82+Id+2SNkCYhZ2uimNxIzNciAZfg5F09okPRHW+efrKn98Hd+yZLAGoRlApAiwxWBCcaksEcLoiQpMqeK/B5Qu+F7MbDRJ36NbTdQSrPSKz8j4WVu4n4cXfq79w18r+MKoDjaHsRMVcp3dyVCMVaRPxGppM/Li6x0BNbKsJ+cyVSggb1zF7I51iHXJlx+YM16FtUnP5nuc70ipdutqOYkPXrnfuTPrEe3njT83L+iPSnoAd+A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Original-Received: from PAXP192MB1608.EURP192.PROD.OUTLOOK.COM (2603:10a6:102:28c::22) by GV1P192MB1955.EURP192.PROD.OUTLOOK.COM (2603:10a6:150:a0::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.24; Sun, 24 Dec 2023 11:51:31 +0000 Original-Received: from PAXP192MB1608.EURP192.PROD.OUTLOOK.COM ([fe80::fee7:9deb:373a:4055]) by PAXP192MB1608.EURP192.PROD.OUTLOOK.COM ([fe80::fee7:9deb:373a:4055%7]) with mapi id 15.20.7113.023; Sun, 24 Dec 2023 11:51:31 +0000 Thread-Topic: using ses programatically (was: a ses question) Thread-Index: AQHaDyaIFxl+uTQAXkSovHGVyH2ZGrBrhKoNgABOFwCAAB8A5YAALdsAgBSj6giAAVoZAIAAPkBXgAADb8GAABTQgIA0PI/6 In-Reply-To: Accept-Language: fr-FR, en-US Content-Language: fr-FR X-MS-Has-Attach: yes x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [CD6Ws1iGOmSLQpRVCYL9F0sm+eHJe+Dy] x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PAXP192MB1608:EE_|GV1P192MB1955:EE_ x-ms-office365-filtering-correlation-id: 4a43952c-741b-49f4-e74b-08dc0476ab8d x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: SHCyn01YPR1OYesHmzpbCuKlXY5BHLi8fUtq0rvOJAH2/nDftVWcYuauZ4ghD3gVqDGwCeKkzYQoPVSa2XZuCvkrxfp17sI3koairp11OtBrXRPGNcuCFhp40xKlgmddEYf3L+oaMR54Yc5iqG6XpuPifFqPrwRv0LRO+iO3C1KD2RJjb8H7dSW7VZtZJCNvVV2EW6+fawVw+OWkzJ6ZUmG8laWiyaFEJJwXsW3HPi8lvFtBIx4I0Bq9KFA/UXMaDBy5LuKC28gqWwvZ4WsvCobYxEeb8ucJ4tqeHrON3gWn2MNhbBMPuEYANEMFRTNXOFAVtJro5RFBcVzI9/8+5MhBAqBHIMmyXfKAq3crCaFqOUxaHlvYCQg7YCdO16k3uQZG4P3VUOYkCpyf947oejz8KxrtLGrTCuFDgz7xjlm75vyrA8oFWGDRH2BDGWV/nkCYM92gi7wC1+/PPXw4C+3nBFQxdyzUIXbqGUYVW7gMXupIuwx70t7Cxnzx+s4T+SmGj4JR0dpXm5eXM0JW2mB6wjudqphFQ//av4tuWYLGTRHEH42JRUonjWxyfCREL5byzfivu6sUDCsTy0stcyspez9xTIguqycTXjGhsiUBVpf0HFdpCU/fMYuP94CVyGYlHPfZd5/naIznu2Tq+rw9o5yO30zEXp+lYgFYhHG2QYwvRZVRdnoEUDkvpZkuXQhST4/x6DbgLvkqg1dn0uRZGaI0r/R3gFFGXHPDLB8= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?f9kERCaBivahIMAtfyd+RYu9rnsk5OfquLrCnA1tX7UfEFXeM/2bPxJUw4?= =?iso-8859-1?Q?VptKXYnDi4gQ3BIfKs0qZYuwFWd8A0fV4fTeJ185RXcQiP2joTtpMKjcl5?= =?iso-8859-1?Q?jvGfmdzfM5sz6HUoX6RB8tpzB9IHlwJscn1eJIz/0sh6KLFBZQOf8IWoAy?= =?iso-8859-1?Q?Vib3b/Cbgp7iQJ2MKTj+tmYnmE0C8ZdJTVibnNl6MzsPnSceXrjI8oD4Qj?= =?iso-8859-1?Q?Inl4LodYHpHWtkMWCsTulpJ4D5bHRw765t1OL86V88ZAAzCkzirlIwXF3c?= =?iso-8859-1?Q?9H9i71D4OjAJgU7DfpqMKcEeVa3Q6EaA7qBdceiYDzAvDsu+veIZVLtXAW?= =?iso-8859-1?Q?rE+l6VM2LddTNz211WkZ6rdmv7CIuXy5mSAmRHsZWHA0kp+s0Xw2TVUkbX?= =?iso-8859-1?Q?zxSw/AdWMna2irZQIrCee/yzpVSscOZAvD0b4C34IiPIdH0GapQ8fhlzsT?= =?iso-8859-1?Q?Ezetpuh3HbgrMT0H2l4z9J6QoHrnljRwAZbBDvGeuBVPSosWsvn9glzOKV?= =?iso-8859-1?Q?oFJy8b2gTq4Luu8IIULQ/IyeclgVGaqm8MbpfDAtoz+kDnrPTGcs2yxlod?= =?iso-8859-1?Q?Na5904F8EST8GIersLiE/aBoNJMzUZWju4At+NUxPhdMw3bd7Afhj3Ows4?= =?iso-8859-1?Q? X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-fb43a.templateTenant X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PAXP192MB1608.EURP192.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 4a43952c-741b-49f4-e74b-08dc0476ab8d X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Dec 2023 11:51:31.0072 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1P192MB1955 Received-SPF: pass client-ip=2a01:111:f400:fe16::82c; envelope-from=vincent.b.1@hotmail.fr; helo=EUR02-VI1-obe.outbound.protection.outlook.com X-Spam_score_int: -5 X-Spam_score: -0.6 X-Spam_bar: / X-Spam_report: (-0.6 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, FREEMAIL_REPLY=1, HTML_MESSAGE=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_SBL_A=0.1 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sun, 24 Dec 2023 09:39:36 -0500 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:314128 Archived-At: --_006_PAXP192MB160822CA99C7F81B665AF5C5849BAPAXP192MB1608EURP_ Content-Type: multipart/alternative; boundary="_000_PAXP192MB160822CA99C7F81B665AF5C5849BAPAXP192MB1608EURP_" --_000_PAXP192MB160822CA99C7F81B665AF5C5849BAPAXP192MB1608EURP_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello Andr=E8s, That is a good point that ses+ needs better documentation : I attached an u= pdate of ses.texi, [cid:55adc5ac-b103-461e-8604-536c90cae07a] ses.texi.diff= [cid:240f77ca-5cdb-40fb-b= 4c2-ee89a0eba1d4]ses.texi= . Do you think it is OK ? Concerning the ses-setq and change of ses-range, I realized that this makes= a regression on ses-insert-range and ses-select, I have made a fix to ses-= insert-range here : [cid:c43f099d-1b5e-4b57-a9f0-7feb40546350] ses.el, I still need to fix ses-selec= t, since this is not a macro I use, it will take me some more time. Also, d= ocumenting this and writing tests is still needed before I merge my local d= ev branch to master. Vincent. ________________________________ De : andr=E9s ram=EDrez Envoy=E9 : lundi 20 novembre 2023 01:33 =C0 : Vincent Bela=EFche Cc : emacs-devel ; boruch_baum@gmx.com Objet : Re: using ses programatically (was: a ses question) Hi. Vincent. I am going to reply both of your emails from this one. >>>>> "Vincent" =3D=3D Vincent Bela=EFche writes: Vincent> Just to make my point more clear, Vincent> with Calc you need to write '(float 12 -1) for 1.2, and use ca= lcFunc-add instead of +, Vincent> ie (apply 'calcFunc-add (ses-range N3 N6)). Also the cell prin= ter should be Vincent> math-format-value. It sounds interesting to try. Vincent> Note that with IEEE754 numbers ses+ is not so useful if you ar= e using ses-range as you Vincent> can delete blank by adding a ! argument, ie (apply 'ses+ (ses-= range N3 N6)) is almost Vincent> the same as (apply '+ (ses-range N3 N6 !)), the sole differenc= e is that the former does Vincent> the summing in revert order. Well explained Vincent. Thanks for the explanation. I do not use ses daily. So I discover ses (three years ago). And at that time workbook.ses was created. From that time to now workbook.ses has been my only contact with ses (with the exception of yesterday). Just changing values, not formulae, formulaes has been almost the same from three years ago. But Now that You have mentioned it. Three years ago I though why using '+ when 'ses+ always take care of blanks. So that's the one to use when using ses. Just until now You have showed me there is a difference. So now the question could be "why using 'ses+ when '+ is enough even for eliminating the blank values?" It ended like this: --8<---------------cut here---------------start------------->8--- (ses-setq :: sf N7 (apply '+ (ses-range N3 N6 !))) --8<---------------cut here---------------end--------------->8--- Vincent> emacs-devel ; boruch_baum@gmx.com Objet : Vincent> RE: using ses programatically (was: a ses question) [...] Vincent> Have you tried to use in both case '+ or 'ses+, but not '+ in = one case and 'ses+ in the Vincent> other case. Well. Actually I started with the simple case just using '+ and after it I replaced with the real formulae(which contained 'ses+) as the other ones = within workbook.ses. I am happy I had try it that way. So I have learn the difference between 'ses+ and '+. It was a happy coincidence. BTW. s/"Compute the sum of the arguments, ignoring blanks."/"Compute the sum of = the arguments in reverse order, ignoring blanks." Could above be ok (for improving the documentation of 'ses+)? Best Regards Andr=E9s Ram=EDrez --_000_PAXP192MB160822CA99C7F81B665AF5C5849BAPAXP192MB1608EURP_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hello Andr=E8s,

That is a good point that ses+ needs better documentation : I attached an u= pdate of ses.texi, 3D""ses.texi.diff3D""ses.texi.
Do you think it is OK ?

Concerning the ses-setq and change of ses-range, I realized that this makes= a regression on ses-insert-range and ses-select, I have made a fix to ses-= insert-range here : = 3D""ses.el= , I still need to fix ses-select, since this is not a macro I use, it will t= ake me some more time. Also, documenting this and writing tests is still ne= eded before I merge my local dev branch to master.

   Vincent.



De : andr=E9s ram=EDre= z <rrandresf@hotmail.com>
Envoy=E9 : lundi 20 novembre 2023 01:33
=C0 : Vincent Bela=EFche <vincent.b.1@hotmail.fr>
Cc : emacs-devel <emacs-devel@gnu.org>; boruch_baum@gmx.c= om <boruch_baum@gmx.com>
Objet : Re: using ses programatically (was: a ses question)
 
Hi. Vincent.
I am going to reply both of your emails from this one.

>>>>> "Vincent" =3D=3D Vincent Bela=EFche <vinc= ent.b.1@hotmail.fr> writes:

    Vincent>  Just to make my point more clear,
    Vincent> with Calc you need to write '(float 12 -1) f= or 1.2, and use calcFunc-add instead of +,
    Vincent> ie (apply 'calcFunc-add (ses-range N3 N6)). = Also the cell printer should be
    Vincent> math-format-value.

It sounds interesting to try.

    Vincent> Note that with IEEE754 numbers ses+ is not s= o useful if you are using ses-range as you
    Vincent> can delete blank by adding a ! argument, ie = (apply 'ses+ (ses-range N3 N6)) is almost
    Vincent> the same as (apply '+ (ses-range N3 N6 !)), = the sole difference is that the former does
    Vincent> the summing in revert order.

Well explained Vincent. Thanks for the explanation. I do not use ses
daily. So I discover ses (three years ago). And at that time
workbook.ses was created. From that time to now workbook.ses has been my only contact with ses (with the exception of yesterday). Just changing
values, not formulae, formulaes has been almost the same from three
years ago. But Now that You have mentioned it. Three years ago I though
why using '+ when 'ses+ always take care of blanks. So that's the one to use when using ses. Just until now You have showed me there is a
difference. So now the question could be "why using 'ses+ when '+ is enough even for eliminating the blank values?"

It ended like this:
--8<---------------cut here---------------start------------->8---
      (ses-setq :: sf N7 (apply '+ (ses-range N3 N= 6 !)))
--8<---------------cut here---------------end--------------->8---


    Vincent> emacs-devel <emacs-devel@gnu.org>; bor= uch_baum@gmx.com <boruch_baum@gmx.com> Objet :
    Vincent> RE: using ses programatically (was: a ses qu= estion)


[...]

    Vincent> Have you tried to use in both case '+ or 'se= s+, but not '+ in one case and 'ses+ in the
    Vincent> other case.

Well. Actually I started with the simple case just using '+ and after it I replaced with the real formulae(which contained 'ses+) as the other ones = within
workbook.ses. I am happy I had try it that way. So I have learn the
difference between 'ses+ and '+. It was a happy coincidence.

BTW.
s/"Compute the sum of the arguments, ignoring blanks."/"Comp= ute the sum of the arguments in reverse order, ignoring blanks."
Could above be ok (for improving the documentation of 'ses+)?

Best Regards
Andr=E9s Ram=EDrez
--_000_PAXP192MB160822CA99C7F81B665AF5C5849BAPAXP192MB1608EURP_-- --_006_PAXP192MB160822CA99C7F81B665AF5C5849BAPAXP192MB1608EURP_ Content-Type: image/png; name="Outlook-nvucxzxh.png" Content-Description: Outlook-nvucxzxh.png Content-Disposition: inline; filename="Outlook-nvucxzxh.png"; size=159; creation-date="Sun, 24 Dec 2023 11:51:30 GMT"; modification-date="Sun, 24 Dec 2023 11:51:30 GMT" Content-ID: <55adc5ac-b103-461e-8604-536c90cae07a> Content-Transfer-Encoding: base64 iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAFZJREFU OE9jgAErK4v/uLH5Mqgy3ACk8NevXxgYJO7k5PCHoCH4DDhx4jhhQ/AZAKIJGkLIABDGawg+A7Bh qDYEAAliMwAbHjVg1AAQxmkAKRiii4EBAFxRPbDkdBPTAAAAAElFTkSuQmCC --_006_PAXP192MB160822CA99C7F81B665AF5C5849BAPAXP192MB1608EURP_ Content-Type: image/png; name="Outlook-fh4rwr0w.png" Content-Description: Outlook-fh4rwr0w.png Content-Disposition: inline; filename="Outlook-fh4rwr0w.png"; size=159; creation-date="Sun, 24 Dec 2023 11:51:30 GMT"; modification-date="Sun, 24 Dec 2023 11:51:30 GMT" Content-ID: <240f77ca-5cdb-40fb-b4c2-ee89a0eba1d4> Content-Transfer-Encoding: base64 iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAFZJREFU OE9jgAErK4v/uLH5Mqgy3ACk8NevXxgYJO7k5PCHoCH4DDhx4jhhQ/AZAKIJGkLIABDGawg+A7Bh qDYEAAliMwAbHjVg1AAQxmkAKRiii4EBAFxRPbDkdBPTAAAAAElFTkSuQmCC --_006_PAXP192MB160822CA99C7F81B665AF5C5849BAPAXP192MB1608EURP_ Content-Type: image/png; name="Outlook-jvdq1roe.png" Content-Description: Outlook-jvdq1roe.png Content-Disposition: inline; filename="Outlook-jvdq1roe.png"; size=159; creation-date="Sun, 24 Dec 2023 11:51:30 GMT"; modification-date="Sun, 24 Dec 2023 11:51:30 GMT" Content-ID: Content-Transfer-Encoding: base64 iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAFZJREFU OE9jgAErK4v/uLH5Mqgy3ACk8NevXxgYJO7k5PCHoCH4DDhx4jhhQ/AZAKIJGkLIABDGawg+A7Bh qDYEAAliMwAbHjVg1AAQxmkAKRiii4EBAFxRPbDkdBPTAAAAAElFTkSuQmCC --_006_PAXP192MB160822CA99C7F81B665AF5C5849BAPAXP192MB1608EURP_--