summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2025-02-19 11:33:41 +0200
committerThanos Apollo <[email protected]>2025-02-19 11:33:41 +0200
commitc126ae29fda650c797e6b261e757487bcd994107 (patch)
treeb1bafed7c679ad8b010d0bf73f2c63216b65cc9c
parent143909c32dc4299cc0b2d22bfd461d2595b2f415 (diff)
parent5027605e2dfea1031ffe97da1f1e8d35c63e2479 (diff)
Merge branch 'v0.0.7'0.0.7
+ Release version 0.0.7
-rw-r--r--NEWS.org4
-rw-r--r--doc/org-gnosis.org2
-rw-r--r--org-gnosis.el22
3 files changed, 23 insertions, 5 deletions
diff --git a/NEWS.org b/NEWS.org
index 8a40e1a..e327db5 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -8,6 +8,10 @@ This document contains the release notes that are included in each
tagged commit on the project's main git repository:
<https://git.thanosapollo.org/org-gnosis>.
+* 0.0.7
++ Fix insertion of tags for file topic
++ Add org-gnosis-visit-backlinks.
+
* 0.0.6
Minor update with bug fixes & documentation improvements:
+ Fixes insertion of tags issues
diff --git a/doc/org-gnosis.org b/doc/org-gnosis.org
index b6d5d21..e2b5c21 100644
--- a/doc/org-gnosis.org
+++ b/doc/org-gnosis.org
@@ -188,7 +188,7 @@ Example:
Note: Items with =-= would be links. The headings in the above
example could be links to an MOC as well.
-This way your notes are atomic & can be reused used in future
+This way your notes are atomic & can be reused in future
classes/projects.
+ For example you'd reuse your notes on nucleic acids in a genetics
diff --git a/org-gnosis.el b/org-gnosis.el
index fbec7fd..3db7581 100644
--- a/org-gnosis.el
+++ b/org-gnosis.el
@@ -5,7 +5,7 @@
;; Author: Thanos Apollo <[email protected]>
;; Keywords: extensions
;; URL: https://thanosapollo.org/projects/org-gnosis/
-;; Version: 0.0.6
+;; Version: 0.0.7
;; Package-Requires: ((emacs "27.2") (emacsql "4.0.0") (compat "29.1.4.2"))
@@ -347,7 +347,7 @@ TIMESTRING defaults to `org-gnosis-timestring'"
(replace-regexp-in-string " " "_" title))))
(format "%s--%s.org%s" (format-time-string timestring) filename
(if org-gnosis-create-as-gpg ".gpg" ""))))
-
+;; TODO: Add filetags
(defun org-gnosis--create-file (title &optional directory extras)
"Create a node FILE for TITLE.
@@ -489,9 +489,23 @@ If JOURNAL-P is non-nil, retrieve/create node as a journal entry."
(list (completing-read-multiple
"Select tags (separated by ,): "
(org-gnosis-select 'tag 'tags '1=1 t))))
- (let ((id (org-gnosis-get-id)))
+ (let ((id (and (org-gnosis-get-id))))
(org-id-goto id)
- (org-set-tags tags)))
+ (if (org-current-level)
+ (org-set-tags tags)
+ (dolist (tag tags)
+ (org-gnosis-insert-filetag tag)))))
+
+;;;###autoload
+(defun org-gnosis-visit-backlinks ()
+ "Visit backlinks for current node."
+ (interactive)
+ (let* ((id (org-gnosis-get-id))
+ (links (org-gnosis-select 'source 'links `(= dest ,id) t))
+ (titles (cl-loop for link in links
+ collect (org-gnosis-select 'title 'nodes `(= id ,link) t))))
+ (org-gnosis-find
+ (completing-read "Backlink: " (apply #'append titles)))))
;;;###autoload
(defun org-gnosis-journal-find (&optional title)