bug#43356: 27.1; Gnus: Selected articles are unavoidably entered into the agent cache in an agentized group (while plugged)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

bug#43356: 27.1; Gnus: Selected articles are unavoidably entered into the agent cache in an agentized group (while plugged)

ozhap
Sample way to reproduce the behaviour:
1. Gmail IMAP should be accessible. Keep credentials in .authinfo.gpg.
   No Gnus files or directories (News, .newsrc*, Mail) present.
2. emacs -Q
3. Run:

(setq gnus-select-method
      '(nnimap "gmail"
               (nnimap-address "imap.gmail.com")
               (nnimap-server-port 993)
               (nnimap-stream ssl)))

4. M-x gnus
5. ^ (Server list)
6. Go to 'gmail' and: J a (agentize)
7. q (back to Group buffer)
8. g (refresh)
9. RET on any folder and RET on an article
10. Verify that an article file has been created in
    ~/News/agent/nnimap/gmail/[folder]/

This also conflicts with the documentation in the manual sections
'Agent Caveats' (see below), 'Choosing Variables' & 'Agent as Cache',
the latter saying:

"Articles are not cached in the Agent by default though (that would
potentially consume lots of disk space), but if you have already
downloaded an article into the Agent, Gnus will not download the
article from the server again but use the locally stored copy instead"

Apparently, this has been brought about (intentionally) by commit
f3b146e943cd733fb716c75048f24b73826e5f30 in response to what appears
to be an erroneous feature-request - bug#8502 [1]. The requested
feature already existed, as documented in the manual sections
'Choosing Variables' & 'Agent Caveats', the latter reading thus:

“If I read an article while plugged, do they get entered into the
Agent?”

     *No*. If you want this behavior, add
     ‘gnus-agent-fetch-selected-article’ to
     ‘gnus-select-article-hook’.

In my limited understanding, the fix is simple: revert the commit
(except for 2 of its unrelated hunks - of gnus-html.el & shr.el).

Ref:
[1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=8502
[2] Related thread:
https://lists.gnu.org/archive/html/help-gnu-emacs/2020-09/msg00099.html




In GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20)
 of 2020-08-11 built on Kittu
Repository revision: 86d8d76aa36037184db0b2897c434cdaab1a9ae8
Repository branch: HEAD
Windowing system distributor 'The X.Org Foundation', version 11.0.12008000
System Description: Ubuntu 20.04.1 LTS

Recent messages:
nnimap read 7k from imap.gmail.com (initial sync of 6 groups; please wait)
Checking new news...done
Entered nnimap:gmail into the Agent
Checking new news...
nnimap read 0k from imap.gmail.com
Reading active file via nndraft...done
Checking new news...done
nnimap read 0k from imap.gmail.com
C-x 5 C-x C-f is undefined
Making completion list... [6 times]

Configured using:
 'configure --prefix=/home/jim/emacs'

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY
ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD PDUMPER
LCMS2 GMP

Important settings:
  value of $LANG: en_IN
  locale-coding-system: iso-latin-1-unix

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow emacsbug sendmail cl-extra help-mode sort gnus-cite smiley
ansi-color shr-color color mm-archive mail-extr gnus-async gnus-bcklg
gnus-ml disp-table cursor-sensor nndraft nnmh nnfolder utf-7 epa-file
gnutls network-stream nsm gnus-agent gnus-srvr gnus-score score-mode
nnvirtual gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime dig
nntp gnus-cache gnus-sum url url-proxy url-privacy url-expand
url-methods url-history mailcap shr url-cookie url-domsuf url-util
url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
json map url-vars svg xml dom browse-url gnus-group gnus-undo gnus-start
gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo parse-time iso8601
gnus-spec gnus-int gnus-range message rmc puny dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg
epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader gnus-win gnus nnheader gnus-util rmail
rmail-loaddefs rfc2047 rfc2045 ietf-drums text-property-search time-date
subr-x seq byte-opt gv bytecomp byte-compile cconv mail-utils mm-util
mail-prsvr wid-edit cl-loaddefs cl-lib tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads dbusbind inotify lcms2 dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty make-network-process emacs)

Memory information:
((conses 16 140130 13849)
 (symbols 48 15095 1)
 (strings 32 45089 3333)
 (string-bytes 1 1574228)
 (vectors 16 23104)
 (vector-slots 8 324486 16656)
 (floats 8 304 265)
 (intervals 56 582 237)
 (buffers 1000 28))




Reply | Threaded
Open this post in threaded view
|

bug#43356: 27.1; Gnus: Selected articles are unavoidably entered into the agent cache in an agentized group (while plugged)

Lars Ingebrigtsen
Ozhap <[hidden email]> writes:

> Apparently, this has been brought about (intentionally) by commit
> f3b146e943cd733fb716c75048f24b73826e5f30 in response to what appears
> to be an erroneous feature-request - bug#8502 [1]. The requested
> feature already existed, as documented in the manual sections
> 'Choosing Variables' & 'Agent Caveats', the latter reading thus:
>
> “If I read an article while plugged, do they get entered into the
> Agent?”
>
>      *No*. If you want this behavior, add
>      ‘gnus-agent-fetch-selected-article’ to
>      ‘gnus-select-article-hook’.
>
> In my limited understanding, the fix is simple: revert the commit
> (except for 2 of its unrelated hunks - of gnus-html.el & shr.el).

Thanks for the thorough and clear analysis.

I've now reverted the parts from that commit that were relevant to this
issue.

--
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no