From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Psionic K Newsgroups: gmane.emacs.help Subject: Normalizing --script and --load behavior to respect "--" Date: Thu, 9 Jun 2022 20:24:22 -0500 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40897"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 13 21:30:50 2022 Return-path: Envelope-to: geh-help-gnu-emacs@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 1o0plx-000AQk-Hp for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 13 Jun 2022 21:30:49 +0200 Original-Received: from localhost ([::1]:51098 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o0plw-00008n-9m for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 13 Jun 2022 15:30:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34986) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzTO9-0004D6-OL for help-gnu-emacs@gnu.org; Thu, 09 Jun 2022 21:24:37 -0400 Original-Received: from mail-yw1-x1136.google.com ([2607:f8b0:4864:20::1136]:32930) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nzTO7-0000pW-Uo for help-gnu-emacs@gnu.org; Thu, 09 Jun 2022 21:24:37 -0400 Original-Received: by mail-yw1-x1136.google.com with SMTP id 00721157ae682-30fa61b1a83so253061277b3.0 for ; Thu, 09 Jun 2022 18:24:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=positron.solutions; s=google; h=mime-version:from:date:message-id:subject:to; bh=ffPdh6eObmaBfLcsrMJCY0U75gTkcxUAVzThKSYMetc=; b=ZEYVRPcOX26yg6lzTfFhHJLUQ9kxkYl3NIJVUqaF5Q2sdAJHugRDgy8fx5gjFHiYL6 Z2i4MX6Sf92A7G3B6V6oRVjMk/EVajj+ewJiW98pv92goz5ZvOB/UCNKKrUS2Z0HvyE4 7A/bxb0MeayepDQyxud4hw/wdjMbN0rf2kO1htEONMMM/ulI7Y8kZE1FeLfyNRDHJFk3 zytjZszsg6VJ/IyW7Sa4N5V5L20TVZWq6H+XvtBBJEfhIaJ/JOAJ4byuFeZ/QG88X4tK aZz0qlBYl5tkchOoZxEsnaBRboVuIrTMlvEdLgKznZH8DO57tDeh2872zGqh6J749oqI pBTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=ffPdh6eObmaBfLcsrMJCY0U75gTkcxUAVzThKSYMetc=; b=LYzByomgdXe+6T2+YMtYc3wWm0iNe0PCn+ISx6TkOFhwpZFxiLHLA1dJyavqvnpllb fYy5oDqgUjE1e9BKffr38VGdYVWWKIInYe63mAh7a2r5MWK7KXPoHtY5l0mW3yxaJpD7 pCYjbG9ZmNDrYSYBIsM69W8ulQPeWnw+rfJoS8gUTFemnuukCq6GC1svBtSM/b5unAYm MB+PxVvmWqy/EljeFqMCPm1tdj78xd6k7F48D1+gAhAZGaESBCnvT3m4pufCLvnYeIFT sl5fA/P+VZAUW6+Ovgom+j5dD612SJmCLnQ3iLlb/shQU2E0f1EYjum+iG9Xlpt0ky3V Repw== X-Gm-Message-State: AOAM530WKQg2h/apeA2nvCtd/rYkN3mrPRC7Eb8hMnlvPmBUMMIxk6s5 fEnVS7D9HqjysnMrY7/Z58d/u272rg5q8d7r2uflRgKzyUM= X-Google-Smtp-Source: ABdhPJyeCOsl4zyl+odU+nfL8B6MKV3rQPe7IMlUIAszYzxT70Nk3dkseoigwB0dDoR9nvvWpLcLQD3PDFfn972wW0k= X-Received: by 2002:a0d:eacd:0:b0:313:66ec:e6c3 with SMTP id t196-20020a0deacd000000b0031366ece6c3mr12047758ywe.91.1654824273799; Thu, 09 Jun 2022 18:24:33 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::1136; envelope-from=exec@positron.solutions; helo=mail-yw1-x1136.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, HTML_IMAGE_ONLY_28=1.404, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_REMOTE_IMAGE=0.01, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 13 Jun 2022 15:28:20 -0400 X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:137806 Archived-At: I noticed that --script does not seem to respect the normal "--" cutoff for arguments. I expected Emacs would consume all arguments it supports and then set `argv' to the remaining arguments, using "--" to distinguish when to stop trying to consume. I believe --load and --script should be similar because otherwise a script has to skip over or interpret arguments that were intended for Emacs. My A/B problem is running tests with a graphical window versus without. Because --quick --no-window-system --load presents a dilemma of how to report test feedback, I used --script to run tests without a window and encountered the behavior difference. I'm currently using a workaround to consume extra arguments conditionally in the loaded elisp file. Nix wrapper scripts exhibit problematic interaction with this issue. I used the direct path to the binary to confirm that the behavior exists without the wrapper. --script always sees all of the arguments while --load only sees non-Emacs arguments. -- Psionic K Software Engineer *Positron Solutions *