From dec32064a72be7a20bbddcc1f8544a604619ad7b Mon Sep 17 00:00:00 2001 From: Eric Schulte Date: Fri, 4 May 2012 09:17:13 -0400 Subject: [PATCH] adding commented out code which should be activated once org-element has been merged Used to clean up orphaned keywords of blocks removed by org-export-blocks-preprocess. --- lisp/org-exp-blocks.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lisp/org-exp-blocks.el b/lisp/org-exp-blocks.el index 7062759aa..d6714363c 100644 --- a/lisp/org-exp-blocks.el +++ b/lisp/org-exp-blocks.el @@ -208,6 +208,12 @@ which defaults to the value of `org-export-blocks-witheld'." (let ((replacement (save-match-data (if (memq type org-export-blocks-witheld) "" (apply func body headers))))) + ;; ;; un-comment this code after the org-element merge + ;; (save-match-data + ;; (when (and replacement (string= replacement "")) + ;; (delete-region + ;; (car (org-element-collect-affiliated-keyword)) + ;; match-start))) (when replacement (delete-region match-start match-end) (goto-char match-start) (insert replacement)