From unknown Mon Aug 18 11:18:02 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#4616 <4616@debbugs.gnu.org> To: bug#4616 <4616@debbugs.gnu.org> Subject: Status: 23.1.50; empty script files Reply-To: bug#4616 <4616@debbugs.gnu.org> Date: Mon, 18 Aug 2025 18:18:02 +0000 retitle 4616 23.1.50; empty script files reassign 4616 emacs submitter 4616 Markus Rost severity 4616 minor thanks From rost@math.uni-bielefeld.de Fri Oct 2 07:01:40 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 2 Oct 2009 14:01:40 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.1 required=4.0 tests=FOURLA,MURPHY_DRUGS_REL8 autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n92E1bgV028846 for ; Fri, 2 Oct 2009 07:01:40 -0700 Received: from mail.gnu.org ([199.232.76.166]:37571 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1MtihV-00077O-7Q for emacs-pretest-bug@gnu.org; Fri, 02 Oct 2009 10:01:37 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1MtihS-0002bT-Nr for emacs-pretest-bug@gnu.org; Fri, 02 Oct 2009 10:01:36 -0400 Received: from mail1.math.uni-bielefeld.de ([129.70.14.32]:57792) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MtihS-0002bB-DJ for emacs-pretest-bug@gnu.org; Fri, 02 Oct 2009 10:01:34 -0400 Received: from xen12.math.uni-bielefeld.de (xen12.math.uni-bielefeld.de [129.70.14.133]) by mail1.math.uni-bielefeld.de (Postfix) with ESMTP id 46D0895A95; Fri, 2 Oct 2009 16:01:31 +0200 (CEST) Received: by xen12.math.uni-bielefeld.de (Postfix, from userid 3710) id 2998D2865C20; Fri, 2 Oct 2009 16:01:31 +0200 (CEST) To: emacs-pretest-bug@gnu.org Subject: 23.1.50; empty script files From: Markus Rost Message-Id: <20091002140131.2998D2865C20@xen12.math.uni-bielefeld.de> Date: Fri, 2 Oct 2009 16:01:31 +0200 (CEST) X-detected-operating-system: by monty-python.gnu.org: FreeBSD 5.3-5.4 Please write in English if possible, because the Emacs maintainers usually do not have translators to read other languages for them. Your bug report will be posted to the emacs-pretest-bug@gnu.org mailing list. Please describe exactly what actions triggered the bug and the precise symptoms of the bug: Execute an Emacs script file with no actual lisp code in it, like this: ===File ~/x.el============================================== #!/home/rost/build/cvs/emacs/src/emacs --script ============================================================ One gets an error: End of file during parsing: /home/rost/x.el Same problem if the file has some additional ";"-commented lines in it. No problem if there is a single not commented lisp expression in it, like "()". This patch fixes the problem for me: *** lread.c 02 Oct 2009 14:05:54 +0200 1.414 --- lread.c 02 Oct 2009 14:11:36 +0200 *************** *** 2613,2619 **** Skip the first line. */ while (c != '\n' && c >= 0) c = READCHAR; ! goto retry; } if (c == '$') return Vload_file_name; --- 2613,2619 ---- Skip the first line. */ while (c != '\n' && c >= 0) c = READCHAR; ! return Qnil; } if (c == '$') return Vload_file_name; If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. If you would like to further debug the crash, please read the file /home/rost/build/cvs/emacs/etc/DEBUG for instructions. In GNU Emacs 23.1.50.1 (i686-pc-linux-gnu, GTK+ Version 2.16.1) of 2009-10-02 on laptop Windowing system distributor `The X.Org Foundation', version 11.0.10600000 configured using `configure '--prefix=/home/rost/local/cvs'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: C value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Fundamental Minor modes in effect: tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t blink-cursor-mode: t global-auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: M-x r e p SPC o r SPC e m SPC SPC SPC Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Making completion list... Load-path shadows: None found. From rgm@gnu.org Fri Oct 2 17:15:07 2009 Received: (at control) by emacsbugs.donarmstrong.com; 3 Oct 2009 00:15:07 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-5.5 required=4.0 tests=AWL,ONEWORD,VALID_BTS_CONTROL, X_DEBBUGS_NO_ACK autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n930F5Nc028519 for ; Fri, 2 Oct 2009 17:15:06 -0700 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1MtsHB-0002df-2y; Fri, 02 Oct 2009 20:15:05 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19142.38793.26660.496725@fencepost.gnu.org> Date: Fri, 2 Oct 2009 20:15:05 -0400 From: Glenn Morris To: control Subject: control X-Attribution: GM X-Mailer: VM (www.wonderworks.com/vm), GNU Emacs (www.gnu.org/software/emacs) X-Hue: yellow X-Ran: `1HVlPAe]oX58p&Mww>"vcHF148BX1RE=klf?{tlYoKADa1BE*zv; Sat, 3 Oct 2009 09:11:54 -0700 Received: from xen12.math.uni-bielefeld.de (xen12.math.uni-bielefeld.de [129.70.14.133]) by mail2.math.uni-bielefeld.de (Postfix) with ESMTP id 2920173020; Sat, 3 Oct 2009 18:11:47 +0200 (CEST) Received: by xen12.math.uni-bielefeld.de (Postfix, from userid 3710) id 22632288A0AB; Sat, 3 Oct 2009 18:11:47 +0200 (CEST) From: Markus Rost To: 4616@debbugs.gnu.org Subject: Follow-up: handling #! X-GNU-Emacs-Mailer: GNU Emacs 22.3 X-Home-Page: http://www.math.uni-bielefeld.de/~rost Message-Id: <20091003161147.22632288A0AB@xen12.math.uni-bielefeld.de> Date: Sat, 3 Oct 2009 18:11:47 +0200 (CEST) It appears that read1 in lread.c handles "#!" like a comment line starting with ";". Well, except if the "#!"-line is at the *end* of the buffer, then eval-buffer or eval-region will yield an "End of file during parsing" error, similarly as reported in the previous mail. Besides this bug, is it intended to have "#!" as additional comment syntax? I would expect a special handling of "#!" only with --script (cf. -scriptload in startup.el) and only if it appears at the beginning of a file. Normally eval-region should not handle "#!" specially, I guess. From whitebox@nefkom.net Sun Oct 4 01:12:59 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 4 Oct 2009 08:12:59 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.8 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=unavailable version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n948CvfY011319 for ; Sun, 4 Oct 2009 01:12:59 -0700 Received: from mail.gnu.org ([199.232.76.166]:58163 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1MuMDA-0001xT-V5 for emacs-pretest-bug@gnu.org; Sun, 04 Oct 2009 04:12:57 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1MuMD8-0007Fl-Sx for emacs-pretest-bug@gnu.org; Sun, 04 Oct 2009 04:12:56 -0400 Received: from mail-out.m-online.net ([212.18.0.9]:57627) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MuMD8-0007FT-IW for emacs-pretest-bug@gnu.org; Sun, 04 Oct 2009 04:12:54 -0400 Received: from mail01.m-online.net (mail.m-online.net [192.168.3.149]) by mail-out.m-online.net (Postfix) with ESMTP id 72BA81C153BE; Sun, 4 Oct 2009 10:12:51 +0200 (CEST) X-Auth-Info: FoZ+QqxDrj4vfJkRliMTvnkTFC/YkYCwmRKlcuWLKKI= Received: from whitebox.home (DSL01.83.171.152.53.ip-pool.NEFkom.net [83.171.152.53]) by mail.mnet-online.de (Postfix) with ESMTP id BC2629021C; Sun, 4 Oct 2009 10:12:50 +0200 (CEST) Received: by whitebox.home (Postfix, from userid 501) id 5C02D1E536D; Sun, 4 Oct 2009 10:13:03 +0200 (CEST) From: Andreas Schwab To: Markus Rost Cc: 4616@debbugs.gnu.org, emacs-pretest-bug@gnu.org Subject: Re: bug#4616: 23.1.50; empty script files References: <20091002140131.2998D2865C20@xen12.math.uni-bielefeld.de> X-Yow: My CODE of ETHICS is vacationing at famed SCHROON LAKE in upstate New York!! Date: Sun, 04 Oct 2009 10:13:03 +0200 In-Reply-To: <20091002140131.2998D2865C20@xen12.math.uni-bielefeld.de> (Markus Rost's message of "Fri, 2 Oct 2009 16:01:31 +0200 (CEST)") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-CrossAssassin-Score: 2 Markus Rost writes: > Execute an Emacs script file with no actual lisp code in it, like this: > > ===File ~/x.el============================================== > #!/home/rost/build/cvs/emacs/src/emacs --script > > ============================================================ > > One gets an error: > > End of file during parsing: /home/rost/x.el > > Same problem if the file has some additional ";"-commented lines in it. The Emacs Lisp reader always requires at least one sexp in the input. This is independent of the source of the input. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From rost@math.uni-bielefeld.de Sun Oct 4 08:06:27 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 4 Oct 2009 15:06:28 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-1.4 required=4.0 tests=AWL,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=unavailable version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n94F6QVl013964 for ; Sun, 4 Oct 2009 08:06:27 -0700 Received: from mx10.gnu.org ([199.232.76.166]:43891) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1MuSfJ-0006Kn-O3 for emacs-pretest-bug@gnu.org; Sun, 04 Oct 2009 11:06:25 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1MuSfI-0004gM-1Y for emacs-pretest-bug@gnu.org; Sun, 04 Oct 2009 11:06:25 -0400 Received: from mx20.gnu.org ([199.232.41.8]:30528) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MuSfH-0004fK-HH for emacs-pretest-bug@gnu.org; Sun, 04 Oct 2009 11:06:23 -0400 Received: from xen16.math.uni-bielefeld.de ([129.70.14.14]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MuSfF-0001RJ-6w for emacs-pretest-bug@gnu.org; Sun, 04 Oct 2009 11:06:21 -0400 Received: from sonic02.math.uni-bielefeld.de (sonic02.math.uni-bielefeld.de [129.70.14.134]) by xen16.math.uni-bielefeld.de (Postfix) with ESMTP id 4637530072BF; Sun, 4 Oct 2009 17:06:17 +0200 (CEST) Received: by sonic02.math.uni-bielefeld.de (Postfix, from userid 3710) id 5367DEFB40; Sun, 4 Oct 2009 17:06:17 +0200 (CEST) From: Markus Rost To: Andreas Schwab CC: 4616@debbugs.gnu.org, emacs-pretest-bug@gnu.org In-reply-to: (message from Andreas Schwab on Sun, 04 Oct 2009 10:13:03 +0200) Subject: Re: bug#4616: 23.1.50; empty script files X-GNU-Emacs-Mailer: GNU Emacs 22.3 X-Home-Page: http://www.math.uni-bielefeld.de/~rost References: <20091002140131.2998D2865C20@xen12.math.uni-bielefeld.de> Message-Id: <20091004150617.5367DEFB40@sonic02.math.uni-bielefeld.de> Date: Sun, 4 Oct 2009 17:06:17 +0200 (CEST) X-detected-operating-system: by mx20.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-CrossAssassin-Score: 2 > The Emacs Lisp reader always requires at least one sexp in the input. > This is independent of the source of the input. Oh yes. My patch would violate this. But the Emacs Lisp "loader" doesn't require any input. I think, somebody without knowledge of Emacs internals will be surprised that ===File ~/x.el============================================== #!/home/rost/build/cvs/emacs/src/emacs --script ;; (some-valid-elisp-expression) ============================================================ yields an "End of file during parsing" error and returns with positive exit status. And I think, somebody executing pure elisp will be surprised that (read "#!\n(foo)") does not yield an "Invalid read syntax" error. It seems that the basic read function has a *general* feature in order to get --script and the "#!"-syntax working. What about my questions posted here: From rost@math.uni-bielefeld.de Sun Oct 4 20:11:44 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 5 Oct 2009 03:11:44 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-1.5 required=4.0 tests=AWL,FOURLA,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n953BgI7023471 for ; Sun, 4 Oct 2009 20:11:44 -0700 Received: from mail.gnu.org ([199.232.76.166]:35812 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1MudzB-0001cQ-M5 for emacs-pretest-bug@gnu.org; Sun, 04 Oct 2009 23:11:41 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Mudz9-0002ha-F4 for emacs-pretest-bug@gnu.org; Sun, 04 Oct 2009 23:11:41 -0400 Received: from xen16.math.uni-bielefeld.de ([129.70.14.14]:42391) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Mudz8-0002gw-Rp for emacs-pretest-bug@gnu.org; Sun, 04 Oct 2009 23:11:39 -0400 Received: from sonic02.math.uni-bielefeld.de (sonic02.math.uni-bielefeld.de [129.70.14.134]) by xen16.math.uni-bielefeld.de (Postfix) with ESMTP id E8F8F30072BE; Mon, 5 Oct 2009 05:11:36 +0200 (CEST) Received: by sonic02.math.uni-bielefeld.de (Postfix, from userid 3710) id CD61EEFB40; Mon, 5 Oct 2009 05:11:36 +0200 (CEST) From: Markus Rost To: Andreas Schwab CC: 4616@debbugs.gnu.org, emacs-pretest-bug@gnu.org In-reply-to: (message from Andreas Schwab on Sun, 04 Oct 2009 10:13:03 +0200) Subject: Re: bug#4616: 23.1.50; empty script files X-GNU-Emacs-Mailer: GNU Emacs 22.3 X-Home-Page: http://www.math.uni-bielefeld.de/~rost References: <20091002140131.2998D2865C20@xen12.math.uni-bielefeld.de> Message-Id: <20091005031136.CD61EEFB40@sonic02.math.uni-bielefeld.de> Date: Mon, 5 Oct 2009 05:11:36 +0200 (CEST) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) What about the following tentative patch? It moves the handling of '#!' from read1 up to readevalloop, which then would skip the first line if it starts with '#!'. To achieve this, the patch allows the readchar/unreadchar mechanism to look 2 characters ahead, instead of just 1. Omitting ' && first_sexp' in the patch would skip '#!' + rest of line anywhere as before. Be aware that I just made some guesses after glancing briefly over lread.c (and I am not a C-programmer). *** /home/rost/build/cvs/emacs/src/lread.c.~1.414~ 2009-10-05 01:38:28.000000000 +0200 --- /home/rost/build/cvs/emacs/src/lread.c 2009-10-05 04:31:51.000000000 +0200 *************** *** 271,276 **** --- 271,277 ---- a file stream can't handle multibyte-char unreading. The value -1 means that there's no unread character. */ static int unread_char; + static int unread_char1; static int readchar (readcharfun, multibyte) *************** *** 410,415 **** --- 411,422 ---- return XINT (tem); read_multibyte: + if (unread_char1 >= 0) + { + c = unread_char1; + unread_char1 = -1; + return c; + } if (unread_char >= 0) { c = unread_char; *************** *** 489,499 **** } else if (CONSP (readcharfun)) { ! unread_char = c; } else if (EQ (readcharfun, Qlambda)) { ! unread_char = c; } else if (EQ (readcharfun, Qget_file_char) || EQ (readcharfun, Qget_emacs_mule_file_char)) --- 496,512 ---- } else if (CONSP (readcharfun)) { ! if (unread_char >= 0) ! unread_char1 = c; ! else ! unread_char = c; } else if (EQ (readcharfun, Qlambda)) { ! if (unread_char >= 0) ! unread_char1 = c; ! else ! unread_char = c; } else if (EQ (readcharfun, Qget_file_char) || EQ (readcharfun, Qget_emacs_mule_file_char)) *************** *** 505,511 **** UNBLOCK_INPUT; } else ! unread_char = c; } else call1 (readcharfun, make_number (c)); --- 518,527 ---- UNBLOCK_INPUT; } else ! if (unread_char >= 0) ! unread_char1 = c; ! else ! unread_char = c; } else call1 (readcharfun, make_number (c)); *************** *** 1658,1663 **** --- 1674,1680 ---- Lisp_Object start, end; { register int c; + register int c1; register Lisp_Object val; int count = SPECPDL_INDEX (); struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; *************** *** 1747,1752 **** --- 1764,1782 ---- unbind_to (count1, Qnil); break; } + if (c == '#' && first_sexp) + { + c1 = READCHAR; + if (c1 == '!') + { + /* #! appears at the beginning of an executable file. + Skip the first line. */ + while ((c1 = READCHAR) != '\n' && c1 != -1); + goto read_next; + } + else + UNREAD (c1); + } /* Ignore whitespace here, so we can detect eof. */ if (c == ' ' || c == '\t' || c == '\n' || c == '\f' || c == '\r' *************** *** 2607,2620 **** load_each_byte = 0; goto retry; } - if (c == '!') - { - /* #! appears at the beginning of an executable file. - Skip the first line. */ - while (c != '\n' && c >= 0) - c = READCHAR; - goto retry; - } if (c == '$') return Vload_file_name; if (c == '\'') --- 2637,2642 ---- From rost@math.uni-bielefeld.de Tue Oct 6 08:19:55 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 6 Oct 2009 15:19:55 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.0 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n96FJstc018060 for ; Tue, 6 Oct 2009 08:19:55 -0700 Received: from mx10.gnu.org ([199.232.76.166]:59996) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1MvBpR-0002vb-Ho for emacs-pretest-bug@gnu.org; Tue, 06 Oct 2009 11:19:53 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1MvBpP-0003P6-23 for emacs-pretest-bug@gnu.org; Tue, 06 Oct 2009 11:19:53 -0400 Received: from mail1.math.uni-bielefeld.de ([129.70.14.32]:65448) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MvBpO-0003Oq-Id for emacs-pretest-bug@gnu.org; Tue, 06 Oct 2009 11:19:50 -0400 Received: from sonic02.math.uni-bielefeld.de (sonic02.math.uni-bielefeld.de [129.70.14.134]) by mail1.math.uni-bielefeld.de (Postfix) with ESMTP id 2EEA7959A8; Tue, 6 Oct 2009 17:19:49 +0200 (CEST) Received: by sonic02.math.uni-bielefeld.de (Postfix, from userid 3710) id EB62AEFE6F; Tue, 6 Oct 2009 17:19:48 +0200 (CEST) From: Markus Rost To: Andreas Schwab CC: 4616@debbugs.gnu.org, emacs-pretest-bug@gnu.org In-reply-to: (message from Andreas Schwab on Sun, 04 Oct 2009 10:13:03 +0200) Subject: Re: bug#4616: 23.1.50; empty script files X-GNU-Emacs-Mailer: GNU Emacs 22.3 X-Home-Page: http://www.math.uni-bielefeld.de/~rost References: <20091002140131.2998D2865C20@xen12.math.uni-bielefeld.de> Message-Id: <20091006151948.EB62AEFE6F@sonic02.math.uni-bielefeld.de> Date: Tue, 6 Oct 2009 17:19:48 +0200 (CEST) X-detected-operating-system: by monty-python.gnu.org: FreeBSD 5.3-5.4 One more thing about unread_char in lread.c. That variable should start with value -1 rather than value 0. The current initial value 0 means that the character 0 is added in front of loadup.el when building emacs. Now since loadup.el isn't empty, this doesn't cause a read error, the additional character will be just skipped and the value of unread_char is set to -1 after loading loadup.el. So one doesn't notice the wrong initial value. But maybe one changes that for clarity. *** lread.c 06 Oct 2009 14:22:15 +0200 1.414 --- lread.c 06 Oct 2009 17:01:06 +0200 *************** *** 270,276 **** Qlambda, or a cons, we use this to keep an unread character because a file stream can't handle multibyte-char unreading. The value -1 means that there's no unread character. */ ! static int unread_char; static int readchar (readcharfun, multibyte) --- 270,276 ---- Qlambda, or a cons, we use this to keep an unread character because a file stream can't handle multibyte-char unreading. The value -1 means that there's no unread character. */ ! static int unread_char = -1; static int readchar (readcharfun, multibyte) From rost@math.uni-bielefeld.de Thu Oct 8 10:43:42 2009 Received: (at 4616) by emacsbugs.donarmstrong.com; 8 Oct 2009 17:43:43 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.2 required=4.0 tests=AWL,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail2.math.uni-bielefeld.de (mail2.math.uni-bielefeld.de [129.70.14.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n98HhfpE028944 for <4616@emacsbugs.donarmstrong.com>; Thu, 8 Oct 2009 10:43:42 -0700 Received: from sonic02.math.uni-bielefeld.de (sonic02.math.uni-bielefeld.de [129.70.14.134]) by mail2.math.uni-bielefeld.de (Postfix) with ESMTP id A42B57304B; Thu, 8 Oct 2009 19:43:35 +0200 (CEST) Received: by sonic02.math.uni-bielefeld.de (Postfix, from userid 3710) id 11AC9EFE6B; Thu, 8 Oct 2009 19:43:33 +0200 (CEST) From: Markus Rost To: 4616@debbugs.gnu.org Subject: bug#4616: 23.1.50; empty script files X-GNU-Emacs-Mailer: GNU Emacs 22.3 X-Home-Page: http://www.math.uni-bielefeld.de/~rost Message-Id: <20091008174333.11AC9EFE6B@sonic02.math.uni-bielefeld.de> Date: Thu, 8 Oct 2009 19:43:32 +0200 (CEST) What is the best way to implement --script? Let me discuss some possibilities: 1. The current implementation. It consists of the lines if (c == '!') { /* #! appears at the beginning of an executable file. Skip the first line. */ while (c != '\n' && c >= 0) c = READCHAR; goto retry; } in function read1 in lread.c. This is appealing by its brevity. However it has the disadvantage that the basic read function has a *general* feature in order to get --script and the "#!"-syntax working. Further it leads to the bug originally posted: Execution of an empty script file like ===File ~/x.el============================================== #!/home/rost/build/cvs/emacs/src/emacs --script ============================================================ yields an "End of file during parsing" error and returns with positive exit status. 2. One may think of handling --script by first removing a first #!-line before passing the file to load. This seems to be very hard to implement because the load routine is complicated (switching back and forth between C and Elisp functions). Besides this practical problem, there is the following disadvantage: In some circumstances one may want to load a script file directly, as in emacs -batch ... -l ~/x.el ... Moreover, when editing the file one may want to test it with eval-buffer. 3. This leaves the possibility to handle #!-lines when running eval-region. It should skip a #!-line at the beginning of the region. It could skip any #!-line in the region, which is what read1 does right now, but I see no necessity for that. This would be implemented by my two previous patches Of course making a change in readevalloop/read1 needs a careful check, maybe by several people. However, the patch is a very "local" one around the variable unread_char and there are only a few places where unread_char appears, so checking the patch is not too much work. Moreover, if something would be wrong with the change, very likely emacs would not even compile as many files are loaded during the build process. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 25 09:59:15 2020 Received: (at 4616) by debbugs.gnu.org; 25 Aug 2020 13:59:15 +0000 Received: from localhost ([127.0.0.1]:35495 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAZTm-0002sd-SR for submit@debbugs.gnu.org; Tue, 25 Aug 2020 09:59:15 -0400 Received: from quimby.gnus.org ([95.216.78.240]:42122) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAZTj-0002sO-Vh for 4616@debbugs.gnu.org; Tue, 25 Aug 2020 09:59:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ANICBeuFHB7BwtgtV6u15qHNWaYYF0ypXJzCrQpSH+Y=; b=f7bp4esWI8W+RxzLtNy0AG+McS Hcko5J1fdxSoPk0WACQyEuv0uHJGf9VZepDrgNY6zRbsRqrvbdau2RhUuC7iGWgW+44oloLWut+aC xRtKhfMOVHZ8Ms8rWK0agBKwnonR1Qa/Hpes0WlayDFBBErUWmJTZwzpwiEm5sqbhLE0=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kAZTY-0006LB-9r; Tue, 25 Aug 2020 15:59:05 +0200 From: Lars Ingebrigtsen To: Markus Rost Subject: Re: bug#4616: 23.1.50; empty script files References: <20091002140131.2998D2865C20@xen12.math.uni-bielefeld.de> <20091004150617.5367DEFB40@sonic02.math.uni-bielefeld.de> X-Now-Playing: Various's _The Wire Tapper 53_: "Agnes Pe - Composition for gunshot PE63(120bpm)" Date: Tue, 25 Aug 2020 15:58:58 +0200 In-Reply-To: <20091004150617.5367DEFB40@sonic02.math.uni-bielefeld.de> (Markus Rost's message of "Sun, 4 Oct 2009 17:06:17 +0200 (CEST)") Message-ID: <87y2m27rod.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Markus Rost writes: >> The Emacs Lisp reader always requires at least one sexp in the input. >> This is independent of the source of the input. > > Oh yes. My patch would violate this. But the Emacs Lisp "loader" > doesn [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 4616 Cc: Andreas Schwab , 4616@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Markus Rost writes: >> The Emacs Lisp reader always requires at least one sexp in the input. >> This is independent of the source of the input. > > Oh yes. My patch would violate this. But the Emacs Lisp "loader" > doesn't require any input. > > I think, somebody without knowledge of Emacs internals will be > surprised that > > ===File ~/x.el============================================== > #!/home/rost/build/cvs/emacs/src/emacs --script > ;; (some-valid-elisp-expression) > ============================================================ > > yields an "End of file during parsing" error and returns with positive > exit status. It's not quite clear to me what the issue here is. --script requires at least one readable form in the script, and that seems OK to me. Is the problem the exit status? > And I think, somebody executing pure elisp will be surprised that > > (read "#!\n(foo)") > > does not yield an "Invalid read syntax" error. > > It seems that the basic read function has a *general* feature in order > to get --script and the "#!"-syntax working. Heh. That is quite amusing... But can we change that at this point? Presumably Emacs has had this quirk for generations, so perhaps there's some code out there that relies on the accidental comment-ness of #!... -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 25 11:44:12 2020 Received: (at 4616) by debbugs.gnu.org; 25 Aug 2020 15:44:13 +0000 Received: from localhost ([127.0.0.1]:35758 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAb7M-0008GT-Mn for submit@debbugs.gnu.org; Tue, 25 Aug 2020 11:44:12 -0400 Received: from smtp2.math.uni-bielefeld.de ([129.70.45.13]:52610) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAb7K-0008GK-8U for 4616@debbugs.gnu.org; Tue, 25 Aug 2020 11:44:10 -0400 Received: from ssh.math.uni-bielefeld.de (kvm01.math.uni-bielefeld.de [129.70.45.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "ssh.math.uni-bielefeld.de", Issuer "math.uni-bielefeld.de" (verified OK)) by smtp2.math.uni-bielefeld.de (Postfix) with ESMTPS id E908460410; Tue, 25 Aug 2020 17:44:07 +0200 (CEST) Received: by ssh.math.uni-bielefeld.de (Postfix, from userid 3710) id 85B566010C; Tue, 25 Aug 2020 17:44:07 +0200 (CEST) From: Markus Rost To: Lars Ingebrigtsen In-reply-to: <87y2m27rod.fsf@gnus.org> (message from Lars Ingebrigtsen on Tue, 25 Aug 2020 15:58:58 +0200) Subject: Re: bug#4616: 23.1.50; empty script files X-Mail-Tool: GNU Emacs 22.3 X-Home-Page: http://www.math.uni-bielefeld.de/~rost References: <20091002140131.2998D2865C20@xen12.math.uni-bielefeld.de> <20091004150617.5367DEFB40@sonic02.math.uni-bielefeld.de> <87y2m27rod.fsf@gnus.org> Message-Id: <20200825154407.85B566010C@ssh.math.uni-bielefeld.de> Date: Tue, 25 Aug 2020 17:44:07 +0200 (CEST) X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 4616 Cc: schwab@linux-m68k.org, 4616@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > --script requires at least one readable form in the script, and that > seems OK to me. A script with no commands should be valid in any language, in my opinion. As a matter of principle, but also for practical reasons: You may want to comment by chance all code. I think this way the matter appeared to me. You may also want to write a template with all code commented initially. > Is the problem the exit status? I don't think that was my issue. > But can we change that at this point? Frightening prospect... From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 26 05:53:45 2020 Received: (at 4616) by debbugs.gnu.org; 26 Aug 2020 09:53:45 +0000 Received: from localhost ([127.0.0.1]:37394 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAs7l-0005Dz-1g for submit@debbugs.gnu.org; Wed, 26 Aug 2020 05:53:45 -0400 Received: from quimby.gnus.org ([95.216.78.240]:53302) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAs7i-0005Dk-Ca for 4616@debbugs.gnu.org; Wed, 26 Aug 2020 05:53:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=BUWn8CdI9ULRA6BLWcbvK7VfpdbA1sPc7ZTSMikth+w=; b=slxFGA7z91HQE9ZTUEAkNHeX/E Zz1y26FH44JKIC3tLRqumYmb6yf0QDHp2qFK3aCzXkh4gTLFLMho/4FUrlGVFWIrFct4825oZMXT9 kvgopuh9k05eFqDVv4A7FTu4hxBpHrSqPEE7kah3yiWXtYOhxeMITQ/6dVRM84Oi+rnY=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kAs7V-0003tW-TC; Wed, 26 Aug 2020 11:53:35 +0200 From: Lars Ingebrigtsen To: Markus Rost Subject: Re: bug#4616: 23.1.50; empty script files References: <20091002140131.2998D2865C20@xen12.math.uni-bielefeld.de> <20091004150617.5367DEFB40@sonic02.math.uni-bielefeld.de> <87y2m27rod.fsf@gnus.org> <20200825154407.85B566010C@ssh.math.uni-bielefeld.de> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACVBMVEWAjz4/TDT///+A qekiAAAAAWJLR0QCZgt8ZAAAAAd0SU1FB+QIGgkcKnzIoAoAAAFESURBVCjPVVLRqsUwCItQ3x3U /7GwvVuo//8rN45x4A7Gao1J1GFMfM/v8EXrfMfhG3LSEIKhnvB6Rids10FVEs1iqUK5BfxAxl1I FRALRCozCigp7RA2b8zjAzIZ3AGyBMQYXIlVtaAkmEiUjYLCQSRRTXdNqAbq2QVJQlzyUns0puMc 2ymhCxQ8ZE1hOTG4KxKaEIqwmLcSMJCkUmvkY/3FY/OaqWcNHOgsOmNnzKPWOk6Ix2INpeu+ikYc WvTcmfVQgh2+Nd41Ofd42UhdQR27qSPVDsbPQXtLTREpo2tDtxDDux8wE2yOgXu3ZQfBa6XWOwPs 5HSMU/2mU8LMfji3cDrYvZrA06J6w3p7NE98flvgSrb2lFif56H6v81ldEa0N1elve3cvNHqJoyM 9W4tZS+2yIDv+x9gsObMGC9Mpv8B6r1bK52pww8AAAAldEVYdGRhdGU6Y3JlYXRlADIwMjAtMDgt MjZUMDk6Mjg6NDIrMDA6MDBda25aAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIwLTA4LTI2VDA5OjI4 OjQyKzAwOjAwLDbW5gAAAABJRU5ErkJggg== X-Now-Playing: Various's _Kaleidoscope (1)_: "Levitation Orchestra - Odyssey" Date: Wed, 26 Aug 2020 11:53:28 +0200 In-Reply-To: <20200825154407.85B566010C@ssh.math.uni-bielefeld.de> (Markus Rost's message of "Tue, 25 Aug 2020 17:44:07 +0200 (CEST)") Message-ID: <87r1rt3f8n.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Markus Rost writes: >> --script requires at least one readable form in the script, and that >> seems OK to me. > > A script with no commands should be valid in any language, in my > opinion. As a matter of principle, but [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 4616 Cc: schwab@linux-m68k.org, 4616@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Markus Rost writes: >> --script requires at least one readable form in the script, and that >> seems OK to me. > > A script with no commands should be valid in any language, in my > opinion. As a matter of principle, but also for practical reasons: > You may want to comment by chance all code. I think this way the > matter appeared to me. You may also want to write a template with all > code commented initially. Sure, that's true. I think the way to fix this is to tell the reader that we're reading from a script file and then do the appropriate thing instead of altering the reader unconditionally. That is, if (argmatch (argv, argc, "-script", "--script", 3, &junk, &skip_args)) { noninteractive = 1; /* Set batch mode. */ in emacs.c should set some global variable, and then readevalloop (I think?) shouldn't signal an error if it turns out that there are no forms to read. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 10 07:45:34 2022 Received: (at 4616) by debbugs.gnu.org; 10 Feb 2022 12:45:34 +0000 Received: from localhost ([127.0.0.1]:54260 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nI8pK-0000cp-Ik for submit@debbugs.gnu.org; Thu, 10 Feb 2022 07:45:34 -0500 Received: from quimby.gnus.org ([95.216.78.240]:48430) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nI8pJ-0000cX-2A for 4616@debbugs.gnu.org; Thu, 10 Feb 2022 07:45:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=0nE4RFcXMC7eTQyU1IDxeixb5+K6AFPoC4YuSpVxbos=; b=NnG6KiEPLb7s2uQOXsqgolbLdd g+XOEJLlcSkpYbfSheloT/eFB/ZkfJUy7yASDrG/wKo2L8q1yyXj91klTqCayedR0HKWsnccjGwMb HnpjKGuYcz/xUsK02DfHZuSP7C8GLYEjA+783BmAgXOU/QjV0su4vyhmJhOlwxD0qfdY=; Received: from [84.212.220.105] (helo=giant) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nI8p9-0006cg-7D; Thu, 10 Feb 2022 13:45:25 +0100 From: Lars Ingebrigtsen To: Markus Rost Subject: Re: bug#4616: 23.1.50; empty script files References: <20091002140131.2998D2865C20@xen12.math.uni-bielefeld.de> <20091004150617.5367DEFB40@sonic02.math.uni-bielefeld.de> <87y2m27rod.fsf@gnus.org> <20200825154407.85B566010C@ssh.math.uni-bielefeld.de> <87r1rt3f8n.fsf@gnus.org> X-Now-Playing: Betty Davis's _They Say I'm Different_: "Shoo-B-Doop and Cop Him" Date: Thu, 10 Feb 2022 13:45:22 +0100 In-Reply-To: <87r1rt3f8n.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 26 Aug 2020 11:53:28 +0200") Message-ID: <87o83e7uvx.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Lars Ingebrigtsen writes: > I think the way to fix this is to tell the reader that we're reading > from a script file and then do the appropriate thing instead of altering > the reader unconditionally. That is, > > if (argmatc [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 4616 Cc: schwab@linux-m68k.org, 4616@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Lars Ingebrigtsen writes: > I think the way to fix this is to tell the reader that we're reading > from a script file and then do the appropriate thing instead of altering > the reader unconditionally. That is, > > if (argmatch (argv, argc, "-script", "--script", 3, &junk, &skip_args)) > { > noninteractive = 1; /* Set batch mode. */ > > in emacs.c should set some global variable, and then readevalloop (I > think?) shouldn't signal an error if it turns out that there are no > forms to read. I implemented this a different way in Emacs 29, so this problem has now been fixed. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 10 07:45:40 2022 Received: (at control) by debbugs.gnu.org; 10 Feb 2022 12:45:40 +0000 Received: from localhost ([127.0.0.1]:54263 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nI8pQ-0000d9-Im for submit@debbugs.gnu.org; Thu, 10 Feb 2022 07:45:40 -0500 Received: from quimby.gnus.org ([95.216.78.240]:48448) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nI8pN-0000ci-O5 for control@debbugs.gnu.org; Thu, 10 Feb 2022 07:45:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=pg1aDEUl6dnMP61KvONvxOFngd/+qmsaow9GL8p22Jg=; b=j2Hvob0K4t5ImdvOND3jHSV4BJ kWVM+JLKtqbf/P2hu/5QMOhGldjzm9j1G4Ci4NICdckboiqrZ4w0olSsoHFrhTwtxgVTEXR0r/iBU OBhhuD4hHGb7e40ZsCj9goISXyYMz7Xdz2/hwzX7Vg+knBx5AC4V3px68G5YH7c2A5GY=; Received: from [84.212.220.105] (helo=giant) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nI8pF-0006cp-DY for control@debbugs.gnu.org; Thu, 10 Feb 2022 13:45:31 +0100 Date: Thu, 10 Feb 2022 13:45:28 +0100 Message-Id: <87mtiy7uvr.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #4616 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 4616 29.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 4616 29.1 quit From unknown Mon Aug 18 11:18:02 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 11 Mar 2022 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator