>>>>> On Mon, 09 Nov 2015 01:30:23 -0500, Kyle Meyer <k...@kyleam.com> said:
  >> * ox-extra.el (org-latex-header-blocks-filter): Use `org-element' API to
  >> find begin and end of latex header blocks.
  Kyle> 
  Kyle> s|ox-extra.el|contrib/lisp/ox-extra.el|
  Kyle> s/begin/beginning/
  Kyle> 

Thanks. I'll change that.

  >> (mapc (lambda (pos)
  >> -        (goto-char (nth 2 pos))
  >> -        (destructuring-bind
  >> -            (beg end &rest ignore)
  >> -            (org-edit-src-find-region-and-lang)
  >> -          (let ((contents-lines (split-string
  >> -                                 (buffer-substring-no-properties beg end)
  >> -                                 "\n")))
  >> -            (delete-region (nth 0 pos) (nth 1 pos))
  >> -            (dolist (line contents-lines)
  >> -              (insert (concat "#+latex_header: "
  >> -                              (replace-regexp-in-string "\\` *" "" line)
  >> -                              "\n"))))))
  >> +              (let* ((beg (third pos))
  >> +                     (end (second pos))
  >> +                     (post-affiliated (first pos))
  Kyle> 
  Kyle> Hmm, the pos items are constructed as
  Kyle> 
  Kyle>     (list (org-element-property :begin block)
  Kyle>           (org-element-property :end block)
  Kyle>           (org-element-property :post-affiliated block)))))))
  Kyle> 
  Kyle> so shouldn't beg be the first element and post-affiliated the third?

I thought it would be better to change as little as
possible. Rearranging the list is obviously the cleaner solution. I'll
change that.

Thanks for the review.

-Sebastian





Reply via email to