From de6feffebe5a2981f1a681cc2691f161d110fa8e Mon Sep 17 00:00:00 2001 From: Diego Zamboni Date: Sat, 4 Jan 2020 21:11:34 +0100 Subject: [PATCH] Ignore property drawers Enabling export of property drawers might be useful to export HTML or ASCII versions of the CV, but they are not used in the AwesomeCV LaTeX export (and in fact break the compilation), so we just ignore them. Also removed some spurious newlines in some of the environments. --- ox-awesomecv.el | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/ox-awesomecv.el b/ox-awesomecv.el index 56ec38c..9323b26 100644 --- a/ox-awesomecv.el +++ b/ox-awesomecv.el @@ -84,7 +84,8 @@ :translate-alist '((template . org-awesomecv-template) (headline . org-awesomecv-headline) (plain-list . org-awesomecv-plain-list) - (item . org-awesomecv-item))) + (item . org-awesomecv-item) + (property-drawer . org-awesomecv-property-drawer))) ;;;; Template ;; @@ -238,7 +239,7 @@ as a communication channel." contents) ) ((string= entrytype "cventry") - (format "\n\\cventry\n{%s}\n{%s}\n{%s}\n{%s}\n{\n%s%s}\n" + (format "\n\\cventry\n{%s}\n{%s}\n{%s}\n{%s}\n{%s%s}\n" employer location title @@ -246,13 +247,13 @@ as a communication channel." (org-awesomecv--cventry-right-img-code right-img) contents)) ((string= entrytype "cvsubentry") - (format "\n\\cvsubentry\n{%s}\n{%s}\n{\n%s%s}\n" + (format "\n\\cvsubentry\n{%s}\n{%s}\n{%s%s}\n" title (format "%s%s" label-str (org-cv-utils--format-time-window from-date to-date)) (org-awesomecv--cventry-right-img-code right-img) contents)) ((string= entrytype "cvschool") - (format "\n\\cventry\n{%s}\n{%s}\n{%s}\n{%s}\n{\n%s%s}\n" + (format "\n\\cventry\n{%s}\n{%s}\n{%s}\n{%s}\n{%s%s}\n" title location employer @@ -323,5 +324,13 @@ contextual information." ) ) +;;;; Property Drawer, to avoid exporting them even when the option is set + +(defun org-latex-property-drawer (property-drawer contents info) + "Transcode a PROPERTY-DRAWER element from Org to AwesomeCV. +This does not make sense in the AwesomeCV format, so it only +returns an empty string." + nil) + (provide 'ox-awesomecv) ;;; ox-awesomecv ends here