James Thomas writes:

> James Thomas writes:
>
>> "Husain Alshehhi" writes:
>>
>>> I have used nnrss before, and my issue with it is that it (1)
>>> syncriounus, causing emacs to freeze for a while, (2) does not support
>>> atom, and I have not used emacs 30, and (3) cannot be configured to use
>>> curl, and that was necessary in my case since some website required
>>> auth.
>>
>> Joshua Barrett writes:
>>
>>> nnnrss is still synchronous like the rest of gnus, and does cause emacs to
>>> freeze. I'd really like it and nnatom to be asynchronous, but I think that 
>>> would
>>> require appreciably more work. I've enrolled all my feeds in the agent and
>>> configured the demon to fetch only if emacs has been idle for some
>>> time. However, both nnrss and nnnrss can be configured to use curl by 
>>> setting
>>> `mm-url-use-external` and `mm-url-program` accordingly, so that works at 
>>> least
>>
>> Joshua Barrett writes:
>>
>>> I'd additionally note that you can use the agent to fetch mail in the 
>>> background
>>> by invoking emacs in batch mode. It's suboptimal, but it does work.
>>
>> Daniel Semyonov writes:
>>
>>> I haven't had time to look at your code yet (so I don't know if you used
>>> a similar method), but at least with nnatom you can use a local file as
>>> the server address, which allows you to fetch a feed periodically
>>> independently of Emacs, with nnatom only in charge of parsing the local
>>> file.
>>
>> Daniel Semyonov writes:
>>
>>> It should be fairly simple to write a function which updates this file
>>> asynchronously, and then triggers the synchronous parsing of it by Gnus
>>> afterwards.
>>
>> Maybe you could try calling (info "(gnus) Child Gnusae") through
>> (describe-package 'async), for the general case.
>
> I was thinking about how it could work:
>
> Use a child to fetch, then push its newsrc to a local (info "(gnus) The
> Gnus Cloud"). When the parent is free, it pulls it in.
>
> Kinks? Any meantime mark 'update' in the parent would be lost: but just
> keeping the Summary open shouldn't matter (Perhaps worked around with
> some advice).

It seems simpler than what that younger-than-I whippersnapper thought:

;; - 's' in *Groups* (to save the newsrc).
;; - Launch other instance:
M-& emacs -Q --daemon=fetcher --load=.gnus.el -e "gnus-child"

;; (If you want to fetch from a server that you're reading, unplug, mark
;; what you want downloaded and 'M-g' (in Summary, to update),
;; beforehand. Then add '-fetch-session' to the 'emacsclient' below.
(set-process-sentinel
  (start-process "emacsclient" "*fetcher*" "emacsclient" "-s" 
    "fetcher" "-e" "(gnus-group-save-newsrc)" "(server-edit)")
  (lambda (process event) 
    (princ (format "Process: %s had the event '%s'" process event))))

M-: (gnus-parent-read-child-newsrc) RET

Unplug ('J j') [1] for any servers updated while you were plugged (close
the server, just to be sure). Then '/ N' or 'M-g' (Summary).

Ta-da!

--

1: I've a patch for nnatom for unplugged operation, which... is
cumbersome to reach atm (let me see). nnrss as well, but that's trivial.

Reply via email to