From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jens Schmidt Newsgroups: gmane.emacs.devel Subject: Re: Emacs script options Date: Sun, 19 Nov 2023 22:39:09 +0100 Message-ID: <24ea16b3-e3e7-457b-99b9-3f3805de3f66@vodafonemail.de> References: <1325582.1700277236@archlinux> <8734x2zwnc.fsf@whxvd.name> <7953.1700336960@archlinux> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10329"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: emacs-devel@gnu.org To: Greg Minshall , Sebastian Miele Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Nov 19 22:39:54 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1r4pWD-0002T3-0J for ged-emacs-devel@m.gmane-mx.org; Sun, 19 Nov 2023 22:39:53 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r4pW0-00023O-Hs; Sun, 19 Nov 2023 16:39:40 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r4pVy-00023D-VN for emacs-devel@gnu.org; Sun, 19 Nov 2023 16:39:39 -0500 Original-Received: from mr4.vodafonemail.de ([145.253.228.164]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r4pVx-0005Y3-2i for emacs-devel@gnu.org; Sun, 19 Nov 2023 16:39:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de; s=vfde-mb-mr2-23sep; t=1700429964; bh=Pe0i6JWCP9pXvTSfIPsUUIim/ZIyGq8tm0aC4MXUZ90=; h=Message-ID:Date:User-Agent:Subject:Content-Language:To:References: From:In-Reply-To:Content-Type:From; b=MXGvzz2nIy5WwFKOpDC0hZ5WqDKMY/Vgahi7xeP9PTJyxjUSAFEpkOA/DBx0Ni3pc H7BQ5QiW6QahmVvHScDFWwl8dlgGaQJFaBYK8pD0yOZwDPovB4oD3XTxOweZnLXZ7Y 3R7oCkAwEmUemnL8azSBZGVcVO/bGK1WbLxTI2SI= Original-Received: from smtp.vodafone.de (unknown [10.0.0.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mr4.vodafonemail.de (Postfix) with ESMTPS id 4SYPDC5zrhz1y3l; Sun, 19 Nov 2023 21:39:23 +0000 (UTC) Original-Received: from [192.168.178.41] (port-92-196-116-135.dynamic.as20676.net [92.196.116.135]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp.vodafone.de (Postfix) with ESMTPSA id 4SYPD13M7mz9rxZ; Sun, 19 Nov 2023 21:39:10 +0000 (UTC) Content-Language: de-DE-frami, en-US In-Reply-To: <7953.1700336960@archlinux> X-purgate-type: clean X-purgate: clean X-purgate-size: 915 X-purgate-ID: 155817::1700429959-817FD816-CFD51D3B/0/0 Received-SPF: pass client-ip=145.253.228.164; envelope-from=jschmidt4gnu@vodafonemail.de; helo=mr4.vodafonemail.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:313022 Archived-At: On 2023-11-18 20:49, Greg Minshall wrote: > one could also *imagine* (i.e., i think this could work) a packaging > step that would turn one's elisp script into a string and embed it > inside a "#!/bin/sh" script that would unquote the string and feed it > (along with the command line arguments) to Emacs. if that worked, it at > least would remove the minor hurdle of needing the custom interpreter > you suggest (since everything -- in my fantaxy -- would be in one file). > it seems very messy, though. What about this one, which nicely plays with the meaning of ";" in Emacs and the Bourne shell: ------------------------- test ------------------------- #!/bin/sh : ; exec emacs --script "$0" -- "$@" (message "%S" command-line-args-left) ------------------------- test ------------------------- Might not be very portable. And I couldn't cram the lexical-bindings line in, yet.