I have recently upgraded my org-mode version, switching from emacs
29.4/org-mode 9.6.15 to emacs 29.4/org-mode 9.7.20. To my understanding, some
relatively recent upgrade to org-contacts requires a newer org-mode version.
I use org-contacts to display birthdays and anniversaries in my agenda. In my
emacs config, I also have `org-id-link-to-org-use-id` set to `'use-existing`.
This used to work like a charm, with `M-x org-agenda a` building my agenda
including the occasional anniversary notification.
After upgrading, I now get prompted to choose a link-storing function every
time my agenda tries to display the birthday/anniversary of a contact. I get to
choose between `org-contacts-link-store` and `org-id-store-link-maybe`.
Choosing `org-contacts-link-store` generates a link to the correct heading in
my contacts file - that is the behavior I want and that I am used to.
Choosing `org-id-store-link-maybe` instead links to the heading in my gtd file
where `%%(org-contacts-anniversaries)` is called - this is new to me and not
what I want in this case.
As `org-contacts-link-store` is my pre-selected default option I can quickly
press return and build the agenda as usual. However, the prompting can get a
little annoying, especially when there are multiple anniversaries to be
displayed on a given date - and it has to be repeated upon every restart of
emacs. Any advice on automatically running `org-contacts-link-store` and
skipping this new prompt is highly appreciated.
Please find a minimal config + org file setup below. (Apologies for using
straight and use-package, I am not familiar (yet) with the built-in equivalents)
Thanks,
HW
```
#+begin_src emacs-lisp :tangle ~/tmp/minimal-org.el
(defvar bootstrap-version)
(let ((bootstrap-file (expand-file-name
"straight/repos/straight.el/bootstrap.el" user-emacs-directory))
(bootstrap-version 5))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
'silent
'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
(straight-use-package 'use-package)
(use-package emacs
:custom
(straight-use-package-by-default t))
(use-package org
:straight
(:commit f9966309d507c6a98b7597f0e9639b3051ebe969)
:custom
(org-directory (concat (getenv "HOME") "/tmp" "/org"))
(org-agenda-files (list (concat org-directory "/gtd.org")
(concat org-directory "/contacts.org")))
(org-id-link-to-org-use-id 'use-existing))
(use-package org-contacts
:custom
(org-contacts-files (list (concat org-directory "/contacts.org"))))
#+end_src
#+begin_src org :tangle ~/tmp/org/gtd.org
,* Birthdays
%%(org-contacts-anniversaries "BIRTHDAY" "Birthday: %l (%Y)")
,* Anniversaries
%%(org-contacts-anniversaries "ANNIVERSARY" "Birthday: %l (%Y)")
,* Tasks
,** TODO Fix org-contacts
#+end_src
#+begin_src org :tangle ~/tmp/org/contacts.org
,* John Doe
:PROPERTIES:
:ID: EBC78DDD-331A-49B0-92E4-83F69C1242A2
:ANNIVERSARY: 2022-01-31
:BIRTHDAY: 1980-01-31
:END:
#+end_src
```