emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: stardiviner <numbchild@gmail.com>
To: Bastien <bzg@gnu.org>
Cc: Org-mode <emacs-orgmode@gnu.org>, Ihor Radchenko <yantar92@gmail.com>
Subject: Re: Bug: org-contacts.el: org-contacts-link-store breaks org-id [9.4.2 (release_9.4.2-307-g8840af @ /home/yantar92/.emacs.d/straight/build/org/)]
Date: Thu, 17 Dec 2020 08:25:50 +0800	[thread overview]
Message-ID: <CAL1eYu+d=fLArsd--fLLTpth=76WHRs2+ByRQo8ow0u==VAxLw@mail.gmail.com> (raw)
In-Reply-To: <87sg86uggl.fsf@gnu.org>


[-- Attachment #1.1: Type: text/plain, Size: 1050 bytes --]

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 <bzg@gnu.org> wrote:

> Hi,
>
> Ihor Radchenko <yantar92@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
>

[-- Attachment #1.2: Type: text/html, Size: 2048 bytes --]

[-- Attachment #2: 0001-org-contacts-Fix-org-store-link-error-caused-by-org-.patch --]
[-- Type: text/x-patch, Size: 1179 bytes --]

From db33924b9439a5a787b30e985cf005ba11347642 Mon Sep 17 00:00:00 2001
From: stardiviner <numbchild@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	other threads:[~2020-12-17  0:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-16  8:48 Bug: org-contacts.el: org-contacts-link-store breaks org-id [9.4.2 (release_9.4.2-307-g8840af @ /home/yantar92/.emacs.d/straight/build/org/)] Ihor Radchenko
2020-12-16 11:40 ` Bastien
2020-12-17  0:25   ` stardiviner [this message]
2020-12-17  3:30     ` Ihor Radchenko
2020-12-17  5:03       ` Bastien
2020-12-17  5:08         ` stardiviner
2020-12-17  5:18           ` Bastien
2020-12-17  5:25             ` stardiviner
2020-12-17  5:52               ` Bastien
2020-12-17  5:07       ` stardiviner
2020-12-17  6:40       ` stardiviner
2020-12-17  7:20         ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAL1eYu+d=fLArsd--fLLTpth=76WHRs2+ByRQo8ow0u==VAxLw@mail.gmail.com' \
    --to=numbchild@gmail.com \
    --cc=bzg@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).