Re: [O] Expose value-begin and value-end instead of just value in org-element API

2018-02-26 Thread Nicolas Goaziou
Hello, John Kitchin writes: > Wow. I would not have guessed either one of these! Thanks for sharing > them. Is that documented somewhere? [...] > For elements with a :contents-begin where does :post-affiliated come in? See > Once you get t

Re: [O] Expose value-begin and value-end instead of just value in org-element API

2018-02-25 Thread John Kitchin
Nicolas Goaziou writes: > Hello, > > John Kitchin writes: > >> +1 on this. >> >> I also have some janky code to do things like go to the beginning/end of >> the value in a src block. Here is my solution to mark the code in a src >> block. >> >> (defun ob-ipython-mark-code () >> "Mark the code

Re: [O] Expose value-begin and value-end instead of just value in org-element API

2018-02-21 Thread Somelauw .
Thank you for your response. 2018-02-21 12:17 GMT+01:00 Nicolas Goaziou : > You get the beginning of the code of a source block with > > (org-with-point-at (org-element-property :post-affiliated element) > (line-beginning-position 2)) > > and its end with > > (org-with-point-at (org-elemen

Re: [O] Expose value-begin and value-end instead of just value in org-element API

2018-02-21 Thread Nicolas Goaziou
Hello, John Kitchin writes: > +1 on this. > > I also have some janky code to do things like go to the beginning/end of > the value in a src block. Here is my solution to mark the code in a src > block. > > (defun ob-ipython-mark-code () > "Mark the code in the block." > (interactive) > (or

Re: [O] Expose value-begin and value-end instead of just value in org-element API

2018-02-20 Thread John Kitchin
+1 on this. I also have some janky code to do things like go to the beginning/end of the value in a src block. Here is my solution to mark the code in a src block. (defun ob-ipython-mark-code () "Mark the code in the block." (interactive) (org-edit-special) (let ((p0 (point-min)) (p1 (poi

[O] Expose value-begin and value-end instead of just value in org-element API

2018-02-19 Thread Somelauw .
Some org-mode elements expose "contents-begin" and "contents-end" properties as buffer positions, whereas other elements such as verbatim and org-src-block expose a "value" property in the form of a string. I think it would be preferable to also expose the value by beginning and ending buffer posi