Subject: Re: bug#66797: 29.1; Debbugs refresh is ineffective when used with get-bug-by-id

From: Michael Albinus <[email-masked]>
Date: Sun, 29 Oct 2023 09:30:32 +0100

Stefan Kangas <[email-masked]> writes:

Hi Stefan,

>> That is correct behavior. Refreshing the bugs consults the cache (which
>> expires after an hour). Getting fresh data from the debbugs.gnu.org
>> server requires 'C-u g'. See the manual (info "(debbugs-ug) Tabulated Lists")
>
> Is it worth documenting that in the `debbugs-gnu' docstring?

It is not related to `debbugs-gnu'. It is a key binding in
`debbugs-gnu-mode', and independent from the way the buffer is created
(by `debbugs-gnu', `debbugs-gnu-search', `debbugs-gnu-bugs', you name
it). Instead, I have extended the docstring of `debbugs-gnu-mode':

--8<---------------cut here---------------start------------->8---
(define-derived-mode debbugs-gnu-mode tabulated-list-mode "Debbugs"
  "Major mode for listing bug reports.
The bugs are are taken from the cache when the list is refreshed.
In order to retrieve the actual bug status after it has been
modified on the debbugs server, consider typing \\`C-u g'.

\\{debbugs-gnu-mode-map}"
--8<---------------cut here---------------end--------------->8---

Btw, `debbugs-gnu-make-control-message' contains the following code:

--8<---------------cut here---------------start------------->8---
    (add-hook 'message-send-actions
              (lambda () (remhash bugid debbugs-cache-data))
              nil t)))
--8<---------------cut here---------------end--------------->8---

That is, after sending the control message, the bug is removed from the
cache. Next time the debbugs buffer is refreshed, new data for this bug
should be taken from the debbugs server. This doesn't help of course,
when the data are retrieved from the server before the change has
arrived it.

Best regards, Michael.