emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Hermann Graf von Westerholt <hermann.westerholt@rwth-aachen.de>
To: <emacs-orgmode@gnu.org>
Subject: org-contacts-anniversaries keeps asking for link-storing function
Date: Fri, 31 Jan 2025 10:19:44 +0100	[thread overview]
Message-ID: <27BFA4F7-22BB-42A8-97B4-F3590C015BDF@rwth-aachen.de> (raw)

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
```

                 reply	other threads:[~2025-02-01  6:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=27BFA4F7-22BB-42A8-97B4-F3590C015BDF@rwth-aachen.de \
    --to=hermann.westerholt@rwth-aachen.de \
    --cc=emacs-orgmode@gnu.org \
    /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).