forked from mirrors/org-cv
Removed dependency to cl-lib
Replaced `first` and `second` (which have been renamed in Emacs 27 anyway) with `car` and `cadr` to avoid the dependency on cl-lib.
This commit is contained in:
parent
59cf8ffd52
commit
58fd53f743
1 changed files with 4 additions and 5 deletions
|
@ -28,7 +28,6 @@
|
||||||
;; LaTeX one.
|
;; LaTeX one.
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
(require 'cl-lib)
|
|
||||||
(require 'ox-latex)
|
(require 'ox-latex)
|
||||||
(require 'org-cv-utils)
|
(require 'org-cv-utils)
|
||||||
|
|
||||||
|
@ -135,8 +134,8 @@ holding export options."
|
||||||
(let* ((author (split-string (org-export-data (plist-get info :author) info)))
|
(let* ((author (split-string (org-export-data (plist-get info :author) info)))
|
||||||
(first-name-prop (org-export-data (plist-get info :firstname) info))
|
(first-name-prop (org-export-data (plist-get info :firstname) info))
|
||||||
(last-name-prop (org-export-data (plist-get info :lastname) info))
|
(last-name-prop (org-export-data (plist-get info :lastname) info))
|
||||||
(first-name (or (org-string-nw-p first-name-prop) (first author)))
|
(first-name (or (org-string-nw-p first-name-prop) (car author)))
|
||||||
(last-name (or (org-string-nw-p last-name-prop) (second author))))
|
(last-name (or (org-string-nw-p last-name-prop) (cadr author))))
|
||||||
(format "\\name{%s}{%s}\n" first-name last-name))
|
(format "\\name{%s}{%s}\n" first-name last-name))
|
||||||
|
|
||||||
;; Title
|
;; Title
|
||||||
|
@ -180,8 +179,8 @@ holding export options."
|
||||||
|
|
||||||
;; Stack overflow requires two values: ID and name
|
;; Stack overflow requires two values: ID and name
|
||||||
(let* ((so-list (plist-get info :stackoverflow))
|
(let* ((so-list (plist-get info :stackoverflow))
|
||||||
(so-id (when so-list (first so-list)))
|
(so-id (when so-list (car so-list)))
|
||||||
(so-name (when so-list (second so-list))))
|
(so-name (when so-list (cadr so-list))))
|
||||||
(when (and (org-string-nw-p so-id) (org-string-nw-p so-name))
|
(when (and (org-string-nw-p so-id) (org-string-nw-p so-name))
|
||||||
(format "\\stackoverflow{%s}{%s}\n" so-id so-name)))
|
(format "\\stackoverflow{%s}{%s}\n" so-id so-name)))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue