From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Emacs script options Date: Sat, 18 Nov 2023 18:20:56 +0200 Message-ID: <83cyw7m3rr.fsf@gnu.org> References: <1325582.1700277236@archlinux> <83cyw7o6m3.fsf@gnu.org> <1496758.1700318304@archlinux> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16762"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Greg Minshall Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Nov 18 17:22:04 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 1r4O55-00049P-3j for ged-emacs-devel@m.gmane-mx.org; Sat, 18 Nov 2023 17:22:03 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r4O4E-0005Hc-Rn; Sat, 18 Nov 2023 11:21:11 -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 1r4O4B-0005HN-NG for emacs-devel@gnu.org; Sat, 18 Nov 2023 11:21:08 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r4O4A-0002vg-VF; Sat, 18 Nov 2023 11:21:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=8AOTIR3pgu69QNAphdj3kRYhk82ef+6Iy2TG9jCQQ9U=; b=UqIbQN2zfhhD YA0pm6TQTpEhJPsiJaWm/u5SSy04c6zX77eZzpdMZ3el3AHyc7lBfmnuokBvrTPgJuOMWJvo/clOX uGYZxUWztWLSN8PEKC5f85AZHEU6G9+ptJro2BIy7C+aei/OJGCTAB1LfPVct66izaBwJMEwQcnIE 8VvJwc9iFGgs1r60Psa1BqphBG45Fw7JdGe+XTtpgewaipVRbZ3m2G1tCwmQFOXtGPUwaUHwJBcLK 0d6dEheLUWcnQvUSZGWhSwFMdnrEXDLmeLzoVH1vybzJqsWbnqBP4egZCKtdJOqXn4uZ3qanv4pQw m4BAJkSPg0e381Yk/sAHOg==; In-Reply-To: <1496758.1700318304@archlinux> (message from Greg Minshall on Sat, 18 Nov 2023 06:38:24 -0800) 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:312915 Archived-At: > cc: emacs-devel@gnu.org > From: Greg Minshall > Comments: In-reply-to Eli Zaretskii > message dated "Sat, 18 Nov 2023 09:36:36 +0200." > Date: Sat, 18 Nov 2023 06:38:24 -0800 > > Eli Zaretskii wrote: > > > In any case, could you please show a real-life case where this is > > needed? The -x option was intended to support the use cases where the > > rest of the script is Emacs Lisp code, so what would such a script do > > with an option that is not interpreted by Emacs, and why is that > > needed? > > this last point is maybe all i can answer now (your other points are > food for thought, and code-staring). the idea is a generalized facility > that allows script-writers to do whatever they want, define whatever > options they want. > > plus, trying to stay out of the way of even current, let alone future, > Emacs options is tricky; realistically, script-writers would need to > require their users to always type double-dashes, e.g., > ---- > ls-emacs -- -F > ---- > which doesn't seem so user-friendly. > > in my case, for example, i want to write an Emacs script that has some > familiar options like "-d", "-V", etc., in addition to options to > specify how the script should run (what input files to process, output > files to produce, alterations to behavior). How would you pass these -F, -d, -V etc. options to Emacs, or use them in any other way in the script, whose contents is supposed to be an Emacs Lisp program? There's something I'm missing here. I asked my question because I thought you had a real-life example of a script you wanted to use, but in your response you don't show any such example. Can you show it?