emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* 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/)]
@ 2019-10-17 13:32 rrandresf
  2020-02-05  8:11 ` Bastien
  0 siblings, 1 reply; 2+ messages in thread
From: rrandresf @ 2019-10-17 13:32 UTC (permalink / raw)
  To: emacs-orgmode


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/)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: 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/)]
  2019-10-17 13:32 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/)] rrandresf
@ 2020-02-05  8:11 ` Bastien
  0 siblings, 0 replies; 2+ messages in thread
From: Bastien @ 2020-02-05  8:11 UTC (permalink / raw)
  To: rrandresf; +Cc: emacs-orgmode

Hi,

rrandresf@gmail.com writes:

> 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:
>
> Debugger entered--Lisp error: (error "‘recenter’ing a window that
> does not display current-buffer.")

Fixed, thanks!

-- 
 Bastien

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-02-05  8:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-17 13:32 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/)] rrandresf
2020-02-05  8:11 ` Bastien

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).