0

Calling org-contacts and input a name, I expect in return a list of contacts matching that name. Instead, it results in emacs trying to interpret each row of my contacts file as org-agenda-files.

Example of my contacts.org file:

* John Doe
  :PROPERTIES:
  :BIRTHDAY: 2016-02-13
  :END:

Setup in init.el:

(use-package org-contacts
  :ensure t
  :custom
  (org-contacts-files "~/contacts.org")
  )

I tried debugging, and in my limited knowledge of debugging I see at a point a function called org-read-agenda-files (or similar) getting the first row of my contact files, the header, and append it to the path where my init.el is (.emacs.d) and trying to read it as a file:

Non-existent agenda file c:/Users/c740/OneDrive/org/.emacs.d/#+STARTUP: overview.  [R]emove from list or [A]bort?

Note that hitting R the contacts.org file is modified: emacs delete the entire first row, and then proceed with the second non-empty row and try to interpret as an agenda file, and so on.

I run emacs on MS Windows: GNU Emacs 28.2 (build 2, x86_64-w64-mingw32) of 2022-09-13

1 Answer 1

0

org-contacts-files is supposed to be a list of files. Try:

...
:custom
(org-contacts-files ("~/contacts.org"))
...

I'm not sure whether use-package wants the list quoted or not.

EDIT: As the OP points out in the comment, the list needs to be quoted:

...
:custom
(org-contacts-files '("~/contacts.org"))
...
1
  • 1
    The list shall be quoted: (org-contacts-files ' ("~/contacts.org"))
    – erpreciso
    Jan 23, 2023 at 7:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.