Re: [O] Add contents-begin and contents-end to src-block in org-element.el

2017-12-27 Thread Somelauw .
2017-12-25 23:42 GMT+01:00 Nicolas Goaziou : > I suggest the following. > > For contents begin: > > (save-excursion > (goto-char (org-element-property :post-affiliated element)) > (line-beginning-position 2)) > > For contents end: > > (save-excursion > (goto-char (org-elem

Re: [O] Add contents-begin and contents-end to src-block in org-element.el

2017-12-25 Thread Nicolas Goaziou
"Somelauw ." writes: I suggest the following. For contents begin: (save-excursion (goto-char (org-element-property :post-affiliated element)) (line-beginning-position 2)) For contents end: (save-excursion (goto-char (org-element-property :end element)) (skip-c

Re: [O] Add contents-begin and contents-end to src-block in org-element.el

2017-12-25 Thread Somelauw .
2017-12-25 9:49 GMT+01:00 Nicolas Goaziou > "Somelauw ." writes: > >> By the way, do you know of any other org-elements that have an inner >> body that doesn't classify as "data in Org syntax"? > > comment, comment blocks, example blocks, export blocks, fixed-width, > keyword, latex-environment,

Re: [O] Add contents-begin and contents-end to src-block in org-element.el

2017-12-25 Thread Nicolas Goaziou
Hello, "Somelauw ." writes: > 2017-12-24 16:05 GMT+01:00 Nicolas Goaziou : >> Contents mean "data in Org syntax". There are no such contents in source >> blocks. Therefore, the parser does not provide :contents-begin >> and :contents-end for them. > > Thanks for your quick response As I understa

Re: [O] Add contents-begin and contents-end to src-block in org-element.el

2017-12-24 Thread Somelauw .
2017-12-24 16:05 GMT+01:00 Nicolas Goaziou : > Contents mean "data in Org syntax". There are no such contents in source > blocks. Therefore, the parser does not provide :contents-begin > and :contents-end for them. Thanks for your quick response As I understand from your reply, :contents-begin/end

Re: [O] Add contents-begin and contents-end to src-block in org-element.el

2017-12-24 Thread Nicolas Goaziou
Hello, "Somelauw ." writes: > Here is a simple patch that makes it possible to find the inner > contents of a src-code block. Contents mean "data in Org syntax". There are no such contents in source blocks. Therefore, the parser does not provide :contents-begin and :contents-end for them. HTH,

[O] Add contents-begin and contents-end to src-block in org-element.el

2017-12-24 Thread Somelauw .
Here is a simple patch that makes it possible to find the inner contents of a src-code block. In the function called "defun org-element-src-block-parser (limit affiliated)": - First find contents-begin and contents-end using the following: #+BEGIN_SRC emacs-lisp (contents-begin (save-e