Subject: bug#17706: 24.4.50; locked file error in rmail-insert-inbox-text

From: Eli Zaretskii <[email-masked]>
Date: Fri, 06 Jun 2014 11:03:44 +0300

> From: Ken Olum <[email-masked]>
> Date: Thu, 05 Jun 2014 16:10:25 -0400
> 
> If I have two invocations of emacs and in one I have modified but not
> saved my RMAIL file, and then I try to read my mail in the other,
> rmail-insert-inbox-text gives the error "RMAIL file ... is locked".  I
> think it should call ask-user-about-lock instead, so I have the
> opportunity to steal the lock and so forth.
> 
> This happens to me because I run emacs on the same server machine from
> home and work, so if I go home without saving my mail file, I will get
> this problem when I tried to read my mail from home.  But it seems to me
> that it has only started happening recently, even though the code in
> rmail-insert-inbox-text has been there a long time.  Previously I always
> got the usual query: "... locked by kdo... (pid ....): (s, q, p, ?)?".
> Perhaps it was formerly trying to modify file earlier in the process,
> before the explicit check at the start of rmail-insert-inbox-text, and
> so generating the usual query.

Can you please give a complete recipe starting with "emacs -Q" in both
sessions?  I tried something I thought you were doing, but couldn't
reproduce it.  I got the "locked by NNNN (pid nnn): (s, q, p, ?)"
message, as you expected.