Mercurial > core / lisp/lib/organ/util.lisp
changeset 698: |
96958d3eb5b0 |
parent: |
78ef6145e272
|
author: |
Richard Westhaver <ellis@rwest.io> |
date: |
Fri, 04 Oct 2024 22:04:59 -0400 |
permissions: |
-rw-r--r-- |
description: |
fixes |
1 ;;; lib/organ/util.lisp --- Organ Utils 8 (defun peek-line (stream) 11 (loop for c = (peek-char nil stream nil nil) 12 until (or (not c) (char= c #\newline)) 15 (defun read-until-end (stream) 16 (with-output-to-string (s) 17 (loop for c = (read-char stream nil) 19 do (write-char c s)))) 21 (defun read-org-lines (&optional stream) 23 (loop for l = (read-line stream nil) 27 (defun read-org-lines-from-string (str) 28 (with-input-from-string (s str) (read-org-lines s))) 30 ;; (sym-to-org-class-name 'headline) 32 (defun sym-to-org-class-name (sym) 33 "Convert keyword or symbol SYM to a symbol which could designate an ORG- object type." 34 (intern (format nil "~:@(~a~a~)" "org-" sym) :organ)))