Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* Emacs resident looking for advice when Gnus blocks while fetching news
@ 2019-12-04 14:46 Garjola Dindi
  2019-12-04 15:42 ` Fraga, Eric
  2019-12-04 23:45 ` William Henderson
  0 siblings, 2 replies; 11+ messages in thread
From: Garjola Dindi @ 2019-12-04 14:46 UTC (permalink / raw)
  To: info-gnus-english


Hi,

I have been using Gnus for more than a decade now and I am still
learning useful things to improve my workflow.

Since I live in emacs, my use of Gnus is highly integrated with org-mode
(capture from Gnus, jump to messages from org-mode links, etc.)

One thing that bothers me is the fact that Gnus blocks my emacs when
fetching news, e-mails and RSS feeds (altough I use feed2imap for most
of my feeds).

I understand that some emacs users use 2 different emacs instances, one
for Gnus and another one for the rest. In my case, I am not sure that
that this would solve my issues cleanly because the integration
mentioned above: I may and having conflicts if the same file is open by
both instances.

I am sure I am not the only one in this situation and I am therefore
looking for advice on how to solve or at least enhance the situation.

Thanks in advance.

G.


_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Emacs resident looking for advice when Gnus blocks while fetching news
  2019-12-04 14:46 Emacs resident looking for advice when Gnus blocks while fetching news Garjola Dindi
@ 2019-12-04 15:42 ` Fraga, Eric
  2019-12-04 21:04   ` Garjola Dindi
  2019-12-04 23:45 ` William Henderson
  1 sibling, 1 reply; 11+ messages in thread
From: Fraga, Eric @ 2019-12-04 15:42 UTC (permalink / raw)
  To: Garjola Dindi; +Cc: info-gnus-english

On Wednesday,  4 Dec 2019 at 15:46, Garjola Dindi wrote:
> One thing that bothers me is the fact that Gnus blocks my emacs when
> fetching news, e-mails and RSS feeds (altough I use feed2imap for most
> of my feeds).
>
> I understand that some emacs users use 2 different emacs instances, one

A few years ago now, I used to use 2 Emacs instances for just this
reason.  At that time, my main email server was on the other side of the
planet and (due to geography, time zones, phases of the moon, ... I
really do not know why) retrieving emails could take on the order of
minutes.

More recently, things are more normal and I have gone back to using just
one Emacs instance to avoid the problems you mention (primarily
conflicts in visiting the same files in two instances).  Nevertheless,
some email (& rss etc.) servers do take significant amount of time to
respond.

My solution now is to use group levels more smartly.  By default, "g" in
the Group buffer only retrieves emails from my main server and that is
quick.  If/when I know I have time, I retrieve from all servers by C-u 5
g (say) or by M-g on individual lines in the Group buffer.

You would need to play with gnus-activate-level in particular, I think.

HTH,
eric

-- 
Eric S Fraga via Emacs 27.0.50 & org 9.3 on Debian bullseye/sid

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Emacs resident looking for advice when Gnus blocks while fetching news
  2019-12-04 15:42 ` Fraga, Eric
@ 2019-12-04 21:04   ` Garjola Dindi
  2019-12-05 22:28     ` Fraga, Eric
  0 siblings, 1 reply; 11+ messages in thread
From: Garjola Dindi @ 2019-12-04 21:04 UTC (permalink / raw)
  To: info-gnus-english

On Wed 04-Dec-2019 at 16:42:51 +01, "Fraga, Eric" <e.fraga@ucl.ac.uk> wrote: 
> On Wednesday,  4 Dec 2019 at 15:46, Garjola Dindi wrote:
>> One thing that bothers me is the fact that Gnus blocks my emacs when
>> fetching news, e-mails and RSS feeds (altough I use feed2imap for most
>> of my feeds).
>>
>> I understand that some emacs users use 2 different emacs instances, one
>
[..]
> 
> My solution now is to use group levels more smartly.  By default, "g" in
> the Group buffer only retrieves emails from my main server and that is
> quick.  If/when I know I have time, I retrieve from all servers by C-u 5
> g (say) or by M-g on individual lines in the Group buffer.
>
> You would need to play with gnus-activate-level in particular, I think.

