From e251563417434ce5d610119c0ea8da107d02f4ec Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Tue, 11 Feb 2025 19:16:38 +0200 Subject: version bump: 0.2 --- org-gnosis-ui.el | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'org-gnosis-ui.el') diff --git a/org-gnosis-ui.el b/org-gnosis-ui.el index dfc2d11..0fcabe2 100644 --- a/org-gnosis-ui.el +++ b/org-gnosis-ui.el @@ -7,7 +7,7 @@ ;; Maintainer: Thanos Apollo ;; URL: https://git.thanosapollo.org/org-gnosis-ui ;; Keywords: files outlines -;; Version: 0.1 +;; Version: 0.2 ;; Package-Requires: ((emacs "27.1") (simple-httpd "1.5.1") (websocket "1.13") (org-gnosis "0.0.2")) ;; This file is NOT part of GNU Emacs. @@ -368,21 +368,21 @@ loaded. Returns `ref' if an entry could not be found." (tail (nthcdr (+ n 1) lst))) (append head (list el) tail))) -;; (defun org-gnosis-ui--citekey-to-ref (citekey) -;; "Convert a CITEKEY property (most likely with a `cite:' prefix) to just a key. - -;; This method is mostly taken from `org-roam-bibtex' see but is has been -;; adapted to operate on a sting instead of a node. Requires `org-ref' to -;; be loaded. - -;; Returns the `key' or nil if the format does not match -;; the `org-ref-cite-re'" -;; (if-let ((boundp 'org-ref-cite-re) -;; (citekey-list (split-string-and-unquote citekey))) -;; (catch 'found -;; (dolist (c citekey-list) -;; (when (string-match org-ref-cite-re c) -;; (throw 'found (match-string 2 c))))))) +(defun org-gnosis-ui--citekey-to-ref (citekey) + "Convert a CITEKEY property (most likely with a `cite:' prefix) to just a key. + +This method is mostly taken from `org-roam-bibtex' see but is has been +adapted to operate on a sting instead of a node. Requires `org-ref' to +be loaded. + +Returns the `key' or nil if the format does not match +the `org-ref-cite-re'" + (if-let ((boundp 'org-ref-cite-re) + (citekey-list (split-string-and-unquote citekey))) + (catch 'found + (dolist (c citekey-list) + (when (string-match org-ref-cite-re c) + (throw 'found (match-string 2 c))))))) (defun org-gnosis-ui--retitle-node (node) "Replace the title of citation NODE with associated notes. -- cgit v1.2.3