all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kevin Rodgers <kevin.d.rodgers@gmail.com>
To: help-gnu-emacs@gnu.org
Cc: help-emacs-windows@gnu.org, help-rcs@gnu.org
Subject: Re: Getting fakemail to work when I steal a lock
Date: Wed, 17 Dec 2008 21:53:48 -0700	[thread overview]
Message-ID: <gicl0r$lmg$1@ger.gmane.org> (raw)
In-Reply-To: <CCBB2AF0BE77844C8312AD45EBDF24E8047220FB@MSGBOSCLP2WIN.DMN1.FMR.COM>

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

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

> 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?

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
>   (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.

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,
> Steve


-- 
Kevin Rodgers
Denver, Colorado, USA





      reply	other threads:[~2008-12-18  4:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-16 23:01 Getting fakemail to work when I steal a lock Tolkin, Steve
2008-12-18  4:53 ` Kevin Rodgers [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='gicl0r$lmg$1@ger.gmane.org' \
    --to=kevin.d.rodgers@gmail.com \
    --cc=help-emacs-windows@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    --cc=help-rcs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.