emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: rrandresf@gmail.com
To: emacs-orgmode@gnu.org
Subject: Bug: calling org-agenda-list programatically when starting with emacs --daemon [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.3/lisp/org/)]
Date: Thu, 17 Oct 2019 13:32:11 +0000	[thread overview]
Message-ID: <86imon4hwk.fsf@gmail.com> (raw)


Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

     https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.
------------------------------------------------------------------------

Hi.

I usually start emacs with --daemon.

At the end of my dot emacs I have a funct that calls or-agenda-list on a
thread.

When I call emacsclient  for opening a frame (the first frame) and try
to visit a buffer (any buffer). I have an opened buffer
*Backtrace* with this content:
--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (error "‘recenter’ing a window that does not display current-buffer.")
  recenter(-1)
  org-agenda-list(nil)
  funcall-interactively(org-agenda-list nil)
  call-interactively(org-agenda-list)
  (if buf (if (setq wind (get-buffer-window buf)) (select-window wind) (if (called-interactively-p) (progn (select-window (display-buffer buf t t)) (org-fit-window-to-buffer)) (let ((save-selected-window--state (internal--before-with-selected-window (display-buffer buf)))) (save-current-buffer (unwind-protect (progn (select-window ... ...) (org-fit-window-to-buffer)) (internal--after-with-selected-window save-selected-window--state)))))) (call-interactively (quote org-agenda-list)))
  (let ((buf (get-buffer "*Org Agenda*")) wind) (if buf (if (setq wind (get-buffer-window buf)) (select-window wind) (if (called-interactively-p) (progn (select-window (display-buffer buf t t)) (org-fit-window-to-buffer)) (let ((save-selected-window--state (internal--before-with-selected-window ...))) (save-current-buffer (unwind-protect (progn ... ...) (internal--after-with-selected-window save-selected-window--state)))))) (call-interactively (quote org-agenda-list))))
  (if (boundp (quote org-agenda-files)) (let ((buf (get-buffer "*Org Agenda*")) wind) (if buf (if (setq wind (get-buffer-window buf)) (select-window wind) (if (called-interactively-p) (progn (select-window (display-buffer buf t t)) (org-fit-window-to-buffer)) (let ((save-selected-window--state ...)) (save-current-buffer (unwind-protect ... ...))))) (call-interactively (quote org-agenda-list)))))
  emacswikino/jump-to-org-agenda()
  funcall(emacswikino/jump-to-org-agenda)
  apply(funcall emacswikino/jump-to-org-agenda)
  timer-event-handler([t 23977 128 0 86400 funcall (emacswikino/jump-to-org-agenda) nil 0])
--8<---------------cut here---------------end--------------->8---

Hint: perhaps something like this could help before (recenter -1) on
org-agenda-list function:
--8<---------------cut here---------------start------------->8---
(when (get-buffer-window org-agenda-buffer-name)
(recenter -1))
--8<---------------cut here---------------end--------------->8---

Best Regards

Emacs  : GNU Emacs 26.3 (build 1, armv7l-unknown-linux-gnueabihf, X toolkit, Xaw3d scroll bars)
Package: Org mode version 9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.3/lisp/org/)

             reply	other threads:[~2019-10-17 13:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-17 13:32 rrandresf [this message]
2020-02-05  8:11 ` Bug: calling org-agenda-list programatically when starting with emacs --daemon [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.3/lisp/org/)] Bastien

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=86imon4hwk.fsf@gmail.com \
    --to=rrandresf@gmail.com \
    --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).