Yes, I have set gnus-activate-level to 1 and level 1 contains only my
main inbox which is a nnmaildir (fed by offlineimap) and I use exactly
what you suggest to retrieve my other messages. I even have an idle
timer to retrieve everything when emacs is idle for a while.

The thing is that, even with that, Gnus is much slower than my
colleague’s mu4e and this is a bit frustrating.

Another thing I have found to make things slow is having an nnmaildir
with lots of messages. I therefore archive the oldest ones and use
mairix to index and query.

Maybe other methods than nnmaildir would be faster?

Anyway, thanks for the hints. If anything else I could do comes to mind,
I will be happy to try it.

G.


_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Emacs resident looking for advice when Gnus blocks while fetching news
  2019-12-04 14:46 Emacs resident looking for advice when Gnus blocks while fetching news Garjola Dindi
  2019-12-04 15:42 ` Fraga, Eric
@ 2019-12-04 23:45 ` William Henderson
  2019-12-09 11:02   ` Garjola Dindi
  1 sibling, 1 reply; 11+ messages in thread
From: William Henderson @ 2019-12-04 23:45 UTC (permalink / raw)
  To: info-gnus-english; +Cc: info-gnus-english

Garjola Dindi <garjola@garjola.net> writes:

> Hi,
>
> I have been using Gnus for more than a decade now and I am still
> learning useful things to improve my workflow.
>
> Since I live in emacs, my use of Gnus is highly integrated with org-mode
> (capture from Gnus, jump to messages from org-mode links, etc.)
>
> One thing that bothers me is the fact that Gnus blocks my emacs when
> fetching news, e-mails and RSS feeds (altough I use feed2imap for most
> of my feeds).
>
> I understand that some emacs users use 2 different emacs instances, one
> for Gnus and another one for the rest. In my case, I am not sure that
> that this would solve my issues cleanly because the integration
> mentioned above: I may and having conflicts if the same file is open by
> both instances.
>
> I am sure I am not the only one in this situation and I am therefore
> looking for advice on how to solve or at least enhance the situation.

OK, so this is my set up

[START FLUXBOX STARTUP INCLUSION]
My ~/.fluxbox/startup includes
 fetchmail -F -d 900 -f ~/.fetchmailrc &
 anymail &
[/START FLUXBOX STARTUP INCLUSION]


[START HOME DIRECTORY INCLUSION:
~/ contains .fetchmailrc
----
poll POPSERVER1 proto pop3 
   user USER1 password "PASSWORD" is MYLINUXSYSTEMUSERNAME here;
   user USER2 password "PASSWORD" is MYLINUXSYSTEMUSERNAME here;
   user USER3 password "PASSWORD" is MYLINUXSYSTEMUSERNAME here;
   user USER4 password "PASSWORD" is MYLINUXSYSTEMUSERNAME here;
   user USER5 password "PASSWORD" is MYLINUXSYSTEMUSERNAME here;
   user USER6 password "PASSWORD" is MYLINUXSYSTEMUSERNAME here;
   user USER7 password "PASSWORD" is MYLINUXSYSTEMUSERNAME here
poll IMAPSERVER1 proto imap
   user USER8 password "PASSWORD" is MYLINUXSYSTEMUSERNAME here   
poll POPSERVER2 proto pop3
   user USER9  password "PASSWORD" is MYLINUXSYSTEMUSERNAME here;
   user USER10 password "PASSWORD" is MYLINUXSYSTEMUSERNAME here;
   user USER11 password "PASSWORD" is MYLINUXSYSTEMUSERNAME here;
   user USER12 password "PASSWORD" is MYLINUXSYSTEMUSERNAME here;
   user USER13 password "PASSWORD" is MYLINUXSYSTEMUSERNAME here;
   user USER14 password "PASSWORD" is MYLINUXSYSTEMUSERNAME here;
   user USER15 password "PASSWORD" is MYLINUXSYSTEMUSERNAME here;
   user USER16 password "PASSWORD" is MYLINUXSYSTEMUSERNAME here;
   user USER17 password "PASSWORD" is MYLINUXSYSTEMUSERNAME here;
   user USER18 password "PASSWORD" is MYLINUXSYSTEMUSERNAME here;
   user USER19 password "PASSWORD" is MYLINUXSYSTEMUSERNAME here
poll POPSERVER3 proto pop3
   user USER20 password "velovelo" is MYLINUXSYSTEMUSERNAME here
[/START HOME DIRECTORY INCLUSION]


[START ROOT INCLUSION]
/root CONTAINS .fetchmailrc
----
poll POPSERVER1 proto pop3 
   user USER1 password "PASSWORD" is MYLINUXSYSTEMUSERNAME here;
   user USER2 password "PASSWORD" is MYLINUXSYSTEMUSERNAME here;
   user USER3 password "PASSWORD" is MYLINUXSYSTEMUSERNAME here;
   user USER4 password "PASSWORD" is MYLINUXSYSTEMUSERNAME here;
   user USER5 password "PASSWORD" is MYLINUXSYSTEMUSERNAME here;
   user USER6 password "PASSWORD" is MYLINUXSYSTEMUSERNAME here;
   user USER7 password "PASSWORD" is MYLINUXSYSTEMUSERNAME here
poll IMAPSERVER1 proto imap
   user USER8 password "PASSWORD" is MYLINUXSYSTEMUSERNAME here   
poll POPSERVER2 proto pop3
   user USER9  password "PASSWORD" is MYLINUXSYSTEMUSERNAME here;
   user USER10 password "PASSWORD" is MYLINUXSYSTEMUSERNAME here;
   user USER11 password "PASSWORD" is MYLINUXSYSTEMUSERNAME here;
   user USER12 password "PASSWORD" is MYLINUXSYSTEMUSERNAME here;
   user USER13 password "PASSWORD" is MYLINUXSYSTEMUSERNAME here;
   user USER14 password "PASSWORD" is MYLINUXSYSTEMUSERNAME here;
   user USER15 password "PASSWORD" is MYLINUXSYSTEMUSERNAME here;
   user USER16 password "PASSWORD" is MYLINUXSYSTEMUSERNAME here;
   user USER17 password "PASSWORD" is MYLINUXSYSTEMUSERNAME here;
   user USER18 password "PASSWORD" is MYLINUXSYSTEMUSERNAME here;
   user USER19 password "PASSWORD" is MYLINUXSYSTEMUSERNAME here
poll POPSERVER3 proto pop3
   user USER20 password "velovelo" is MYLINUXSYSTEMUSERNAME here
[/START ROOT INCLUSION

The .fetchmailrc in /root permits me to occasionally visually see what
is happening and if necessary log in webmail to a particualar server to
fic any snags.

You might get some comments about using "F" when starting fetchmail, but
this works for me.

The above dumps your emails into /var/spool/mail/MYLINUXSYSTEMUSERNAME

It then needs to be broght into GNUS via:
[1] "g"
[2] having in  ~/.gnus the following:
;; AUTOMATICALLY CHECK MAILPERIODICALLY
(add-hook 'gnus-startup-hook
  '(lambda ()
     (gnus-demon-init)
     (setq gnus-demon-timestep 1)  ;; each timestep is 1 second
     ;; Check for new mail every 300 timesteps (5 minute)
     (gnus-demon-add-handler 'gnus-demon-scan-news 300 t)
     (gnus-demon-add-handler 'gnus-demon-scan-mail 300 t)

     ;; Don't crash gnus if disconnected
     (defadvice gnus-demon-scan-news (around gnus-demon-timeout activate)
       "Timeout for Gnus."
       (with-timeout
       (120 (message "Gnus timed out."))
     ad-do-it))))

[ANYMAIL]
IN /usr/local/bin/anymail
----
filename=/var/spool/mail/inconnu
maxsize=0
filesize=$(stat -c%s "$filename")
if (( filesize > maxsize )); then
        xmessage -nearmouse "inconnu HAS MAIL"
else
        xmessage -nearmouse "NO MAIL for inconnu"
fi
[/ANYMAIL]

Hopefully the forgoing might be of some assistance to you.

You can then start other emacs functions with M-x (Like erc, editor,
etc)

ANYMAIL will tell you via xmessage if you have any mail.

-- 
William Henderson
aka Slackrat
http://billh.sdf.org/slackware.jpg
9HS5203 on HamSphere

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Emacs resident looking for advice when Gnus blocks while fetching news
  2019-12-04 21:04   ` Garjola Dindi
