all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Multiple Gnus running at the same time
@ 2005-01-03 23:12 Stefan Monnier
  2005-01-03 23:19 ` Simon Josefsson
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2005-01-03 23:12 UTC (permalink / raw)



1 - Let's say I have a Gnus running somewhere for a long time and I forget
    about it.  Let's call it Gnus-1.
2 - Now I launch a new Emacs process, run Gnus in it (call it Gnus-2).
3 - Read some email and news in Gnus-2.
4 - quit Gnus-2.
5 - get hit by a truck and suddenly remember that there was
    a Gnus-1 running.
6 - read email and news with Gnus-1, including using `s' to save the state.

In step 6, things may look pretty odd (at least with imap folders, running
Emacs-CVS's version of Gnus, when entering a folder I see for example
entries in the summary for messages which aren't there any more), but at no
time will Gnus warn me about the fact that some other process has messed
with my .newsrc.eld file.

Given the behavior of Emacs in general when saving a file that was modified
by some external process, I'd expect that in step 6, when saving with `s',
Gnus should prompt me that the .newsrc.eld file has changed since
last visited.


        Stefan

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

* Re: Multiple Gnus running at the same time
  2005-01-03 23:12 Multiple Gnus running at the same time Stefan Monnier
@ 2005-01-03 23:19 ` Simon Josefsson
  2005-01-03 23:53   ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Simon Josefsson @ 2005-01-03 23:19 UTC (permalink / raw)
  Cc: bugs, emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> 1 - Let's say I have a Gnus running somewhere for a long time and I forget
>     about it.  Let's call it Gnus-1.
> 2 - Now I launch a new Emacs process, run Gnus in it (call it Gnus-2).
> 3 - Read some email and news in Gnus-2.
> 4 - quit Gnus-2.
> 5 - get hit by a truck and suddenly remember that there was
>     a Gnus-1 running.
> 6 - read email and news with Gnus-1, including using `s' to save the state.
>
> In step 6, things may look pretty odd (at least with imap folders, running
> Emacs-CVS's version of Gnus, when entering a folder I see for example
> entries in the summary for messages which aren't there any more), but at no
> time will Gnus warn me about the fact that some other process has messed
> with my .newsrc.eld file.

Seeing summary entries for messages that aren't there any more suggest
a bug in the agent cache, unless you have disabled it.  FWIW, I'm
seeing this too, but haven't had time to fix it.  You can `rm -rf
~/News/agent/nnimap/SERVER/GROUP' (even when Gnus is running) and
things will be back to normal.

What other things looked odd?  Users are often surprised that the
unread count in the group buffer is inaccurate, but this is actually a
documented behavior (it is an estimate, and can be wrong).  Changing
this would be nice, but may involve some work.  Pressing M-g on the
group fixes things.

> Given the behavior of Emacs in general when saving a file that was modified
> by some external process, I'd expect that in step 6, when saving with `s',
> Gnus should prompt me that the .newsrc.eld file has changed since
> last visited.

Or Gnus should handle when more than one instance is running at the
same time.  Some changes have been made to allow this (moving marks
from .newsrc.eld was the first step), but there is still more to do.

Warning seem like a good solution meanwhile.

I think 's' simply overwrite the .newsrc.eld, the file is not normally
visited, which would trigger Emacs' locking code.

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

* Re: Multiple Gnus running at the same time
  2005-01-03 23:19 ` Simon Josefsson
@ 2005-01-03 23:53   ` Stefan Monnier
  2005-01-04  2:05     ` Andreas Schwab
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2005-01-03 23:53 UTC (permalink / raw)
  Cc: bugs, emacs-devel

> Seeing summary entries for messages that aren't there any more suggest
> a bug in the agent cache, unless you have disabled it.  FWIW, I'm
> seeing this too, but haven't had time to fix it.  You can `rm -rf
> ~/News/agent/nnimap/SERVER/GROUP' (even when Gnus is running) and
> things will be back to normal.

Well, I spent half an hour "going through" (i.e. selecting them only to see
them immediately marked as missing) all those messages instead ;-)

> What other things looked odd?

That's the only thing I noticed.  But I haven't looked for surprises.
Once I understood that I had run 2 instances at the same time, I just
expected the unexpected and didn't pay any more attention.

> Users are often surprised that the unread count in the group buffer is
> inaccurate, but this is actually a documented behavior (it is an estimate,
> and can be wrong).

Yes, I'm familiar with this aspect.

> Or Gnus should handle when more than one instance is running at the
> same time.

That's one way, but I'd probably be just as happy if Gnus followed the usual
"file locking" discipline of Emacs (so it would warn even before saving, as
soon as simultaneous changes are made).

> I think 's' simply overwrite the .newsrc.eld, the file is not normally
> visited, which would trigger Emacs' locking code.

Yesm that's what it looks like.  It would be great to take advantage of
Emacs's locking code.


        Stefan

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

* Re: Multiple Gnus running at the same time
  2005-01-03 23:53   ` Stefan Monnier
@ 2005-01-04  2:05     ` Andreas Schwab
  2005-01-04 14:20       ` Stefan
  0 siblings, 1 reply; 5+ messages in thread
From: Andreas Schwab @ 2005-01-04  2:05 UTC (permalink / raw)
  Cc: emacs-devel, bugs, Simon Josefsson

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> Or Gnus should handle when more than one instance is running at the
>> same time.
>
> That's one way, but I'd probably be just as happy if Gnus followed the usual
> "file locking" discipline of Emacs (so it would warn even before saving, as
> soon as simultaneous changes are made).

Gnus nomally asks you at startup whether you want to load the auto-save
file of .newsrc-dribble when it exists.  When it doesn't exist, there are
no unsaved changes and nothing to be locked, I think.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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

* Re: Multiple Gnus running at the same time
  2005-01-04  2:05     ` Andreas Schwab
@ 2005-01-04 14:20       ` Stefan
  0 siblings, 0 replies; 5+ messages in thread
From: Stefan @ 2005-01-04 14:20 UTC (permalink / raw)
  Cc: emacs-devel, bugs, Simon Josefsson

> Gnus nomally asks you at startup whether you want to load the auto-save
> file of .newsrc-dribble when it exists.  When it doesn't exist, there are
> no unsaved changes and nothing to be locked, I think.

I very often run Gnus from an SSH session and that session often gets
terminated at random times, so I get a .newsrc-dribble all the time, even
though I only very rarely run two Gnus sessions at the same time.

I.e. the .newsrc-dribble thingy is like the autosave file #foo# but not
like the lock file .#foo, even though the two are somewhat related.


        Stefan

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

end of thread, other threads:[~2005-01-04 14:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-03 23:12 Multiple Gnus running at the same time Stefan Monnier
2005-01-03 23:19 ` Simon Josefsson
2005-01-03 23:53   ` Stefan Monnier
2005-01-04  2:05     ` Andreas Schwab
2005-01-04 14:20       ` Stefan

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.