aboutsummaryrefslogtreecommitdiff
path: root/module/vcomponent
diff options
context:
space:
mode:
Diffstat (limited to 'module/vcomponent')
-rw-r--r--module/vcomponent/base.scm9
-rw-r--r--module/vcomponent/parse/component.scm3
2 files changed, 8 insertions, 4 deletions
diff --git a/module/vcomponent/base.scm b/module/vcomponent/base.scm
index 1b582f0f..c5ec7af3 100644
--- a/module/vcomponent/base.scm
+++ b/module/vcomponent/base.scm
@@ -16,14 +16,15 @@
(key vline-key)
(value get-vline-value set-vline-value!)
(parameters get-vline-parameters)
- ;; TODO Add slot for optional source object, containing
- ;; - file of origin
- ;; - position in that file
- ;; - source string, before value parsing.
+ (source get-source set-source!)
)
(export vline-key)
+(define-public vline-source
+ (make-procedure-with-setter
+ get-source set-source!))
+
(define*-public (make-vline key value #:optional (ht (make-hash-table)))
(make-vline% key value ht))
diff --git a/module/vcomponent/parse/component.scm b/module/vcomponent/parse/component.scm
index b5fcbbe2..6819a202 100644
--- a/module/vcomponent/parse/component.scm
+++ b/module/vcomponent/parse/component.scm
@@ -281,6 +281,9 @@
(for vline in vlines
(define key (vline-key vline))
+ (set! (vline-source vline)
+ (get-metadata head*))
+
;; See RFC 5545 p.53 for list of all repeating types
;; (for vcomponent)
(if (memv key '(ATTACH ATTENDEE CATEGORIES