Return stringified multi-valued list
This commit is contained in:
parent
82f7522809
commit
7fba972dec
@ -14,14 +14,15 @@
|
||||
#+name: export_block
|
||||
#+begin_src emacs-lisp :exports none
|
||||
|
||||
(setq export-file "SpaceCompanies.csv")
|
||||
(setq export-file "SpaceCompanies.csv")
|
||||
|
||||
(defun get-multi-valued (pom prop)
|
||||
(defun get-multi-valued (pom prop)
|
||||
(let ((end (save-excursion (search-forward ":END:")))
|
||||
(elt-b nil)
|
||||
(elt-e nil)
|
||||
(elt nil)
|
||||
(values '()))
|
||||
(values '())
|
||||
(values-str ""))
|
||||
(save-excursion
|
||||
(setq elt-b (search-forward-regexp (format ":%s\\+?:" prop) end t))
|
||||
(while elt-b
|
||||
@ -31,10 +32,12 @@
|
||||
(setq values (cons elt values))
|
||||
(setq elt-b (search-forward-regexp (format ":%s\\+?:" prop) end t)))
|
||||
)
|
||||
values
|
||||
))
|
||||
(dolist (elt values values-str)
|
||||
(let ((sep (if (> (length values-str) 0) ", " "") ))
|
||||
(setq values-str (format "%s%s%s" values-str sep elt))
|
||||
))))
|
||||
|
||||
(defun extract-company-data ()
|
||||
(defun extract-company-data ()
|
||||
(let* ((cur-point (point))
|
||||
(entry (org-element-at-point))
|
||||
(level (org-element-property :level entry))
|
||||
@ -62,8 +65,8 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; Main
|
||||
(save-excursion
|
||||
;; Main
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(search-forward-regexp "^\* Companies" nil t)
|
||||
(beginning-of-line)
|
||||
@ -78,6 +81,9 @@
|
||||
)
|
||||
#+end_src
|
||||
|
||||
#+RESULTS: export_block
|
||||
: t
|
||||
|
||||
* Terms
|
||||
- SBIR
|
||||
- STTR
|
||||
|
Loading…
x
Reference in New Issue
Block a user