emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: Jens Schmidt <jschmidt4gnu@vodafonemail.de>
Cc: Ihor Radchenko <yantar92@posteo.net>,  emacs-orgmode@gnu.org
Subject: Re: [BUG] Issues in ol-gnus when storing links in nnvirtual and nnselect articles [9.7-pre (release_9.6.7-570-gd6f3ae.dirty @ /home/jschmidt/work/org-mode/lisp/)]
Date: Thu, 27 Jul 2023 09:10:17 -0700	[thread overview]
Message-ID: <87zg3h49p2.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <6aa47402-1546-272b-2859-4cfed1ea9ceb@vodafonemail.de> (Jens Schmidt's message of "Mon, 24 Jul 2023 22:23:59 +0200")

Jens Schmidt <jschmidt4gnu@vodafonemail.de> writes:

> Uh, I had technical issues and did not get all mails as I expected.
> Cobbling things together in one big reply now, with references and
> quotes hopelessly broken ... hope you can sort it out.
>
> Anyway, thanks to Eric for chiming in.
>
>> Ideally, it would be nice to have tests, though I have no clue how to
>> approach writing them.
>
> I have created a somewhat minimal Gnus setup to develop and test this
> patch on my development laptop, where I normally do not use Gnus.  It
> consists of a bunch of files and directories and a bit of configuration.
> I can follow up on this if you like, but preferably in a separate
> thread.

Someone mentioned gnus-mock in the other thread, which I made for
exactly these scenarios. It's a bit hairy making a Gnus installation
from nothing -- if you try it out and would like it to do something
different, I'd be interested in feedback.

>>> If we're currently in article-mode. The call to
>>> `gnus-article-show-summary' would protect against the case where the
>>> summary buffer has been killed in the meantime [...].
>
> Not really.  The following executed in an article buffer:
>
>   (progn
>    (kill-buffer gnus-summary-buffer)
>    (gnus-article-show-summary))
>
> results in
>
>   Debugger entered--Lisp error:
>       (error "There is no summary buffer for this article buffer")
>     signal(error ("There is no summary buffer for this article buffer"))
>     error("There is no summary buffer for this article buffer")
>     gnus-article-show-summary()
>     [...]
>
> Which, OTOH, shows that I was wrong in one aspect: Gnus at least in some
> cases *does* give a reasonable error message when the summary buffer for
> an article buffer is gone.
>
>>> Probably it would be enough to wrap the whole containing `let*' in a
>>> (with-current-buffer gnus-summary-buffer ...). If we're already in the
>>> summary buffer, no harm done.
>>
>> I am not sure if it is safe.
>> There is
>> (save-window-excursion (gnus-summary-select-article))
>> which calls (set-buffer gnus-summary-buffer)
>
> I agree with Ihor here and would rather go for individual wraps into
> `with-current-buffer'.  As I have done in my patch already,
> incidentially.

Somehow I missed that this whole thread started with an actual patch!
Sorry, that should have been the subject of discussion the whole time. I
can help with applying it, once all issues are resolved.

Thanks,
Eric


  parent reply	other threads:[~2023-07-27 17:45 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-22  9:06 [BUG] Issues in ol-gnus when storing links in nnvirtual and nnselect articles [9.7-pre (release_9.6.7-570-gd6f3ae.dirty @ /home/jschmidt/work/org-mode/lisp/)] Jens Schmidt
2023-07-22 13:48 ` Ihor Radchenko
2023-07-22 15:37   ` Jens Schmidt
2023-07-22 21:09     ` Eric Abrahamsen
2023-07-23  6:45       ` Ihor Radchenko
2023-07-24  1:55         ` Eric Abrahamsen
2023-07-24  7:17           ` Ihor Radchenko
2023-07-24 20:23     ` Jens Schmidt
2023-07-25  7:16       ` Ihor Radchenko
2023-07-27 16:10       ` Eric Abrahamsen [this message]
2023-07-23 10:26 ` Max Nikulin
2023-07-23 14:13   ` Jens Schmidt
2023-07-24 14:54     ` Max Nikulin
2023-07-26 16:04 ` Ihor Radchenko
2023-07-26 19:36   ` Jens Schmidt
2023-07-27  7:56     ` Ihor Radchenko
2023-07-28 11:27       ` Bastien Guerry
2023-07-29  7:04         ` Ihor Radchenko
2023-07-30 15:57           ` Jens Schmidt
2023-07-30 16:35             ` Ihor Radchenko

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=87zg3h49p2.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=jschmidt4gnu@vodafonemail.de \
    --cc=yantar92@posteo.net \
    /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).