emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric S Fraga <e.fraga@ucl.ac.uk>
To: emacs-orgmode@gnu.org
Subject: Re: [parser] feature request: column and row numbers available for table-cell elements
Date: Fri, 20 Jan 2017 08:09:28 +0000	[thread overview]
Message-ID: <87vatarw3r.fsf@ucl.ac.uk> (raw)
In-Reply-To: <a6c057b982054dc896ad78973aa0d220@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> (Nicolas Goaziou's message of "Thu, 19 Jan 2017 21:15:56 +0000")

[-- Attachment #1: Type: text/plain, Size: 1489 bytes --]

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)))(table-row)
|   cl-count(nil (table-row (:type rule :begin 76 :end 96 :contents-begin nil [...]
|   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

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.3-241-gc3d67b

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

      parent reply	other threads:[~2017-01-20 17:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-18 21:55 [parser] feature request: column and row numbers available for table-cell elements Eric S Fraga
2017-01-19 21:15 ` Nicolas Goaziou
     [not found] ` <a6c057b982054dc896ad78973aa0d220@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2017-01-19 22:18   ` Eric S Fraga
2017-01-20  8:09   ` Eric S Fraga [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vatarw3r.fsf@ucl.ac.uk \
    --to=e.fraga@ucl.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).