diff options
| author | Quentin Aristote <quentin@aristote.fr> | 2022-10-16 15:27:08 +0200 |
|---|---|---|
| committer | Quentin Aristote <quentin@aristote.fr> | 2022-10-16 15:27:08 +0200 |
| commit | 3ba7667398cd1ffd6ec3e86cbd00826fe8189d49 (patch) | |
| tree | dac14261f8657a2391631c259fbb7ecfd63a66b0 | |
| parent | 98695c2abfa97c59880519f1127e84f373bcce29 (diff) | |
import-csv: protect hashtbl from garbage collection
| -rw-r--r-- | local/bibli-paris/bibli-paris.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/local/bibli-paris/bibli-paris.el b/local/bibli-paris/bibli-paris.el index 8a9dc5c..4f859fd 100644 --- a/local/bibli-paris/bibli-paris.el +++ b/local/bibli-paris/bibli-paris.el @@ -359,7 +359,7 @@ without inserting the heading." "Insert entries described by a list of keys KEYS and associated to values in ROW at the end of the buffer. Also set the tags TAGS (string seq) and the state STATE (string that defaults to TODO.). If an entry has a record number found in -RECNUM-POMS (string to marker hash table), only update the entry at +RECNUM-LINES (string to marker hash table), only update the entry at corresponding point (without inserting the heading)." ;; TODO : remove race conditions (seq-do (lambda (row) @@ -409,7 +409,7 @@ STATE (string)." "TODO"))) (let* ((recnum-lines (make-hash-table :test 'equal :size (bibli-paris/number-of-entries) - :weakness 'key-and-value)) + :weakness nil)) (path-to-csv (if path-to-csv path-to-csv bibli-paris/default-path-to-csv)) (csv-rows (bibli-paris/parse-csv path-to-csv)) (entry-number 0)) @@ -421,7 +421,8 @@ STATE (string)." (cdr csv-rows) recnum-lines tags - state)) + state) + (clrhash recnum-lines)) (message "Import done.")) |
