branch: externals/org-gnosis
commit b9065371324dd59d89bb194b1795f84b1d6df630
Author: Thanos Apollo <pub...@thanosapollo.org>
Commit: Thanos Apollo <pub...@thanosapollo.org>

    [fix] org-gnosis-goto-id: Adjust for non org-gnosis links.
    
    * If it's not an org-gnosis link, use default behavior.
---
 org-gnosis.el | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/org-gnosis.el b/org-gnosis.el
index 22c644aa1e..50c5e39897 100644
--- a/org-gnosis.el
+++ b/org-gnosis.el
@@ -232,7 +232,6 @@ Returns file data with FILENAME."
   (with-temp-buffer
     (insert-file-contents filename)
     (org-mode)
-    (message "%s" filename)
     (let* ((data (org-gnosis-buffer-data))
           (links (org-gnosis-collect-id-links)))
       ;; Append links even if they are nil
@@ -469,12 +468,16 @@ TEMPLATE: Journaling template, refer to 
`org-gnosis-journal-templates'."
 
 
 (defun org-gnosis-goto-id (&optional id)
-  "Visit file for ID."
+  "Visit file for ID.
+
+If file or id are not found, use `org-open-at-point'."
   (interactive)
   (let* ((id (or id (org-gnosis--get-id-at-point)))
         (file (caar (org-gnosis-select 'file 'nodes `(= id ,id)))))
-    (find-file (expand-file-name file org-gnosis-dir))
-    (org-gnosis-mode)))
+    (if (and id file)
+       (progn (find-file (expand-file-name file org-gnosis-dir))
+              (org-gnosis-mode))
+      (org-open-at-point))))
 
 (defvar-keymap org-gnosis-mode-map
   :doc "org-gnosis keymap"

Reply via email to