From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: [parser] feature request: column and row numbers available for table-cell elements Date: Fri, 20 Jan 2017 08:09:28 +0000 Message-ID: <87vatarw3r.fsf@ucl.ac.uk> References: <87d1fk6nk0.fsf@delle7240.chemeng.ucl.ac.uk> Reply-To: Eric S Fraga Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60603) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cUdCo-000148-QP for emacs-orgmode@gnu.org; Fri, 20 Jan 2017 12:42:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cUdCl-0001Ts-KG for emacs-orgmode@gnu.org; Fri, 20 Jan 2017 12:42:30 -0500 Received: from mail-db5eur01on0101.outbound.protection.outlook.com ([104.47.2.101]:6404 helo=EUR01-DB5-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cUdCl-0001Rv-8G for emacs-orgmode@gnu.org; Fri, 20 Jan 2017 12:42:27 -0500 In-Reply-To: (Nicolas Goaziou's message of "Thu, 19 Jan 2017 21:15:56 +0000") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi Nicolas, On Thursday, 19 Jan 2017 at 21:15, Nicolas Goaziou wrote: > I don' think this is needed since this information is readily available > during the export process. For example > > (1+ (length (org-export-get-previous-element table-cell info 'all))) Well, this returns the column number in the elided table, not the original table. In other words, after columns have been removed before processing for export. I need the row and column numbers in the original table in the org file, not what is actually exported! > returns the column number table-cell belongs to, whereas > > (1+ (cl-count-if > (lambda (row) (eq (org-element-property :type row) 'standard)) > (org-export-get-previous-element (org-export-get-parent table-cell= ) 'all))) And this one gives me an error which I do not understand: ,---- | Debugger entered--Lisp error: (wrong-type-argument listp table-row) | org-element-property(:type table-row) | (eq (org-element-property :type row) (quote standard)) | (lambda (row) (eq (org-element-property :type row) (quote standard)))(t= able-row) | cl-count(nil (table-row (:type rule :begin 76 :end 96 :contents-begin n= il [...] | apply(cl-count nil (table-row (:type rule :begin 76 :end 96 [...] | cl-count-if((lambda (row) (eq (org-element-property :type row) [...] `---- Any suggestions very welcome! Thanks, eric =2D-=20 : Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.3-241-gc3d67b --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQSPXCedOQfhSlwpVw3IkZPY//z2fQUCWIHFuAAKCRDIkZPY//z2 fVc5AKCRm12eR3luYHTBgzf9hvXYLouB4gCggsKo/JerGhEkF2mmcP4rUz0JMGE= =0fg2 -----END PGP SIGNATURE----- --=-=-=--