I am using emacs-27.1 build 1 and org-mode 9.3.7 under Ubuntu 18.04 LTS.

Situation 1:

If I restart emacs and call org-agenda the 'Agenda for current week or day' shows only days of the week. I ran emacs-25.1 prior to 27.1 and the behavior then was to load the agenda files and show the agenda, with the time-stamped journal entries, calendar entries, TODOs, etc.

The value of org-agenda-files is nil after start-up. Org-mode otherwise seems to be normal.

The following is the start of my org-configuration:

(use-package org
  :ensure t)

(setq org-agenda-files (quote ("~/org/todo.org"

Loading init.el and evaluating the buffer does not set org-agenda-files

Evaluating the s-expression itself (put cursor after the s-expression containing setq and C-x C-e) sets org-agenda-files and restores the normal behavior - calling org-agenda loads the agenda files and shows the proper agenda. I have tried putting the variable initiation inside the use-package (following :init)with the same result - the variable is not set on start-up, but is after evaluating the s-expression.

Situation 2

I use two themes a day: a light theme for daytime and a dark one for night.

After M-x disable-theme and M-x enable-theme org-agenda-files is set to nil and the above behavior pertains! I have to eval the expression that sets org-agenda. The reset happens after enable-theme. It does not appear to matter what theme is enabled (I have tried three).

The manual adjustment for each case only requires a few seconds, but it is annoying and interrupts the work flow. How can I avoid having to manually set org-agenda-files?

  • 2
    One question per question please: I suggest you move your "Problem 2" into a separate question. – NickD Jan 28 at 21:57
  • I thought about that, but I'm getting the same problem two different ways. Perhaps I should have sub-titled 'Situation I' and 'Situation II' – drmcwilli Jan 28 at 22:40
  • For problem 1, try putting the setq form inside the use-package form after :config. This will set org-agenda-files after org has loaded and this might help. – Fran Burstall Jan 28 at 22:44
  • What's the question? Try formulating it as "How can I...". – Drew Jan 29 at 0:04
  • @FranBurstall: This did not work either. – drmcwilli Jan 29 at 15:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.