all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Markus Rost <rost@math.uni-bielefeld.de>
Cc: Andreas Schwab <schwab@linux-m68k.org>, 4616@debbugs.gnu.org
Subject: bug#4616: 23.1.50; empty script files
Date: Tue, 25 Aug 2020 15:58:58 +0200	[thread overview]
Message-ID: <87y2m27rod.fsf@gnus.org> (raw)
In-Reply-To: <20091004150617.5367DEFB40@sonic02.math.uni-bielefeld.de> (Markus Rost's message of "Sun, 4 Oct 2009 17:06:17 +0200 (CEST)")

Markus Rost <rost@math.uni-bielefeld.de> 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





  parent reply	other threads:[~2020-08-25 13:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-02 14:01 bug#4616: 23.1.50; empty script files Markus Rost
     [not found] ` <m2k4zbmvao.fsf@whitebox.home>
2009-10-05  3:11   ` Markus Rost
2009-10-06 15:19   ` Markus Rost
     [not found]   ` <20091004150617.5367DEFB40@sonic02.math.uni-bielefeld.de>
2020-08-25 13:58     ` Lars Ingebrigtsen [this message]
2020-08-25 15:44       ` Markus Rost
2020-08-26  9:53         ` Lars Ingebrigtsen
2022-02-10 12:45           ` Lars Ingebrigtsen
  -- strict thread matches above, loose matches on Subject: below --
2009-10-08 17:43 Markus Rost

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=87y2m27rod.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=4616@debbugs.gnu.org \
    --cc=rost@math.uni-bielefeld.de \
    --cc=schwab@linux-m68k.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.