emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/org-contrib 0d5abf4a2e: Comment out `obe-meta-to-json'. It


From: ELPA Syncer
Subject: [nongnu] elpa/org-contrib 0d5abf4a2e: Comment out `obe-meta-to-json'. It is not usable
Date: Mon, 29 Jan 2024 06:59:59 -0500 (EST)

branch: elpa/org-contrib
commit 0d5abf4a2e214a03606ca4b43adec5be3066f363
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>

    Comment out `obe-meta-to-json'. It is not usable
    
    * lisp/org-bibtex-extras.el (obe-meta-to-json): Comment out the
    function and add FIXME.  It cannot run.
---
 lisp/org-bibtex-extras.el | 73 ++++++++++++++++++++++++-----------------------
 1 file changed, 37 insertions(+), 36 deletions(-)

diff --git a/lisp/org-bibtex-extras.el b/lisp/org-bibtex-extras.el
index 6e98c7f311..8e027fa7be 100644
--- a/lisp/org-bibtex-extras.el
+++ b/lisp/org-bibtex-extras.el
@@ -104,42 +104,43 @@ For example, to point to your `obe-bibtex-file' use the 
following.
                    (mapcar #'org-trim
                            (split-string (match-string 1) ",")) ", "))))))
 
-(defun obe-meta-to-json (meta &optional fields)
-  "Turn a list of META data from citations into a string of json."
-  (let ((counter 1) nodes links)
-    (cl-flet ((id (it) (cl-position it nodes :test #'string= :key #'car))
-             (col (k) (mapcar (lambda (r) (cdr (assoc k r))) meta))
-             (add (lst)
-               (dolist (el lst) (push (cons el counter) nodes))
-               (cl-incf counter)))
-      ;; build the nodes of the graph
-      (add (col :title))
-      (add (cl-remove-if (lambda (author) (string-match "others" author))
-                        (cl-remove-duplicates (apply #'append (col :authors))
-                                              :test #'string=)))
-      (dolist (field fields)
-       (add (cl-remove-duplicates (col field) :test #'string=)))
-      ;; build the links in the graph
-      (dolist (citation meta)
-        (let ((dest (id (cdr (assq :title citation)))))
-          (dolist (author (mapcar #'id (cdr (assq :authors citation))))
-            (when author (push (cons author dest) links)))
-          (let ((jid (id (cdr (assq :journal citation)))))
-            (when jid (push (cons jid dest) links)))
-          (let ((cid (id (cdr (assq :category citation)))))
-            (when cid (push (cons cid dest) links)))))
-      ;; build the json string
-      (format "{\"nodes\":[%s],\"links\":[%s]}"
-             (mapconcat
-              (lambda (pair)
-                (format "{\"name\":%S,\"group\":%d}"
-                        (car pair) (cdr pair)))
-              nodes ",")
-             (mapconcat
-              (lambda (link)
-                (format "{\"source\":%d,\"target\":%d,\"value\":1}"
-                        (car link) (cdr link)))
-              (meta-to-links meta nodes) ",")))))
+;; FIXME: `meta-to-links' is not a known function.
+;; (defun obe-meta-to-json (meta &optional fields)
+;;   "Turn a list of META data from citations into a string of json."
+;;   (let ((counter 1) nodes links)
+;;     (cl-flet ((id (it) (cl-position it nodes :test #'string= :key #'car))
+;;           (col (k) (mapcar (lambda (r) (cdr (assoc k r))) meta))
+;;           (add (lst)
+;;             (dolist (el lst) (push (cons el counter) nodes))
+;;             (cl-incf counter)))
+;;       ;; build the nodes of the graph
+;;       (add (col :title))
+;;       (add (cl-remove-if (lambda (author) (string-match "others" author))
+;;                      (cl-remove-duplicates (apply #'append (col :authors))
+;;                                            :test #'string=)))
+;;       (dolist (field fields)
+;;     (add (cl-remove-duplicates (col field) :test #'string=)))
+;;       ;; build the links in the graph
+;;       (dolist (citation meta)
+;;         (let ((dest (id (cdr (assq :title citation)))))
+;;           (dolist (author (mapcar #'id (cdr (assq :authors citation))))
+;;             (when author (push (cons author dest) links)))
+;;           (let ((jid (id (cdr (assq :journal citation)))))
+;;             (when jid (push (cons jid dest) links)))
+;;           (let ((cid (id (cdr (assq :category citation)))))
+;;             (when cid (push (cons cid dest) links)))))
+;;       ;; build the json string
+;;       (format "{\"nodes\":[%s],\"links\":[%s]}"
+;;           (mapconcat
+;;            (lambda (pair)
+;;              (format "{\"name\":%S,\"group\":%d}"
+;;                      (car pair) (cdr pair)))
+;;            nodes ",")
+;;           (mapconcat
+;;            (lambda (link)
+;;              (format "{\"source\":%d,\"target\":%d,\"value\":1}"
+;;                      (car link) (cdr link)))
+;;            (meta-to-links meta nodes) ",")))))
 
 (provide 'org-bibtex-extras)
 ;;; org-bibtex-extras ends here



reply via email to

[Prev in Thread] Current Thread [Next in Thread]