1
0
Fork 0

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.
This commit is contained in:
Diego Zamboni 2021-03-20 21:00:55 +01:00
parent 32beb20aea
commit 2e9d4bc857
1 changed files with 3 additions and 2 deletions

View File

@ -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