[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[h-e-w] Re: Getting fakemail to work when I steal a lock

From: Kevin Rodgers
Subject: [h-e-w] Re: Getting fakemail to work when I steal a lock
Date: Wed, 17 Dec 2008 21:53:48 -0700
User-agent: Thunderbird (Macintosh/20081105)

Tolkin, Steve wrote:
Summary:  Sometimes emacs asks me if I want to steal a lock on a file
controlled by RCS.  When I say yes I want it to run the fakemail
program, instead of starting my real email program (Outlook).  This used
to work in gnu emacs version 21, but does not work in version 22.3.1 on
Windows XP.
I use emacs and RCS on my PC.  For reasons unknown to me (I work at a
large company) sometimes the value of the USERNAME environment variable
starts with a capital letter, e.g. A123, and sometimes it starts with a
lower case letter, e.g., a123.  If I have a lock on a file and the case
is different I get prompted by emacs: "Steal the lock on %s from %s?"
from vc-steal-lock in vc.el in emacs/lisp .
When I say yes I want this to just run the fakemail.exe program.  That
is what happened in emacs version 22.  Now it launches Outlook, which
creates a new email message, and pastes some text into it.  This has the
side effect of removing any text I had copied to the clipboard. And then
I need to cancel that message.

What does `C-h v mail-user-agent' show?

The definition of vc-steal-lock begins: (defun vc-steal-lock (file rev
but I cannot figure out where the value of owner comes from.
The body of vc-steal-lock contains: (vc-call steal-lock file rev)
But I cannot find where steal-lock is defined.

In vc-rcs.el there is this function: (defun vc-rcs-steal-lock (file
&optional rev)
But I cannot see how this relates to vc-steal-lock -- does it invoke it?
Override it?  Get called by it?

vc-steal-lock -> vc-call -> vc-call-backend -> vc-rcs-steal-lock

I am not sure that it is the USERNAME variable that RCS (or emacs) uses
to determine whether I am trying to steal the lock. Running strings on
these programs did not get any matches:
strings diff.exe co.exe ci.exe rcsdiff.exe | grep -i user

I'd keep investigating the Emacs interface (VC) before digging into RCS
itself.  The relevant function is vc-rcs-state-heuristic, which is
pretty complicated.

Could your problem be something as simple as case-fold-search being set
to nil, either globally, in the source file buffer, or in some VC buffer?

I tried using setenv inside of emacs to change USERNAME but that caused
a variety of other problems.
I had a fakemail.exe in my c:\bin which is the first one found in my
PATH.  I made that fakemail.exe a long time ago by copying clear.exe
which was a small program that just returns 0 (I think).

Based on the following code in feedmail.el I added copies of
fakemail.exe to c:\emacs\bin and c:\emacs\etc but it did not help solve
the problem.
(defcustom sendmail-program
    ((file-exists-p "/usr/sbin/sendmail") "/usr/sbin/sendmail")
    ((file-exists-p "/usr/lib/sendmail") "/usr/lib/sendmail")
    ((file-exists-p "/usr/ucblib/sendmail") "/usr/ucblib/sendmail")
    (t "fakemail"))                   ;In ../etc, to interface to
  "Program used to send messages."

In emacs I asked for the value of the variable sendmail-program by C-h v
and it says:
sendmail-program is a variable defined in `sendmail.el'.
Its value is "fakemail"
I do not even know if feedmail.el is used, because it opens Outlook to
send the mail.

compose-mail ->  (get mail-user-agent 'composefunc)

I am currently running: "GNU Emacs 22.3.1 (i386-mingw-nt5.1.2600) of
2008-09-06 on SOFT-MJASON" on Windows XP SP3.

P.S.  I would appreciate any suggestions about why USERNAME sometimes
has a different case, and what to do about that, because that is the
"root cause" of the problem.

Thanks in advance,

Kevin Rodgers
Denver, Colorado, USA

reply via email to

[Prev in Thread] Current Thread [Next in Thread]