branch: externals/org-gnosis
commit 821043bccac991cc3094d88f127aeeffe3fe0626
Author: Thanos Apollo <[email protected]>
Commit: Thanos Apollo <[email protected]>

    insert: Insert only title as desc without parents.
    
    * Previous implementation would use the full node title, which would
      include the parent nodes.
---
 org-gnosis.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/org-gnosis.el b/org-gnosis.el
index 2da2ba7084..080787bcf6 100644
--- a/org-gnosis.el
+++ b/org-gnosis.el
@@ -542,12 +542,12 @@ If JOURNAL-P is non-nil, retrieve/create node as a 
journal entry."
          (node (org-gnosis--find "Select gnosis node: "
                                  (org-gnosis-select '[title tags] table)
                                  (org-gnosis-select 'title table)))
-         (id-result (org-gnosis-select 'id table `(= ,node title) t))
-         (id (and id-result (car id-result)))
+         (id (car (org-gnosis-select 'id table `(= ,node title) t)))
+        (title (car (last (split-string node ":"))))
          (desc (cond ((use-region-p)
                       (buffer-substring-no-properties (region-beginning) 
(region-end)))
                      (arg (read-string "Description: "))
-                     (t node))))
+                     (t title))))
     (unless id
       (save-window-excursion
         (org-gnosis--create-file node (if journal-p org-gnosis-journal-dir 
org-gnosis-dir))

Reply via email to