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

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

Emacs exit (return) code?


From: J.D. Baldwin
Subject: Emacs exit (return) code?
Date: Thu, 10 Oct 2002 19:09:14 +0000 (UTC)

I am having an odd problem.  In one case it is inconsequential, in
another it is an impediment to the work I'd like to be doing.

The problem is that Emacs returns a nonzero exit code upon exit when
it is invoked from another program, if I have ever canceled a command
from within Emacs with ^G.

For example, if I send a mail message in mutt (version 1.4i, running
on NetBSD 1.6) and I never use ^G, I exit with no problem at all.  If
I ever once use ^G during my session, mutt shows the following error
message upon exit:

    Error running "/usr/local/bin/emacs '/var/tmp/msgfile'"!

That one is no big deal, as I don't lose work, but the next one is a
bit of a problem for me.  I observe the same behavior with the sudo
utility "visudo" (version 1.6.3p7 running on either Solaris 7 or 8).
If I edit a file and never hit ^G, my changes are accepted.  If I ever
hit ^G during my session, I get this message:

    visudo: Editor (/opt/local/bin/emacs) failed with exit status 53248, \
                 /etc/sudoers unchanged.

In that case, my changes are rejected without giving me a chance to
recover them.  (Yes, I know this is brain damage on the part of sudo,
but I can't fix that just now.)

So my questions are:

1. What causes this? and

2. Is there a way to suppress this behavior?

I'm using Emacs 20.7.1 in all cases.
-- 
  _+_ From the catapult of |If anyone disagrees with any statement I make, I
_|70|___:)=}- J.D. Baldwin |am quite prepared not only to retract it, but also
\      /  baldwin@panix.com|to deny under oath that I ever made it. -T. Lehrer
***~~~~-----------------------------------------------------------------------


reply via email to

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