From unknown Sun Aug 17 22:03:18 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#13934 <13934@debbugs.gnu.org> To: bug#13934 <13934@debbugs.gnu.org> Subject: Status: Minor bug in `command-line-functions' Reply-To: bug#13934 <13934@debbugs.gnu.org> Date: Mon, 18 Aug 2025 05:03:18 +0000 retitle 13934 Minor bug in `command-line-functions' reassign 13934 emacs submitter 13934 Xue Fuqiao severity 13934 minor tag 13934 notabug thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 12 10:04:03 2013 Received: (at submit) by debbugs.gnu.org; 12 Mar 2013 14:04:03 +0000 Received: from localhost ([127.0.0.1]:48946 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UFPoA-00045B-De for submit@debbugs.gnu.org; Tue, 12 Mar 2013 10:04:02 -0400 Received: from eggs.gnu.org ([208.118.235.92]:37786) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UFPo7-00044g-AW for submit@debbugs.gnu.org; Tue, 12 Mar 2013 10:04:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UFPmv-0005W8-VN for submit@debbugs.gnu.org; Tue, 12 Mar 2013 10:02:54 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-102.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, T_DKIM_INVALID, USER_IN_WHITELIST autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:50550) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFPmv-0005W3-SK for submit@debbugs.gnu.org; Tue, 12 Mar 2013 10:02:45 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49134) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFPmp-0008Tf-Vk for bug-gnu-emacs@gnu.org; Tue, 12 Mar 2013 10:02:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UFPmi-0005Ue-Cb for bug-gnu-emacs@gnu.org; Tue, 12 Mar 2013 10:02:39 -0400 Received: from mail-pb0-f52.google.com ([209.85.160.52]:45823) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFPmi-0005UQ-66 for bug-gnu-emacs@gnu.org; Tue, 12 Mar 2013 10:02:32 -0400 Received: by mail-pb0-f52.google.com with SMTP id ma3so5021772pbc.11 for ; Tue, 12 Mar 2013 07:02:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:date:from:to:subject:message-id:organization:x-mailer :mime-version:content-type:content-transfer-encoding; bh=MzrzWfGdHdtqoZRbHJHRaVde1kQH9X/4V8ohxTbBv9c=; b=fes/dE/uiVj7TGF+skBcgBDAFrvpyuJBsyjuTOIngyHJNgu+MUydYB5TCFjPbs99OH UMNdvO9D4RTeC5RDUcVZdGX04QKpCCE1/6QyWhQHjMet9fM/B0EzzAjCPbGyRgUfCfAl dWlH1iUBKS1pTp7rEf3KzxmKxyZPSKNNxawR3ztO2XRVKiugRSlJf8fMYncwGwEsbnrw /G+iLzO41OzV6jtPM/1DxYvbebgZxsJ3rE/2A07XB/ul7OaN04aiINP6exmjrnqunYG5 CuXsGBRgdicIxPtkp1Ee1oyfm4u8bnZl4Lsvw5IvPkKMbALT+LP1sJg5a2KI+Sua/WAf j+Nw== X-Received: by 10.68.25.231 with SMTP id f7mr38754397pbg.35.1363096950974; Tue, 12 Mar 2013 07:02:30 -0700 (PDT) Received: from Emacs ([123.114.126.128]) by mx.google.com with ESMTPS id ri1sm25189210pbc.16.2013.03.12.07.02.26 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 Mar 2013 07:02:30 -0700 (PDT) Date: Tue, 12 Mar 2013 22:02:21 +0800 From: Xue Fuqiao To: bug-gnu-emacs@gnu.org Subject: Minor bug in `command-line-functions' Message-Id: <20130312220221.02134854e129b6390469b6ae@gmail.com> Organization: The Church of Emacs X-Mailer: Sylpheed 3.2.0 (GTK+ 2.24.13; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -6.1 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) In the doc string of `command-line-functions': Each function should access the dynamically bound variables `argi' (the current argument) and `command-line-args-left' (the remaining arguments). But in startup.el: (internal-make-var-non-special 'argi) Originally posted in: http://lists.gnu.org/archive/html/help-gnu-emacs/2013-03/msg00145.html In GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.6.0) of 2013-03-10 on Emacs Bzr revision: 111984 rgm@gnu.org-20130309202227-7xolc8f5fagp712b Windowing system distributor `The X.Org Foundation', version 11.0.11300000 System Description: Ubuntu 12.10 Configured using: `configure --enable-link-time-optimization' Important settings: value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=fcitx locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Lisp Interaction 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 font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: r e - e m - b u g Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind inotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) -- Best regards, Xue Fuqiao. http://www.emacswiki.org/emacs/XueFuqiao From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 15 02:00:03 2019 Received: (at 13934) by debbugs.gnu.org; 15 Aug 2019 06:00:03 +0000 Received: from localhost ([127.0.0.1]:50443 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hy8nq-00039a-Ol for submit@debbugs.gnu.org; Thu, 15 Aug 2019 02:00:03 -0400 Received: from quimby.gnus.org ([80.91.231.51]:36158) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hy8np-00038k-CR for 13934@debbugs.gnu.org; Thu, 15 Aug 2019 02:00:01 -0400 Received: from 24-104-73-23-ip-static.hfc.comcastbusiness.net ([24.104.73.23] helo=sandy) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hy8nl-0008QA-9z; Thu, 15 Aug 2019 08:00:00 +0200 From: Lars Ingebrigtsen To: Xue Fuqiao Subject: Re: bug#13934: Minor bug in `command-line-functions' References: <20130312220221.02134854e129b6390469b6ae@gmail.com> Date: Wed, 14 Aug 2019 22:59:54 -0700 In-Reply-To: <20130312220221.02134854e129b6390469b6ae@gmail.com> (Xue Fuqiao's message of "Tue, 12 Mar 2013 22:02:21 +0800") Message-ID: <87h86jynmt.fsf@mouse.gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: Xue Fuqiao writes: > In the doc string of `command-line-functions': > Each function should access the dynamically bound variables `argi' > (the current argument) and `command-line-args-left' (the remaining > arguments). [...] 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: 13934 Cc: 13934@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 (-) Xue Fuqiao writes: > In the doc string of `command-line-functions': > Each function should access the dynamically bound variables `argi' > (the current argument) and `command-line-args-left' (the remaining > arguments). > > But in startup.el: > > (internal-make-var-non-special 'argi) > > Originally posted in: > http://lists.gnu.org/archive/html/help-gnu-emacs/2013-03/msg00145.html Stefan says that it's a doc bug: --- List of functions to process unrecognized command-line arguments. Each function should access the dynamically bound variables =E2=80=98argi=E2=80=99 (the current argument) and =E2=80=98command-line-arg= s-left=E2=80=99 (the remaining arguments). The function should return non-nil only if it recognizes and processes =E2=80=98argi=E2=80=99. If it does so, it may consume successive= arguments by altering =E2=80=98command-line-args-left=E2=80=99 to remove them. --- But... if `argi' isn't dynamic, then just about everything here is incorrect, surely. So should `command-line-functions' just do whatever they like and never refer to `argi'? And consume `command-line-args-left' however they like? It's rather confusing, especially with the: (with-no-warnings (defvar argi nil "Current command-line argument.")) (internal-make-var-non-special 'argi) --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 15 02:06:17 2019 Received: (at 13934) by debbugs.gnu.org; 15 Aug 2019 06:06:17 +0000 Received: from localhost ([127.0.0.1]:50447 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hy8ts-0005P7-Uo for submit@debbugs.gnu.org; Thu, 15 Aug 2019 02:06:17 -0400 Received: from quimby.gnus.org ([80.91.231.51]:36294) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hy8tq-0005Oy-Nz for 13934@debbugs.gnu.org; Thu, 15 Aug 2019 02:06:15 -0400 Received: from 24-104-73-23-ip-static.hfc.comcastbusiness.net ([24.104.73.23] helo=sandy) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hy8tk-0008RI-Qs; Thu, 15 Aug 2019 08:06:13 +0200 From: Lars Ingebrigtsen To: Xue Fuqiao Subject: Re: bug#13934: Minor bug in `command-line-functions' References: <20130312220221.02134854e129b6390469b6ae@gmail.com> <87h86jynmt.fsf@mouse.gnus.org> Date: Wed, 14 Aug 2019 23:06:05 -0700 In-Reply-To: <87h86jynmt.fsf@mouse.gnus.org> (Lars Ingebrigtsen's message of "Wed, 14 Aug 2019 22:59:54 -0700") Message-ID: <87d0h7ynci.fsf@mouse.gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.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: > It's rather confusing, especially with the: > > (with-no-warnings > (defvar argi nil > "Current command-line argument.")) > (internal-make-var-non-special 'argi) 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: 13934 Cc: 13934@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 (-) Lars Ingebrigtsen writes: > It's rather confusing, especially with the: > > (with-no-warnings > (defvar argi nil > "Current command-line argument.")) > (internal-make-var-non-special 'argi) I tested with (setq command-line-functions '((lambda () (message "argi %s" argi)))) and `argi' is indeed dynamically bound when ;; We have almost exhausted our options. See if the ;; user has made any other command-line options available (let ((hooks command-line-functions) (did-hook nil)) (while (and hooks (not (setq did-hook (funcall (car hooks))))) (setq hooks (cdr hooks))) is executed... so is argi dynamic in the startup.el file, but not elsewhere in Emacs? In which case there is really nothing to fix in the doc string? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 17 03:05:25 2019 Received: (at 13934) by debbugs.gnu.org; 17 Aug 2019 07:05:25 +0000 Received: from localhost ([127.0.0.1]:55297 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hysmC-000778-MD for submit@debbugs.gnu.org; Sat, 17 Aug 2019 03:05:24 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53855) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hysm9-00076s-MB for 13934@debbugs.gnu.org; Sat, 17 Aug 2019 03:05:21 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37523) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hysm3-000786-Hg; Sat, 17 Aug 2019 03:05:15 -0400 Received: from [176.228.60.248] (port=3272 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hysm2-0008Cd-Ok; Sat, 17 Aug 2019 03:05:15 -0400 Date: Sat, 17 Aug 2019 10:05:11 +0300 Message-Id: <83lfvsnufs.fsf@gnu.org> From: Eli Zaretskii To: Lars Ingebrigtsen , Stefan Monnier In-reply-to: <87d0h7ynci.fsf@mouse.gnus.org> (message from Lars Ingebrigtsen on Wed, 14 Aug 2019 23:06:05 -0700) Subject: Re: bug#13934: Minor bug in `command-line-functions' References: <20130312220221.02134854e129b6390469b6ae@gmail.com> <87h86jynmt.fsf@mouse.gnus.org> <87d0h7ynci.fsf@mouse.gnus.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 13934 Cc: xfq.free@gmail.com, 13934@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 (---) > From: Lars Ingebrigtsen > Date: Wed, 14 Aug 2019 23:06:05 -0700 > Cc: 13934@debbugs.gnu.org > > (setq command-line-functions '((lambda () (message "argi %s" argi)))) > > and `argi' is indeed dynamically bound when > > ;; We have almost exhausted our options. See if the > ;; user has made any other command-line options available > (let ((hooks command-line-functions) > (did-hook nil)) > (while (and hooks > (not (setq did-hook (funcall (car hooks))))) > (setq hooks (cdr hooks))) > > is executed... so is argi dynamic in the startup.el file, but not > elsewhere in Emacs? In which case there is really nothing to fix in the > doc string? Yes, I think so. Stefan? From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 17 08:46:51 2019 Received: (at 13934) by debbugs.gnu.org; 17 Aug 2019 12:46:51 +0000 Received: from localhost ([127.0.0.1]:55404 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hyy6d-0000TL-8h for submit@debbugs.gnu.org; Sat, 17 Aug 2019 08:46:51 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:57059) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hyy6b-0000T8-DT for 13934@debbugs.gnu.org; Sat, 17 Aug 2019 08:46:49 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id EFCB54467C3; Sat, 17 Aug 2019 08:46:43 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id AA4D24467C1; Sat, 17 Aug 2019 08:46:38 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1566045998; bh=6k4QwdHQbP5YNoyJWX1lB7CfG+vjv1+yHOPRzw3tN7k=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=L7LpmBC02SooUD/v9RBuZE/AGPlBafPjHN1SFNIw37g8ypvaUAryvnuatmEa3C51q 4M3KRjczx+JoUMdzCHtmPIxz00LeZezOYf92EOjoZGBBhZNT4OyIQ2HnkM0VN+jDdb BCfbn+FuTKxwF97SPuUq1AXtZegO1MP/grgWOWw/G/CZW3ZNhMDua5grIGVgPB2tnl d3phHd1SuOul+ogysUuki9YAT8WXZe8DBQ9HvRGSTjEz2UnMuuR9aMMWmrdkfQJWWr 0ADQlMu6TnBHPyEzm3MDmNfLjIMyyFOcjzZ40aQF+kXtv5eLVRA6z8E8ccU3sX4rq3 lOpZrmKLPsvvA== Received: from alfajor (unknown [46.189.28.52]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 837B6120180; Sat, 17 Aug 2019 08:46:37 -0400 (EDT) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#13934: Minor bug in `command-line-functions' Message-ID: References: <20130312220221.02134854e129b6390469b6ae@gmail.com> <87h86jynmt.fsf@mouse.gnus.org> <87d0h7ynci.fsf@mouse.gnus.org> <83lfvsnufs.fsf@gnu.org> Date: Sat, 17 Aug 2019 08:46:35 -0400 In-Reply-To: <83lfvsnufs.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 17 Aug 2019 10:05:11 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.095 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 13934 Cc: xfq.free@gmail.com, Lars Ingebrigtsen , 13934@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 (-) >> (setq command-line-functions '((lambda () (message "argi %s" argi)))) >> >> and `argi' is indeed dynamically bound when >> >> ;; We have almost exhausted our options. See if the >> ;; user has made any other command-line options available >> (let ((hooks command-line-functions) >> (did-hook nil)) >> (while (and hooks >> (not (setq did-hook (funcall (car hooks))))) >> (setq hooks (cdr hooks))) >> >> is executed... so is argi dynamic in the startup.el file, but not >> elsewhere in Emacs? In which case there is really nothing to fix in the >> doc string? > > Yes, I think so. Stefan? Indeed, it's dynamically scoped in startup.el but not elsewhere. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 17 17:24:26 2019 Received: (at 13934) by debbugs.gnu.org; 17 Aug 2019 21:24:26 +0000 Received: from localhost ([127.0.0.1]:56921 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hz6BW-0008QQ-7b for submit@debbugs.gnu.org; Sat, 17 Aug 2019 17:24:26 -0400 Received: from quimby.gnus.org ([80.91.231.51]:55544) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hz6BU-0008QH-4s for 13934@debbugs.gnu.org; Sat, 17 Aug 2019 17:24:24 -0400 Received: from [50.225.213.182] (helo=sandy) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hz6BM-0003y2-E4; Sat, 17 Aug 2019 23:24:19 +0200 From: Lars Ingebrigtsen To: Stefan Monnier Subject: Re: bug#13934: Minor bug in `command-line-functions' References: <20130312220221.02134854e129b6390469b6ae@gmail.com> <87h86jynmt.fsf@mouse.gnus.org> <87d0h7ynci.fsf@mouse.gnus.org> <83lfvsnufs.fsf@gnu.org> Date: Sat, 17 Aug 2019 14:24:13 -0700 In-Reply-To: (Stefan Monnier's message of "Sat, 17 Aug 2019 08:46:35 -0400") Message-ID: <874l2fmqo2.fsf@mouse.gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.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: Stefan Monnier writes: > Indeed, it's dynamically scoped in startup.el but not elsewhere. So I think the doc string is pretty accurate here: 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: 13934 Cc: xfq.free@gmail.com, Eli Zaretskii , 13934@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 (-) Stefan Monnier writes: > Indeed, it's dynamically scoped in startup.el but not elsewhere. So I think the doc string is pretty accurate here: -- Each function should access the dynamically bound variables `argi' (the current argument) and `command-line-args-left' (the remaining arguments). -- The functions should access these dynamically bound variables... even if argi isn't in other contexts, and I'm closing thing bug report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 17 17:24:29 2019 Received: (at control) by debbugs.gnu.org; 17 Aug 2019 21:24:29 +0000 Received: from localhost ([127.0.0.1]:56924 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hz6BZ-0008Qh-IX for submit@debbugs.gnu.org; Sat, 17 Aug 2019 17:24:29 -0400 Received: from quimby.gnus.org ([80.91.231.51]:55562) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hz6BY-0008QZ-38 for control@debbugs.gnu.org; Sat, 17 Aug 2019 17:24:28 -0400 Received: from [50.225.213.182] (helo=sandy) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hz6BV-0003yI-7f for control@debbugs.gnu.org; Sat, 17 Aug 2019 23:24:27 +0200 Date: Sat, 17 Aug 2019 14:24:22 -0700 Message-Id: <8736hzmqnt.fsf@mouse.gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #13934 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: tags 13934 notabug close 13934 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: 0.0 (/) 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: -1.0 (-) tags 13934 notabug close 13934 quit From unknown Sun Aug 17 22:03:18 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 15 Sep 2019 11:24:06 +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