From: Ihor Radchenko <yantar92@posteo.net>
To: "Björn Bidar" <bjorn.bidar@thaodan.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: [BUG] org-gnus-follow-link tries to select dead frame [9.8-pre (release_9.7.15-163-g3ff21c.dirty @ /home/bidar/.local/etc/emacs/lib/org/lisp/)]
Date: Sun, 02 Feb 2025 16:23:14 +0000 [thread overview]
Message-ID: <87lduo1fkd.fsf@localhost> (raw)
In-Reply-To: <87o6zn4m40.fsf@>
[-- Attachment #1: Type: text/plain, Size: 460 bytes --]
Björn Bidar <bjorn.bidar@thaodan.de> writes:
>>> * Preconditions
>>> - gnus-other-frame-object is a dead frame
>>
>> May you please describe when `gnus-other-frame-object' could become a
>> dead frame?
>
> I assume when the frame that is in the object was closed.
>
> E.g. for example to trigger this state again I closed the Gnus frame I
> was writing this reply in. Afterwards the frame is dead.
Then, why not simply the attached patch?
[-- Attachment #2: 0001-ol-gnus-Do-not-err-when-gnus-frame-is-dead.patch --]
[-- Type: text/x-patch, Size: 1328 bytes --]
From 73bb83c67dbda24c7b4455073482020b5e4e357b Mon Sep 17 00:00:00 2001
Message-ID: <73bb83c67dbda24c7b4455073482020b5e4e357b.1738513362.git.yantar92@posteo.net>
From: Ihor Radchenko <yantar92@posteo.net>
Date: Sun, 2 Feb 2025 17:20:50 +0100
Subject: [PATCH] ol-gnus: Do not err when gnus frame is dead
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* lisp/ol-gnus.el (org-gnus-follow-link): Do not try to switch to dead
frame.
Reported-by: Björn Bidar <bjorn.bidar@thaodan.de>
Link: https://list.orgmode.org/orgmode/87o6zn4m40.fsf@/
---
lisp/ol-gnus.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lisp/ol-gnus.el b/lisp/ol-gnus.el
index 5cddc3790a..ac2cadbc66 100644
--- a/lisp/ol-gnus.el
+++ b/lisp/ol-gnus.el
@@ -228,7 +228,9 @@ (defun org-gnus-follow-link (&optional group article)
"Follow a Gnus link to GROUP and ARTICLE."
(require 'gnus)
(funcall (org-link-frame-setup-function 'gnus))
- (when gnus-other-frame-object (select-frame gnus-other-frame-object))
+ (when (and gnus-other-frame-object
+ (frame-live-p gnus-other-frame-object))
+ (select-frame gnus-other-frame-object))
(let ((group (org-no-properties group))
(article (org-no-properties article)))
(cond
--
2.47.1
[-- Attachment #3: Type: text/plain, Size: 223 bytes --]
--
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
prev parent reply other threads:[~2025-02-02 16:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-20 23:21 [BUG] org-gnus-follow-link tries to select dead frame [9.8-pre (release_9.7.15-163-g3ff21c.dirty @ /home/bidar/.local/etc/emacs/lib/org/lisp/)] Björn Bidar
2025-01-30 18:31 ` Ihor Radchenko
2025-01-31 4:56 ` Björn Bidar
2025-02-02 16:23 ` Ihor Radchenko [this message]
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=87lduo1fkd.fsf@localhost \
--to=yantar92@posteo.net \
--cc=bjorn.bidar@thaodan.de \
--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).