nonreligious · 2022-07-26 21:49
For some reason, (after recently upgrading packages), running `org-agenda` via `C-c a` and then selecting a view from the dispatch buffer (such as `a Agenda for current week or day`) just shows me a buffer with the last file in my `org-agenda-files` list - in this case, an org file called `work-notebook.org`.
Looking at the buffer list, I can find the `*Org Agenda*` buffer listed and so can switch with `C-x C-b`, but is there any way I can restore the usual behavior -- i.e. the `*Org Agenda*` buffer opens in a window in my current frame?
I usually have `org-agenda-window-setup` set at `current-window`, changing it to `reorganize-frame` still gives me the same problem.
I'm running `Emacs 27.2` using `Org mode version 9.4.4`.
**EDIT** : thanks to /u/yantar92 for suggesting https://github.com/Malabarba/elisp-bug-hunter for a tool, which allowed me to find out the issue is with a recent update to `org-gcal`. The problem and a temporary fix are described in [this github issue](https://github.com/kidd/org-gcal.el/issues/202).
yantar92 · 2022-07-27 11:20
Try to reproduce with emacs -Q
nonreligious · 2022-07-27 11:25
It works fine that way ... I realize it's clearly an issue with my config, but I was hoping to not have to dig through every line
yantar92 · 2022-07-27 11:36
I suggest https://github.com/Malabarba/elisp-bug-hunter
It usually takes a handful of minutes to narrow down the cause in the config: https://open.tube/videos/watch/4d819114-43bf-42df-af94-f94fc53dd0d9
nonreligious · 2022-07-27 14:20
Thank you!
Took a while to setup as I have a literate configuration and a couple of other bugs popped up. But after copying everything to a new `.el` file and running `bug-hunter-file` on it, the issue was isolated to `org-gcal`, and in particular to the line in my config
(add-hook 'org-save-all-org-buffers (lambda () (org-gcal-sync) ))
It turns out there is now a bug in `org-gcal-fetch` (which affects `org-gcal-sync`) that ["forces org files into active window"](https://github.com/kidd/org-gcal.el/issues/202). This leads to a one-line fix that solves the issue (changing `switch-to-buffer` to `set-buffer` in `org-generic-id.el`).
Thanks again!
(Btw, another thing I found trawling through my tangled `config.el` file is that `elisp` != `emacs-lisp`, so the results of some blocks were in entirely different locations to where I had intended them to go).
yantar92 · 2022-07-27 14:28
> Btw, another thing I found trawling through my tangled config.el file is that elisp != emacs-lisp, so the results of some blocks were in entirely different locations to where I had intended them to go).
I just tried
#+begin_src emacs-lisp :tangle yes
(message "Foo!")
#+end_src
#+begin_src elisp :tangle yes
(message "Foo2!")
#+end_src
and it tangles just fine
nonreligious · 2022-07-27 14:33
I use
#+PROPERTY: header-args:emacs-lisp :comments both
as a header in my `config.org` file, rather than adding `:tangle yes` to every block, which might be the reason for the discrepancy. In my case, both blocks would tangle, but `Foo2!` would appear above `Foo!` in the `config.el` file. Changing everything to `emacs-lisp` avoids this issue for me.