@ 2019-12-05 22:28     ` Fraga, Eric
  2019-12-09 11:04       ` Garjola Dindi
  0 siblings, 1 reply; 11+ messages in thread
From: Fraga, Eric @ 2019-12-05 22:28 UTC (permalink / raw)
  To: Garjola Dindi; +Cc: info-gnus-english

On Wednesday,  4 Dec 2019 at 22:04, Garjola Dindi wrote:
> Another thing I have found to make things slow is having an nnmaildir
> with lots of messages. I therefore archive the oldest ones and use
> mairix to index and query.
>
> Maybe other methods than nnmaildir would be faster?

My experience is that nnmaildir does not scale well at all.  nnml is
much faster.

-- 
Eric S Fraga via Emacs 27.0.50 & org 9.2.6 on Debian 9.9

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Emacs resident looking for advice when Gnus blocks while fetching news
  2019-12-04 23:45 ` William Henderson
@ 2019-12-09 11:02   ` Garjola Dindi
  0 siblings, 0 replies; 11+ messages in thread
From: Garjola Dindi @ 2019-12-09 11:02 UTC (permalink / raw)
  To: info-gnus-english

On Thu 05-Dec-2019 at 00:45:26 +01, William Henderson <wmhenderson@freeshell.org> wrote: 

> ;; AUTOMATICALLY CHECK MAILPERIODICALLY
> (add-hook 'gnus-startup-hook
>   '(lambda ()
>      (gnus-demon-init)
>      (setq gnus-demon-timestep 1)  ;; each timestep is 1 second
>      ;; Check for new mail every 300 timesteps (5 minute)
>      (gnus-demon-add-handler 'gnus-demon-scan-news 300 t)
>      (gnus-demon-add-handler 'gnus-demon-scan-mail 300 t)
>
>      ;; Don't crash gnus if disconnected
>      (defadvice gnus-demon-scan-news (around gnus-demon-timeout activate)
>        "Timeout for Gnus."
>        (with-timeout
>        (120 (message "Gnus timed out."))
>      ad-do-it))))
>

Thanks for the detailed information. I am wondering if the use of the
demon does not block emacs?


_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Emacs resident looking for advice when Gnus blocks while fetching news
  2019-12-05 22:28     ` Fraga, Eric
@ 2019-12-09 11:04       ` Garjola Dindi
  2019-12-09 12:19         ` Fraga, Eric
  2019-12-10 11:28         ` Emanuel Berg via info-gnus-english
  0 siblings, 2 replies; 11+ messages in thread
From: Garjola Dindi @ 2019-12-09 11:04 UTC (permalink / raw)
  To: info-gnus-english

On Thu 05-Dec-2019 at 23:28:51 +01, "Fraga, Eric" <e.fraga@ucl.ac.uk> wrote: 
> On Wednesday,  4 Dec 2019 at 22:04, Garjola Dindi wrote:
>> Another thing I have found to make things slow is having an nnmaildir
>> with lots of messages. I therefore archive the oldest ones and use
>> mairix to index and query.
>>
>> Maybe other methods than nnmaildir would be faster?
>
> My experience is that nnmaildir does not scale well at all.  nnml is
> much faster.

Is there a way to convert all my messages from nnmaildir to nnml?


_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Emacs resident looking for advice when Gnus blocks while fetching news
  2019-12-09 11:04       ` Garjola Dindi
@ 2019-12-09 12:19         ` Fraga, Eric
  2019-12-10 11:28         ` Emanuel Berg via info-gnus-english
  1 sibling, 0 replies; 11+ messages in thread
From: Fraga, Eric @ 2019-12-09 12:19 UTC (permalink / raw)
  To: Garjola Dindi; +Cc: info-gnus-english

On Monday,  9 Dec 2019 at 12:04, Garjola Dindi wrote:
> Is there a way to convert all my messages from nnmaildir to nnml?

Not that I am aware of.  Others might chime in to prove me wrong... ;-)

What you can do is go into the nnmaildir group, select all messages, and
then ask to copy them all to an nnml group you have previously
created.  This should work.  You could probably "move" them rather than
copy but I'm always paranoid about losing emails.
-- 
Eric S Fraga via Emacs 27.0.50 & org 9.2.6 on Debian 9.9

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Emacs resident looking for advice when Gnus blocks while fetching news
  2019-12-09 11:04       ` Garjola Dindi
  2019-12-09 12:19         ` Fraga, Eric
@ 2019-12-10 11:28         ` Emanuel Berg via info-gnus-english
  2019-12-10 11:35           ` Emanuel Berg via info-gnus-english
  1 sibling, 1 reply; 11+ messages in thread
From: Emanuel Berg via info-gnus-english @ 2019-12-10 11:28 UTC (permalink / raw)
  To: info-gnus-english

Garjola Dindi wrote:

> Is there a way to convert all my messages
> from nnmaildir to nnml?

What you look for is called respooling.

I've done it several times, one was from Rmail
to nnml, _I think_! ... then a couple of other
times in more creative/exotic ways, but it was
so long ago, and in all my Elisp there is not
a single trace of it... :(

You want respooling from nnmaildir to nnml,
i.e. from one mail spool to another!

I'm pretty sure it exists, but if it doesn't,
congrats, you have found a great spool I mean
spot to start writing a wonderful new algorithm
to Gnus, maybe the longest program ever
written :)

OK, final word: respool

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal


_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Emacs resident looking for advice when Gnus blocks while fetching news
  2019-12-10 11:28         ` Emanuel Berg via info-gnus-english
@ 2019-12-10 11:35           ` Emanuel Berg via info-gnus-english
  2019-12-10 12:01             ` Emanuel Berg via info-gnus-english
  0 siblings, 1 reply; 11+ messages in thread
From: Emanuel Berg via info-gnus-english @ 2019-12-10 11:35 UTC (permalink / raw)
  To: info-gnus-english

>> Is there a way to convert all my messages
>> from nnmaildir to nnml?
>
> What you look for is called respooling. [...]

Just check it out and it doesn't add up, it
seems :(

So it was called something unusual, is all
I can say :))

