From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?andr=C3=A9s_ram=C3=ADrez?= Newsgroups: gmane.emacs.devel Subject: Re: a ses question Date: Mon, 30 Oct 2023 19:03:19 +0000 Organization: bien.comun.org Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21148"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel , boruch_baum@gmx.com To: Vincent =?utf-8?Q?Bela=C3=AFche?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Oct 30 20:25:59 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 1qxXte-0005Ez-TD for ged-emacs-devel@m.gmane-mx.org; Mon, 30 Oct 2023 20:25:59 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qxXsg-0007BA-CB; Mon, 30 Oct 2023 15:24:58 -0400 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 1qxXcn-0005SY-Jm for emacs-devel@gnu.org; Mon, 30 Oct 2023 15:08:33 -0400 Original-Received: from mail-bn8nam11olkn20800.outbound.protection.outlook.com ([2a01:111:f400:7eae::800] helo=NAM11-BN8-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 1qxXck-0008Jr-6A for emacs-devel@gnu.org; Mon, 30 Oct 2023 15:08:33 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XddJ/DLApEnjgvmQHLN9M9ZOdr/Pun8qyd/vAuUyYZ0C66NiFRBk0tRZe+wd4vkcbnz95N47z9vJWOq6bRopTn74vk9VXEsgtwPU0VsjKxIn9VIoFUiB6+FZQmViMAMynIE7DO8xgGrLZniH3Vi/ouuEXbW73o3zDOCLGGHOum2gsU4HWbQB0fYYlruiOMkeav/lV0P+0uTTCNYltxj11lxot9chEWRpPPGMhh66uwYX4Hp9ZeGKTrkUHgr7F0AWBWN1FddnqUlMRZPpGI8XJxa3PnycE8p13PrK5qdnlWJ+pdFw5YDfMexw7MaEqvd7YvsZr1/3OSBwAB+HsK/cbg== 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=tQwMjhDZcl2og+6z1CMFWpVlV5n03XvD/lx9iU5Ljro=; b=JPfblmCSv/bAu3YyuenbjTM1NjdUTuUP4lslcHKKz6/Udyc+A2S9OG+gvXnbI98SxP7yR1VMNTHoi9bsJLKtYJLULk+YuAr/LhTEASyWbZRM0ksgSH41/ukz0nD1rVx//vnmWegWcPB9dwiz/U57aY08xG/u6Z8iGF/CCYilCoaHElHO/Xl11vE/B9R4L7qWP9B8BEwo/uJwu/HVmJxPN7Zgo2h2usN73hY7KgLkvXTBzE7F3T6qYb8yO3IHHKFiSY2hKtZWX2BOExLVscbdbSt71Bi/+GPHg2eYx/CPEFhhNuTMk6oNOpAAfnKqGeIqZO1QOqfQ4euF1PsK1DKSZw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tQwMjhDZcl2og+6z1CMFWpVlV5n03XvD/lx9iU5Ljro=; b=oouxL6LJbGqE27OEhpM9MTkgt3HRzov7bxkWO48ZnCQ8MxFN/fxmsvLRdb7AyRikUo4RuRGmob2f4lFj5CH4ziu3fOkdezbYavh/fcrVA2Bmxln1ehlHt2+ebHJQUmOailbbx3zWq25tV9UjgkN3GiTTNCzzF1Ypsr91XcWu/oWB13wH5g/M17So2o8N9BeiRpMjWyx+vk6SaRJEzuErf64hLmvnY/pirZdKpPIlhvbxU+wvDoUL/tdRom6S1k6B+FICHCXloeZOosvmjYkr9+2OOLuVEC6vQlnGk5ivDDGDZDpM4UX7Cx6dmDORS7TGVAUHNtq5rf5onkZd2wJmIg== Original-Received: from SJ1PR12MB6363.namprd12.prod.outlook.com (2603:10b6:a03:453::9) by LV3PR12MB9401.namprd12.prod.outlook.com (2603:10b6:408:21c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.29; Mon, 30 Oct 2023 19:03:24 +0000 Original-Received: from SJ1PR12MB6363.namprd12.prod.outlook.com ([fe80::b621:3063:2c6f:56e7]) by SJ1PR12MB6363.namprd12.prod.outlook.com ([fe80::b621:3063:2c6f:56e7%6]) with mapi id 15.20.6933.029; Mon, 30 Oct 2023 19:03:24 +0000 In-Reply-To: X-Attribution: INKA X-TMN: [45XshkFWb9T64vHtfhbRdfpo2v8bDzUG] X-ClientProxiedBy: SCZP215CA0003.LAMP215.PROD.OUTLOOK.COM (2603:10d6:300:50::7) To SJ1PR12MB6363.namprd12.prod.outlook.com (2603:10b6:a03:453::9) X-Microsoft-Original-Message-ID: <86lebkkk5k.fsf@hotmail.com> X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PR12MB6363:EE_|LV3PR12MB9401:EE_ X-MS-Office365-Filtering-Correlation-Id: 878472cf-91b4-49cc-ba54-08dbd97ae436 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3N6CVK4cT+5YtUh7cx+uuGJMzFvG4htuRQ8+2PvLcb9vjiBqUW1S2leLmcs3X/tcVSsOGUcWeLWfy9wgYyQaRZnGs5Z2x1B8aULhRava6mycXoig8tzpaivhKWvxmgQ1rLNaX6uuKdDVtuVOk1yobBIasK4dyZLPOoHHslCq38ieygxTcwGUgHeDbQCIZ8XNMgrPoAmYLqUHw628nGXekJ+6HCAuGwo1Uf+tyI/SCpN7zN2y9v7egKyI5dJZl1eN/yel+UB9iCEOApqTh5XoUNhLg9YJeLN84h3IQd1rTJE4eiJCo4F5QejOcR92+fDHZsJNZSYk78zNMz3uZDQRVER1ferm97Nep52gyYvTGjxEroE15CHGTxaviF52T/T5132bEz+BVe4EyMWQ3tF2NL6+PntUDzO4aZQfDfiE0HJLyOUpgTNLhXriqs9r3c4+vCV7PT+0LcKxJ9lDiGSZZGnU9vw81tJLelIqBsZct4+PQuv1tngDlNSQkhShmKS2Dr1JUCGpEOnhwC7flf6+LnsuXe3cAXr8ivrwSHcDdP5E/YGmYd1k3XMnBqoLjwQ3 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?bnpvUldSam9mYjJneWN4ckdHQ2k1aDdaUjFic2FoSjRFZEZBaGNQQS95VlZ5?= =?utf-8?B?bFh1VFhUQ2VWSU1YRmlBL3RRZURiYXp0bXJzY2JKbVJIVTlJSFh3QzJIaGFF?= =?utf-8?B?Z3lhUmVQMDl3ZXBFdWJyVXphSUJXdEgvc2w0Q0VGNWtjcGEwUy9FV1pMQkdD?= =?utf-8?B?TnBkY2tMdi9aNHU5bGZHWWxwS292SW9DRy90QVdtZTV2eHVQTStwSHp2Q0Nv?= =?utf-8?B?UU1HSVVsTGZIWWxsTnluV3I5bTB6UzUyVlNLM2JtQ1kwOFFzUGJEZWk2bVQv?= =?utf-8?B?MENzOXFDenlFNTNwMjB4SDg0OWtrVndzdW1hdHRobGVsZnBZbnFxQXRjSkpV?= =?utf-8?B?UlhnVkpCYkZkd1o1Qm1wMS9OVnpSZkgvRmhKd2pNTHdja3YxVU9sVjdWbEps?= =?utf-8?B?U0VSVGJ2UnEyTFlzTHd4YXluOElST2hHMk9ydld4Ykh3R3lnSEU0d2Irc0dO?= =?utf-8?B?WWYweEdlTU1tVmd6VlFXZGdCck1KOHJrN1RSdXBjQmNuakhHQzN2Y25OVVRG?= =?utf-8?B?K1NiT0Nkb3pqRXFlOHRZVHd3Yll6YUMxUVpVZ2M5SmRvSUZLSDlrTDhKdEJX?= =?utf-8?B?eXFwMGVKQ3U0ejZDKzI2U0xXV1dCMGJmMit6cVQ0M0FCM0ZmcWJFOTBsNExN?= =?utf-8?B?M2RyZzE0U3NVTW16cmNQZ0RxVk9lZlZNZjZqVz X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-71ea3.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 878472cf-91b4-49cc-ba54-08dbd97ae436 X-MS-Exchange-CrossTenant-AuthSource: SJ1PR12MB6363.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Oct 2023 19:03:24.4985 (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: LV3PR12MB9401 Received-SPF: pass client-ip=2a01:111:f400:7eae::800; envelope-from=rrandresf@hotmail.com; helo=NAM11-BN8-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 30 Oct 2023 15:24:54 -0400 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:312002 Archived-At: Hi. Vincent. I just yanked the elisp snippet You shared (without any modification) I just did M-x eval-defun, and It gave me this error: --8<---------------cut here---------------start------------->8--- Debugger entered--Lisp error: (error "Eager macro-expansion failure: (void-= variable ses-...") signal(error ("Eager macro-expansion failure: (void-variable ses-...")) error("Eager macro-expansion failure: %S" (void-variable ses--cells)) internal-macroexpand-for-load((setq elisp--eval-defun-result (let ((print= -level nil) (print-length nil)) (defalias 'smeter/further-processing #'(lam= bda nil "process input on as spreadsheet using ses formulae..." (interactiv= e) (let (... ... ... ... ... ... myyyyymm mysesoutput chunk bigchunk) (goto= -char ...) (setq beg ...) (setq workbook-filename ...) (forward-line 1) (se= tq beg ...) (forward-line 4) (setq prevmeasu ...) (setq beg ...) (setq wate= rbill ...) (forward-line 1) (setq beg ...) (forward-line 4) (setq measu ...= ) (setq beg ...) (setq myyyyymm ...) (if ... ... ... ... ... ... ... ... ..= . ... ... ... ... ... ... ... ... ...)))))) t) eval-region(162 5110 t #f(compiled-function (ignore) #)) ; Reading at buffer position 2635 elisp--eval-defun() eval-defun(nil) funcall-interactively(eval-defun nil) call-interactively(eval-defun record nil) command-execute(eval-defun record) execute-extended-command(nil "eval-defun" "eval-defun") funcall-interactively(execute-extended-command nil "eval-defun" "eval-def= un") call-interactively(execute-extended-command nil nil) command-execute(execute-extended-command) --8<---------------cut here---------------end--------------->8--- Best Regards Andr=C3=A9s Ram=C3=ADrez >>>>> "Vincent" =3D=3D Vincent Bela=C3=AFche write= s: Vincent> Just reading again the code which I sent in my Vincent> previous email, I found a problem, there would be one trailing= column separator =C2=AB & =C2=BB Vincent> too many. Probably the following would be better: Vincent> (let ((range (with-current-buffer the-ses-buffer (ses-range A1= C3 ; adapt to your case Vincent> =E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80= =82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82= =E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2= =80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80= =82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82= =E2=80=82=E2=80=82 *2 '>v ; use 'v> to read columnwsise Vincent> =E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80= =82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82= =E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2= =80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80= =82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82= =E2=80=82=E2=80=82 )))) (dolist (row (cdr range)) ; cdr to Vincent> remove 'vec (pop row) ; remove 'vec (while (progn =E2=80=82=E2= =80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82 (insert (format "%f" (pop Vincent> row))) ; assuming all cells are floating point numbers =E2=80= =82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82 (when row =E2=80=82=E2=80= =82=E2=80=82=E2=80=82=E2=80=82=E2=80=82 (insert Vincent> =E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82 "&" ; i= f & is the column separator =E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82= =E2=80=82 ) t ; loop again =E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2= =80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82=E2=80=82 ))) Vincent> (insert "\\\\\n"; if \\ is the row separator =E2=80=82=E2=80= =82=E2=80=82=E2=80=82=E2=80=82=E2=80=82 )))