bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#43682: 28.0.50; Clean up nnimap server buffers?


From: Eric Abrahamsen
Subject: bug#43682: 28.0.50; Clean up nnimap server buffers?
Date: Tue, 29 Sep 2020 11:25:07 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> -            (ignore-errors              ;E.g. "buffer foo has no process".
>> -              (nnimap-send-command "NOOP"))))))))
>> +        (condition-case err
>> +            (process-send-string "NOOP")
>> +          (error
>
> As Robert notes, you can't do that; it'll mess up the machiner.

That was a complete brain-o. I must have actually gone and typed that,
and I don't know why.

>> +           (if (string-search "has no process" (cdr err))
>> +               (let ((buf (current-buffer)))
>> +                 (setq nnimap-process-buffers
>> +                       (delq buf nnimap-process-buffers))
>> +                 (kill-buffer buf))
>> +             (signal (car err) (cdr err)))))))))))
>
> But why look for a string?  You can just check whether the process is
> dead or not.

Yes, I could have thought this through a little more...

Do we need to manipulate `nnimap-connection-alist', as
`nnimap-find-connection' does? I've never understood what that variable
is actually for. It's a defvoo, so it has a separate value per-server,
but each server's only got one active process buffer anyway. What does
it tell us that we can't get from nnimap-process-buffers (and those
buffers' local values of `nnimap-object')?

Thanks to you both,
Eric





reply via email to

[Prev in Thread] Current Thread [Next in Thread]