Maybe I'll grep the web for Rmail -> nnml which
I know exist (?) and see if I can locate it
that way.

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal


_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Emacs resident looking for advice when Gnus blocks while fetching news
  2019-12-10 11:35           ` Emanuel Berg via info-gnus-english
@ 2019-12-10 12:01             ` Emanuel Berg via info-gnus-english
  0 siblings, 0 replies; 11+ messages in thread
From: Emanuel Berg via info-gnus-english @ 2019-12-10 12:01 UTC (permalink / raw)
  To: info-gnus-english

>>> Is there a way to convert all my messages
>>> from nnmaildir to nnml?
>>
>> What you look for is called respooling.
>> [...]
>
> Just check it out and it doesn't add up [...]

Now I've found it! But this paleo-computer
can't view Google Groups. But I have
a smartphone here that can! So I'll just type
my own code... but first:

$ # from <https://dataswamp.org/~incal/conf/.zsh/time>
$ time-from 2013-09-28
6y 2m 12d (2264d)

what that just six years ago? it feels like 15
or 20!!? :O

Anyway the code, and I just type, with one
small change: (beginning-of-line) replaced by
more modern and macho (goto-char (point-min))


(defun gnus-summary-respool-all ()
  (interactive)
  (let ((lines (count-lines (point-min) (point-max))))
    (goto-char (point-min))
    (gnus-summary-respool-article lines
     (gnus-find-method-for-group "nnml:mail.misc") )))


That's right, manually create the NOT
nnml:mail.misc group first :)

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal


_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-12-10 12:01 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-04 14:46 Emacs resident looking for advice when Gnus blocks while fetching news Garjola Dindi
2019-12-04 15:42 ` Fraga, Eric
2019-12-04 21:04   ` Garjola Dindi
2019-12-05 22:28     ` Fraga, Eric
2019-12-09 11:04       ` Garjola Dindi
2019-12-09 12:19         ` Fraga, Eric
2019-12-10 11:28         ` Emanuel Berg via info-gnus-english
2019-12-10 11:35           ` Emanuel Berg via info-gnus-english
2019-12-10 12:01             ` Emanuel Berg via info-gnus-english
2019-12-04 23:45 ` William Henderson
2019-12-09 11:02   ` Garjola Dindi

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 NNTP newsgroup(s).