Sure, I didn't expected that soon bug appears. I checked source code, I
commented out an condition accidentally.
Here is the patch. Tested it should work now.

[stardiviner]           <Hack this world!>      GPG key ID: 47C32433
IRC(freeenode): stardiviner                     Twitter:  @numbchild
Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/


On Wed, Dec 16, 2020 at 7:40 PM Bastien <b...@gnu.org> wrote:

> Hi,
>
> Ihor Radchenko <yanta...@gmail.com> writes:
>
> > When using org-contacts and org-id simultaneously, org-contacts
> > unconditionally makes org-store-link use file:name.org:*Headline link
> > style instead of id:UUID link style expected when using org-id. The
> > problem does not only appears when storing links to contact.org
> > headlines, but for any headlines.
> >
> > Probably, org-contacts should be integrated with org-id or at least not
> > interfere with links to ordinary headlines.
>
> Agreed.  Stardiviner, can you have a look?
>
> Thanks,
>
> --
>  Bastien
>
From db33924b9439a5a787b30e985cf005ba11347642 Mon Sep 17 00:00:00 2001
From: stardiviner <numbch...@gmail.com>
Date: Thu, 17 Dec 2020 08:19:35 +0800
Subject: [PATCH] org-contacts: Fix org-store-link error caused by
 org-contacts-link-store

* contrib/lisp/org-contacts.el (org-contacts-link-store): Fix Org store
link by adding missing condition for org-contacts.
---
 contrib/lisp/org-contacts.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/lisp/org-contacts.el b/contrib/lisp/org-contacts.el
index 310166d53..44ba455c4 100644
--- a/contrib/lisp/org-contacts.el
+++ b/contrib/lisp/org-contacts.el
@@ -1157,8 +1157,8 @@ (org-link-set-parameters "org-contact"
 
 (defun org-contacts-link-store ()
   "Store the contact in `org-contacts-files' with a link."
-  (when (eq major-mode 'org-mode)
-    ;; (member (buffer-file-name) (mapcar 'expand-file-name org-contacts-files))
+  (when (and (eq major-mode 'org-mode)
+	     (member (buffer-file-name) (mapcar 'expand-file-name org-contacts-files)))
     (let ((headline-str (substring-no-properties (org-get-heading t t t t))))
       (org-store-link-props
        :type "org-contact"
-- 
2.29.2

Reply via email to