-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Starting in org-agenda view doesn't work with persp-mode enabled #91
Comments
Try to run your code in (with-eval-after-load "persp-mode"
(defun persp-restore-org-agenda-after-init (file phash &rest _args)
(when (and (eq phash *persp-hash*)
(string= file (concat (or (file-name-directory file)
(expand-file-name persp-save-dir))
(file-name-nondirectory file))))
(my-todo-buffers)
(remove-hook 'persp-after-load-state-functions
#'persp-restore-org-agenda-after-init)))
(add-hook 'persp-after-load-state-functions
#'persp-restore-org-agenda-after-init)) |
By using a timer for delay, did you mean specifically using Thanks. |
I mean (run-at-time seconds nil #'(lambda () (your-code-here))) I did a mistake in the code in my previous post, now it's fixed. Actually you can wrap this code in a function and call it like Alternatively you can manually check the commandline arguments: (let ((org-agenda (member "-org-agenda" command-line-args)))
(when org-agenda
(setq command-line-args (remove "-org-agenda" command-line-args))
(add-hook 'persp....))) |
I think I found the problem, it's described here. (Edit: Someone was able to reproduce what I'm experiencing and has a guess on what might be the issue). Also, further information here. So is there a viable solution? I tried your code and it doesn't seem to do anything. |
Solution posted here. |
Actually, I'll leave it open for you to decide whether it's worth closing. The original problem is dealt with, but the underlying issue of As you can tell, it took a while to figure out what's the problem. |
I have a simple function that starts Emacs with 2 windows split vertically--a todo.org buffer on the left and an org-agenda view on the right:
(defun my-todo-buffers ()
(interactive)
(setq initial-buffer-choice nil)
(find-file "~/notes/todo.org")
(split-window-horizontally)
(org-agenda-list))
I launch it by launching Emacs through
emacs -f my-todo-buffers
and it works fine whenpersp-mode
is not enabled. However, ifpersp-mode
is enabled, then for some reason not only does both the todo.org buffer and the org agenda view buffer not show up, but a specific org file gets shown instead. That specific org file is not mentioned in any of my settings but it's a file for myorg-agenda-files
.How can I have an org agenda view buffer shown on Emacs launch with persp-mode enabled?
Any help is much appreciated--I really depend on persp-mode.
Thanks.
The text was updated successfully, but these errors were encountered: