GNU bug report logs - #31552
27.0.50; Document that Emacs in batch mode exits with exit status -1 on error

Previous Next

Package: emacs;

Reported by: Philipp <p.stephani2 <at> gmail.com>

Date: Tue, 22 May 2018 13:42:01 UTC

Severity: minor

Tags: fixed

Found in version 27.0.50

Fixed in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 31552 in the body.
You can then email your comments to 31552 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#31552; Package emacs. (Tue, 22 May 2018 13:42:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Philipp <p.stephani2 <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 22 May 2018 13:42:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Philipp <p.stephani2 <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.0.50;
 Document that Emacs in batch mode exits with exit status -1 on error
Date: Tue, 22 May 2018 15:41:25 +0200
I haven't found any documentation in the Lisp reference manual that the
exit status of an Emacs process exiting due to a nonlocal exit is -1 by
default (adjusted to 255 by Bash).  This should be documented, for users
that run Emacs in batch mode.


In GNU Emacs 27.0.50 (build 68, x86_64-apple-darwin17.4.0, NS appkit-1561.20 Version 10.13.3 (Build 17D102))
 of 2018-05-22 built on p
Repository revision: 19e642fdb07b0b6522983e2fa35872ba5fb9f75e
Windowing system distributor 'Apple', version 10.3.1561
System Description:  Mac OS X 10.13.3

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Configured using:
 'configure --with-modules --without-pop --with-mailutils
 --enable-gcc-warnings=yes --enable-checking
 --enable-check-lisp-object-type 'CFLAGS=-ggdb3 -O0''

Configured features:
NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS
JSON

Important settings:
  value of $LANG: de_DE.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv
bytecomp byte-compile cconv dired dired-loaddefs format-spec rfc822 mml
easymenu mml-sec password-cache epa derived epg epg-config gnus-util
rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils time-date elec-pair
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core term/tty-colors frame cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote kqueue cocoa ns
multi-tty make-network-process emacs)

Memory information:
((conses 16 204643 7390)
 (symbols 48 20009 1)
 (miscs 40 56 139)
 (strings 32 28865 2011)
 (string-bytes 1 773342)
 (vectors 16 35280)
 (vector-slots 8 721688 13494)
 (floats 8 51 65)
 (intervals 56 210 0)
 (buffers 992 11))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31552; Package emacs. (Tue, 22 May 2018 17:18:02 GMT) Full text and rfc822 format available.

Message #8 received at 31552 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Philipp <p.stephani2 <at> gmail.com>
Cc: 31552 <at> debbugs.gnu.org
Subject: Re: bug#31552: 27.0.50;
 Document that Emacs in batch mode exits with exit status -1 on error
Date: Tue, 22 May 2018 20:16:58 +0300
> From: Philipp <p.stephani2 <at> gmail.com>
> Date: Tue, 22 May 2018 15:41:25 +0200
> 
> I haven't found any documentation in the Lisp reference manual that the
> exit status of an Emacs process exiting due to a nonlocal exit is -1 by
> default (adjusted to 255 by Bash).  This should be documented, for users
> that run Emacs in batch mode.

I'm not sure I understand what you are describing.  Can you show a
reproducer?

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31552; Package emacs. (Tue, 22 May 2018 17:21:01 GMT) Full text and rfc822 format available.

Message #11 received at 31552 <at> debbugs.gnu.org (full text, mbox):

From: Philipp Stephani <p.stephani2 <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 31552 <at> debbugs.gnu.org
Subject: Re: bug#31552: 27.0.50; Document that Emacs in batch mode exits with
 exit status -1 on error
Date: Tue, 22 May 2018 19:19:54 +0200
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> schrieb am Di., 22. Mai 2018 um 19:17 Uhr:

> > From: Philipp <p.stephani2 <at> gmail.com>
> > Date: Tue, 22 May 2018 15:41:25 +0200
> >
> > I haven't found any documentation in the Lisp reference manual that the
> > exit status of an Emacs process exiting due to a nonlocal exit is -1 by
> > default (adjusted to 255 by Bash).  This should be documented, for users
> > that run Emacs in batch mode.
>
> I'm not sure I understand what you are describing.  Can you show a
> reproducer?
>
>
$ src/emacs -Q -batch -eval '(error "foo")' ; echo $?

foo
255
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31552; Package emacs. (Sat, 12 Oct 2019 21:17:02 GMT) Full text and rfc822 format available.

Message #14 received at 31552 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Philipp Stephani <p.stephani2 <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 31552 <at> debbugs.gnu.org
Subject: Re: bug#31552: 27.0.50; Document that Emacs in batch mode exits
 with exit status -1 on error
Date: Sat, 12 Oct 2019 23:16:03 +0200
Philipp Stephani <p.stephani2 <at> gmail.com> writes:

> Eli Zaretskii <eliz <at> gnu.org> schrieb am Di., 22. Mai 2018 um 19:17 Uhr:
>
>  > From: Philipp <p.stephani2 <at> gmail.com>
>  > Date: Tue, 22 May 2018 15:41:25 +0200
>  > 
>  > I haven't found any documentation in the Lisp reference manual that the
>  > exit status of an Emacs process exiting due to a nonlocal exit is -1 by
>  > default (adjusted to 255 by Bash).  This should be documented, for users
>  > that run Emacs in batch mode.
>
>  I'm not sure I understand what you are describing.  Can you show a
>  reproducer?
>
> $ src/emacs -Q -batch -eval '(error "foo")' ; echo $?
>
> foo
>
> 255 

I've now added something like this to the Emacs 27 manual.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 12 Oct 2019 21:17:03 GMT) Full text and rfc822 format available.

bug marked as fixed in version 27.1, send any further explanations to 31552 <at> debbugs.gnu.org and Philipp <p.stephani2 <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 12 Oct 2019 21:17:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31552; Package emacs. (Sun, 13 Oct 2019 16:11:02 GMT) Full text and rfc822 format available.

Message #21 received at 31552 <at> debbugs.gnu.org (full text, mbox):

From: Philipp Stephani <p.stephani2 <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 31552 <at> debbugs.gnu.org
Subject: Re: bug#31552: 27.0.50; Document that Emacs in batch mode exits with
 exit status -1 on error
Date: Sun, 13 Oct 2019 18:10:00 +0200
Am Sa., 12. Okt. 2019 um 23:16 Uhr schrieb Lars Ingebrigtsen <larsi <at> gnus.org>:
>
> Philipp Stephani <p.stephani2 <at> gmail.com> writes:
>
> > Eli Zaretskii <eliz <at> gnu.org> schrieb am Di., 22. Mai 2018 um 19:17 Uhr:
> >
> >  > From: Philipp <p.stephani2 <at> gmail.com>
> >  > Date: Tue, 22 May 2018 15:41:25 +0200
> >  >
> >  > I haven't found any documentation in the Lisp reference manual that the
> >  > exit status of an Emacs process exiting due to a nonlocal exit is -1 by
> >  > default (adjusted to 255 by Bash).  This should be documented, for users
> >  > that run Emacs in batch mode.
> >
> >  I'm not sure I understand what you are describing.  Can you show a
> >  reproducer?
> >
> > $ src/emacs -Q -batch -eval '(error "foo")' ; echo $?
> >
> > foo
> >
> > 255
>
> I've now added something like this to the Emacs 27 manual.

Thanks.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 11 Nov 2019 12:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 161 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.