From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id NWIVBcF1BmK3wgAAgWs5BA (envelope-from ) for ; Fri, 11 Feb 2022 15:42:09 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id tgIjOMB1BmJ1eAEAG6o9tA (envelope-from ) for ; Fri, 11 Feb 2022 15:42:08 +0100 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 5D0542AC7E for ; Fri, 11 Feb 2022 15:42:08 +0100 (CET) Received: from localhost ([::1]:50456 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nIX7f-0007O7-0k for larch@yhetil.org; Fri, 11 Feb 2022 09:42:07 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52804) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nILli-000640-Ip for emacs-orgmode@gnu.org; Thu, 10 Feb 2022 21:34:42 -0500 Received: from [2607:f8b0:4864:20::82c] (port=45718 helo=mail-qt1-x82c.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nILlg-00049t-Qp for emacs-orgmode@gnu.org; Thu, 10 Feb 2022 21:34:42 -0500 Received: by mail-qt1-x82c.google.com with SMTP id o3so7621375qtm.12 for ; Thu, 10 Feb 2022 18:34:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=B5RE/r8+3RZvi4zrQ0+tQxsQJ2dYvNUNDRjkCSjEuGg=; b=WOlrutfDjka0KqkffQkjI1Q/+NMGLS6JKvQKx/6l2wBVzK/jeaFq1TzfLJ11sDCMez Zitvem0sWOvGpMBr06mBPNOrcNMte9Gx8Gv8uhTLNkQbZrO2SWX2gH8DF7t8xEQIJh3Q 7XLjn7EsRg73ooZEez5r9yffWzIQMzsC5R+njMEsSrU/pkNswkbfiMMusxoGkCiYVQU/ R2L56tAX9hE0rKzLveV4Bi3lSFDteGt3s6L6KfbqsZybmC+HXZMJqh97MaSSi6MSgPX8 YHce1P6DNkENuw4M5fwNoIQrKFWTntYPuanuJoqEhuGdjxOf/+yi3VXqgxWVQIq7hiRF FFgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=B5RE/r8+3RZvi4zrQ0+tQxsQJ2dYvNUNDRjkCSjEuGg=; b=IiqJOdURB7+Fjp+PxCMDf60J+a4gexrCViix+2Im7jvTFiz2iG6Zk/dgiokdBW45VW s+CPvhqQ7OBeKNJHX9dt46CzD/Ju56Z/P8xNseeD8H+xsFc5kJxCmnKqdardnkw+mDkB MB4I2UAsAXELSBDfVDidiuoIHSEQm82dc5fJwzKLZpNYP+R1SuGXmWXeJgExzHVwp3PV nAjYl7kBgbZZkjxc83kCHFdZUhoFs8tf0ds+bQVRVnqP3eXcio4kqF71IBrUekIvWdxl 3AjkwOqQ4cOMC2supHuQHs7tUesjamlYP8/cV+NVQ61xZPtza1bQCJjIQHKDMEgvantO OsSA== X-Gm-Message-State: AOAM530237RTzlVs98gzno944Q1k+EmwOPjAfaSd6Q7a+NXu052eJgbs LEO6LZyrNp1k3HGOicGj1ajeIrqTLMkYMlI+Fjiblkh6P04R5Q== X-Google-Smtp-Source: ABdhPJx51y15kTpzizHHe9w/0iEepsehY31Tun10sDNw4ejqtHe7CVKo8Vh+6Ca81ttvCHuTc7lVmJX+56AlHteydXg= X-Received: by 2002:a05:622a:1ba7:: with SMTP id bp39mr7192223qtb.626.1644546879196; Thu, 10 Feb 2022 18:34:39 -0800 (PST) MIME-Version: 1.0 From: Hu Lucius Date: Fri, 11 Feb 2022 02:34:28 +0000 Message-ID: Subject: [PATCH] fix `org-agenda-new-marker` To: emacs-orgmode@gnu.org Content-Type: multipart/alternative; boundary="0000000000008d120e05d7b4e817" X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::82c (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::82c; envelope-from=orctarorga@gmail.com; helo=mail-qt1-x82c.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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, HTML_MESSAGE=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Fri, 11 Feb 2022 09:41:05 -0500 X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1644590528; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=B5RE/r8+3RZvi4zrQ0+tQxsQJ2dYvNUNDRjkCSjEuGg=; b=q09tiUWqPyb6rBBfjSEO1dPYhfLXOSWaigbdjatQZM1+WGkmQ82OXLtckk5k1vBKqFxBq6 HAndzsb8Cj4VgGrYI+JsHN2JGEhi9sgLPBdmAoQ0T0A47kg1kImcMRn907hTJQ8xM0N98m 1aC0JWws30RSxJSndJrkQ5Cbo00JqxyL9iBAlKo2wSPlLfPeJdLAuHuRvLims92uP5ey2d jgUYzA9sHwrU+PEHQVHS9pxVtLrSLuli0vW3VhYl0LtOTnuzXJuR04EJE4ZjKIvTp/6dnh /sar7kReKT9AmQNA+TZEJsg+uWNXtC9B8BtKKmn7aavCV8uxSn3uv9CbdMa4fA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1644590528; a=rsa-sha256; cv=none; b=NkhpMcFFId318WseYpVpGa6QsurXa48uLw/I/tEN9MHXvrky5iqyKEms5jMUWy0965p87m elcKuQ8vIPcksz0ZvkYHxnqDqcN9nBlM4DAVWNPCKT9nV8Gkc1ttL/Om6itdBCorjQ/jFd FYUvP96AiqVwJyoZjnk24OQxl+APleIospfV8iFIPNz1RXbyB4wQs4VZQRsX2Eu2zWenlw /X63aIMs/avd8/ZYTUS9qJI4o39MJeuQiviQwWbXTIKZFkL5QV4fJx/jx4nrF7hP2Vjijz /uA3J/n8G0dQl5NLloYzzToNv0D9dnS5PQcYJ8/YIburZ7ZkEDhTEvdiYGqjXg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=WOlrutfD; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.33 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=WOlrutfD; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 5D0542AC7E X-Spam-Score: -4.33 X-Migadu-Scanner: scn1.migadu.com X-TUID: CxH1ujBWFJO4 --0000000000008d120e05d7b4e817 Content-Type: text/plain; charset="UTF-8" In some cases, `org-agenda-buffer` is killed while the symbol itself is still non-nil. `org-agena-new-marker` and anything calls it would ends in a message of "Selecting deleted buffer". This commit simply added an additional test that (buffer-live-p org-agenda-buffer) should also be true. Signed-off-by: Lucius Hu --- lisp/org-agenda.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 9bc44a56e..d5969ac78 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -4225,7 +4225,7 @@ Marker is at point, or at POS if non-nil. Org mode keeps a list of these markers and resets them when they are no longer in use." (let ((m (copy-marker (or pos (point)) t))) (setq org-agenda-last-marker-time (float-time)) - (if org-agenda-buffer + (if (org-agenda-buffer (buffer-live-p org-agenda-buffer)) (with-current-buffer org-agenda-buffer (push m org-agenda-markers)) (push m org-agenda-markers)) -- 2.35.1 --0000000000008d120e05d7b4e817 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
In some cases, `org-agenda-buffer` is killed while the sym= bol itself
is still non-nil. `org-agena-new-marker` and anything calls i= t would
ends in a message of "Selecting deleted buffer".
This commit simply added an additional test that

=C2=A0 =C2=A0 (bu= ffer-live-p org-agenda-buffer)

should also be true.

Signed-of= f-by: Lucius Hu <lebensterben@users.noreply.github.com>
---
=C2=A0lisp/org-ag= enda.el | 2 +-
=C2=A01 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 9bc44a56e..= d5969ac78 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el@@ -4225,7 +4225,7 @@ Marker is at point, or at POS if non-nil.=C2=A0 Org = mode keeps a list
=C2=A0of these markers and resets them when they are n= o longer in use."
=C2=A0 =C2=A0(let ((m (copy-marker (or pos (point= )) t)))
=C2=A0 =C2=A0 =C2=A0(setq org-agenda-last-marker-time (float-tim= e))
- =C2=A0 =C2=A0(if org-agenda-buffer
+ =C2=A0 =C2=A0(if (org-agen= da-buffer (buffer-live-p org-agenda-buffer))
=C2=A0 (with-current-buffer= org-agenda-buffer
=C2=A0 =C2=A0(push m org-agenda-markers))
=C2=A0 = =C2=A0 =C2=A0 =C2=A0(push m org-agenda-markers))
--
2.35.1

--0000000000008d120e05d7b4e817--