From 2e9d4bc8574f57df1fd2ab0cd9e744ae637fdafb Mon Sep 17 00:00:00 2001 From: Diego Zamboni Date: Sat, 20 Mar 2021 21:00:55 +0100 Subject: [PATCH] Improved employer/location handling in letters - Default employee to empty string (was otherwise showing up a "nil"). - In \recipient, insert the linebreak only if both employer and location are not empty. --- ox-awesomecv.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ox-awesomecv.el b/ox-awesomecv.el index 74f8627..a88fa63 100644 --- a/ox-awesomecv.el +++ b/ox-awesomecv.el @@ -240,7 +240,7 @@ as a communication channel." (org-element-property :SCHOOL headline) (org-element-property :EMPLOYER headline) (org-element-property :EVENT headline) - (org-element-property :POSITION headline))) + (org-element-property :POSITION headline) "")) (location (or (org-element-property :LOCATION headline) "")) (right-img (org-element-property :RIGHT_IMG headline)) (label (or (org-element-property :LABEL headline) nil)) @@ -295,9 +295,10 @@ as a communication channel." (org-cv-utils--format-time-window from-date to-date))) ;; Coverletter sections ((string= entrytype "letterheader") - (format "\\recipient\n {%s}\n {%s\\\\%s}\n\n%s\n%s\n%s\n%s\n" + (format "\\recipient\n {%s}\n {%s%s%s}\n\n%s\n%s\n%s\n%s\n" recipient employer + (if (and employer location) "\\\\" "") location letter-date letter-opening