all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Add contents-begin and contents-end to src-block in org-element.el
@ 2017-12-24 14:56 Somelauw .
  2017-12-24 15:05 ` Nicolas Goaziou
  0 siblings, 1 reply; 7+ messages in thread
From: Somelauw . @ 2017-12-24 14:56 UTC (permalink / raw)
  To: emacs-orgmode

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-excursion
                             (goto-char begin)
                             (forward-line 1)
                             (line-beginning-position)))
           (contents-end (save-excursion
                           (goto-char end)
                           (forward-line
                            (- -1 (count-lines pos-before-blank end)))
                           (line-beginning-position)))
#+END_SRC

- Then make sure both are included in the list below that:
#+BEGIN_SRC emacs-lisp
             :begin begin
             :end end
             :contents-begin contents-begin
             :contents-end contents-end
#+END_SRC

With kind regards,
Somelauw

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-12-27 20:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-24 14:56 Add contents-begin and contents-end to src-block in org-element.el Somelauw .
2017-12-24 15:05 ` Nicolas Goaziou
2017-12-24 23:55   ` Somelauw .
2017-12-25  8:49     ` Nicolas Goaziou
2017-12-25 13:09       ` Somelauw .
2017-12-25 22:42         ` Nicolas Goaziou
2017-12-27 20:50           ` Somelauw .

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.