help-emacs-windows
[Top][All Lists]
Advanced

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

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


From: Tolkin, Steve
Subject: [h-e-w] Getting fakemail to work when I steal a lock
Date: Tue, 16 Dec 2008 18:01:30 -0500

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.
 
Details:
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.

The definition of vc-steal-lock begins: (defun vc-steal-lock (file rev
owner)
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?

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 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
  (cond
    ((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
/bin/mail.
  "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.

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,
Steve
-- 
Steven Tolkin    address@hidden     508-787-9006
Fidelity Investments   400 Puritan Way M3B     Marlborough MA 01752
There is nothing so practical as a good theory.  Comments are by me, 
not Fidelity Investments, its subsidiaries or affiliates.





reply via email to

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