From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id EIKmCASJIF+jKQAA0tVLHw (envelope-from ) for ; Tue, 28 Jul 2020 20:22:28 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 4JGTBASJIF94cwAAB5/wlQ (envelope-from ) for ; Tue, 28 Jul 2020 20:22:28 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 722BE9400BF for ; Tue, 28 Jul 2020 20:22:27 +0000 (UTC) Received: from localhost ([::1]:38910 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k0W7E-0000Ne-NF for larch@yhetil.org; Tue, 28 Jul 2020 16:22:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47550) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k0W6n-0000NY-Qu for emacs-orgmode@gnu.org; Tue, 28 Jul 2020 16:21:57 -0400 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]:41535) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k0W6l-0003we-Bz for emacs-orgmode@gnu.org; Tue, 28 Jul 2020 16:21:56 -0400 Received: by mail-ed1-x52a.google.com with SMTP id c2so9908949edx.8 for ; Tue, 28 Jul 2020 13:21:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-transfer-encoding; bh=KygpTWgBodMHVuGU8unaOgbTNDPQodjXnxZk/xeiP1g=; b=TpFau+vtBuYRl4I6/c48QPtdDbJNZqpC8xVvRZldLY6p8zIQqz69rQ+VtItfxvSdL4 Ie4/5yQmj1UIEQNsb4rxicjqiGpK7SSxQG3rijesUEg2B3llP/QVgIEkfZ/g3O4JJbdc 4Y84aeOD/s880IFLYFTNZH9jovlfX67oXjmeIuHalThTJQm+un3IDZX6GXvnDApT7hYT UB45iIRNvsMPwh1RY+S/b0nv9GeXG2VtjgAK728Bfd72pw6o9CU97d8Tcmpg2KalK6GG ywFYGZyMllE23i42YPf8jtsQJEosq30KeR0N+tB7+gbRqp0dNrw3raCgxzPClX3AvViQ JyBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references :user-agent:date:message-id:mime-version:content-transfer-encoding; bh=KygpTWgBodMHVuGU8unaOgbTNDPQodjXnxZk/xeiP1g=; b=oDi+xEPWqjdEwzWu8njFb9A+N9BAqO6eW1K+4KhAkfFx8XhNsBkGMdborBjU9+vjTb 4J6P8XMnzpKKa6DbD9HWnNU7NqhC3NgZlpY+GwfXXlKvxqnOnwZazeiXhBPs7WbDwADE BzTp8qQlZ3j2tNbBpx2a8vgblkHoGh4KflydBAWPaYWzV2r2HpcSVHCwXSGIScjFRl8o BfoPnQpZmoTwKZNLvlGxn9rX6hmBTUFelJnDp+FPt22EX2u4cJwZolhqP+7Wh+Cmdz1Y kNmvg8A/20VjoeRcRucz/Gz130UIGW5JawB781c4KlG1MhMHakz1h3p3Uacs06OsOEy/ +0KQ== X-Gm-Message-State: AOAM533SNFeBTMm4nOyUXPnPf/9z0PauzNXSIRllUpivurXvmlG0Goeu HPrYs/g20bbVk3DOdc5Pe3E= X-Google-Smtp-Source: ABdhPJy2cEiuwx2nJii7R9ZOB8/1/wNfqnHtbJAeQN6PJNGG6EGg4Eux5Zr1WVdHHKMd5HILhdjdXg== X-Received: by 2002:a50:8f83:: with SMTP id y3mr28342502edy.257.1595967713830; Tue, 28 Jul 2020 13:21:53 -0700 (PDT) Received: from aspire-5942 (p200300ecdf44180c543aebd8a0057624.dip0.t-ipconnect.de. [2003:ec:df44:180c:543a:ebd8:a005:7624]) by smtp.gmail.com with ESMTPSA id e6sm9853684ejd.14.2020.07.28.13.21.52 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 28 Jul 2020 13:21:52 -0700 (PDT) From: Marco Wahl To: numbchild@gmail.com Subject: Re: [Discuss] separate (recenter window-line) out of org-agenda-redo In-Reply-To: (numbchild@gmail.com's message of "Mon, 27 Jul 2020 12:27:23 +0800") References: User-Agent: Gnus/5.13 (Gnus v5.13) Date: Tue, 28 Jul 2020 22:21:51 +0200 Message-ID: <87lfj35r1c.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::52a; envelope-from=marcowahlsoft@gmail.com; helo=mail-ed1-x52a.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, FREEMAIL_REPLY=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Org-mode Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=TpFau+vt; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -1.71 X-TUID: AwsRpzK0l7qC "numbchild@gmail.com" writes: > I try to add an idle timer to auto refresh org agenda views. > > Here is what I code: > > #+begin_src emacs-lisp > ;;; auto refresh `*Org Agenda*' buffer > (defun my/org-agenda-auto-refresh () > "Rebuild all agenda views buffers." > (org-agenda-redo-all t)) > > (run-with-idle-timer (* 60 20) t #'my/org-agenda-auto-refresh) > #+end_src > > > But I got error: > > #+begin_example > Error running timer =E2=80=98my/org-agenda-auto-refresh=E2=80=99: (error = "=E2=80=98recenter=E2=80=99ing a > window that does not display current-buffer.") > #+end_example Coming back to your original issue. Possibly it's enough to just suppress the error. You could change the function to --8<---------------cut here---------------start------------->8--- (defun my/org-agenda-auto-refresh-1 () "Rebuild all agenda views buffers." (ignore-errors (org-agenda-redo-all t))) --8<---------------cut here---------------end--------------->8--- HTH, --=20 Marco