From unknown Mon Aug 18 14:21:59 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#8311 <8311@debbugs.gnu.org> To: bug#8311 <8311@debbugs.gnu.org> Subject: Status: 24.0.50; [PATCH] eshell-eval-using-options duplicate symbols Reply-To: bug#8311 <8311@debbugs.gnu.org> Date: Mon, 18 Aug 2025 21:21:59 +0000 retitle 8311 24.0.50; [PATCH] eshell-eval-using-options duplicate symbols reassign 8311 emacs submitter 8311 Leo severity 8311 wishlist tag 8311 notabug patch thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 21 14:08:40 2011 Received: (at submit) by debbugs.gnu.org; 21 Mar 2011 18:08:41 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q1jWy-0006JA-BR for submit@debbugs.gnu.org; Mon, 21 Mar 2011 14:08:40 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q1jWx-0006Iu-0s for submit@debbugs.gnu.org; Mon, 21 Mar 2011 14:08:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q1jWq-0001XN-Ac for submit@debbugs.gnu.org; Mon, 21 Mar 2011 14:08:33 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, T_DKIM_INVALID, T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:40727) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q1jWq-0001XJ-6v for submit@debbugs.gnu.org; Mon, 21 Mar 2011 14:08:32 -0400 Received: from [140.186.70.92] (port=41779 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q1jWp-0006nU-3k for bug-gnu-emacs@gnu.org; Mon, 21 Mar 2011 14:08:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q1jWm-0001VY-DM for bug-gnu-emacs@gnu.org; Mon, 21 Mar 2011 14:08:31 -0400 Received: from mail-iw0-f169.google.com ([209.85.214.169]:65207) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q1jWm-0001VL-AO for bug-gnu-emacs@gnu.org; Mon, 21 Mar 2011 14:08:28 -0400 Received: by iwl42 with SMTP id 42so8434322iwl.0 for ; Mon, 21 Mar 2011 11:08:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:subject:date:message-id:mime-version :content-type; bh=89ktIecDnXcnGvaG+b2XxAr2P01JePq3wFHC8Oi/mPo=; b=XL5R6WO7bG+buSmXO9bVnyeD04J5N4Eue/CGOrVwFNJSWdYhWPMH/35louCD1X59Oh 1zcnubkJ22c5pKjwmM78WwkP6+8eMmjwgOGuPleb2m19+85/x0jfk4/7DU+ccUWR1hM7 K6aASOAJ3hMKq/xIW2uKeySn/E5jY0UBUy/Bk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:message-id:mime-version:content-type; b=aWWEIiQlIeEcpwaxwuL46EQU4dOoq3/oZpm8t+rEkCbQAyr5p5UY9kADzMhMlzLDIR 64eX50AbgQVAUYvvkx1OZaIlOcElCnvta/QK8m0zzWIhMJmZOI5qwNmHI+/whdfbcCxR UPRuEui4orfjDQAsdvtEVdjIXpz17DDih4pVs= Received: by 10.231.111.39 with SMTP id q39mr4552835ibp.89.1300730907870; Mon, 21 Mar 2011 11:08:27 -0700 (PDT) Received: from localhost (th041135.ip.tsinghua.edu.cn [59.66.41.135]) by mx.google.com with ESMTPS id i20sm3841275iby.48.2011.03.21.11.08.21 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 21 Mar 2011 11:08:25 -0700 (PDT) From: Leo To: bug-gnu-emacs@gnu.org Subject: 24.0.50; [PATCH] eshell-eval-using-options duplicate symbols Date: Tue, 22 Mar 2011 02:08:17 +0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 199.232.76.165 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -5.1 (-----) The macro expansion of eshell-eval-using-options in eshell/ln looks like this: (let ((temp-args args)) (let (eshell-option-stub symbolic em-interactive force em-preview em-verbose eshell-option-stub eshell-option-stub eshell-option-stub eshell-option-stub eshell-option-stub eshell-option-stub usage-msg last-value ext-command args) (eshell-do-opt "ln" '((104 "help" nil nil "show this usage screen") (115 "symbolic" nil symbolic "make symbolic links instead of hard links") (105 "interactive" nil em-interactive "request confirmation if target already exists") (102 "force" nil force "remove existing destinations, never prompt") (110 "preview" nil em-preview "don't change anything on disk") (118 "verbose" nil em-verbose "explain what is being done") :preserve-args :external "ln" :show-usage :usage "[OPTION]... TARGET [LINK_NAME]\n or: ln [OPTION]... TARGET... DIRECTORY\nCreate a link to the specified TARGET with optional LINK_NAME. If there is\nmore than one TARGET, the last argument must be a directory; create links\nin DIRECTORY to each TARGET. Create hard links by default, symbolic links\nwith '--symbolic'. When creating hard links, each TARGET must exist.") '((let ((no-dereference t)) (eshell-mvcpln-template "ln" "linking" (if symbolic 'make-symbolic-link 'add-name-to-file) eshell-ln-interactive-query eshell-ln-overwrite-files)))))) The second let has quite a few duplicate symbols. Anybody seeing any problem with the following patch: === modified file 'lisp/eshell/esh-opt.el' --- lisp/eshell/esh-opt.el 2011-03-21 06:42:23 +0000 +++ lisp/eshell/esh-opt.el 2011-03-21 18:04:57 +0000 @@ -102,11 +102,12 @@ macro-args (list 'eshell-stringify-list (list 'eshell-flatten-list macro-args))))) - (let ,(append (mapcar (lambda (opt) - (or (and (listp opt) (nth 3 opt)) - 'eshell-option-stub)) - (cadr options)) - '(usage-msg last-value ext-command args)) + (let ,(delete-dups + (append (mapcar (lambda (opt) + (or (and (listp opt) (nth 3 opt)) + 'eshell-option-stub)) + (cadr options)) + '(usage-msg last-value ext-command args))) (eshell-do-opt ,name ,options (quote ,body-forms))))) ;;; Internal Functions: From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 21 16:31:10 2011 Received: (at 8311) by debbugs.gnu.org; 21 Mar 2011 20:31:10 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q1lks-0001JE-0I for submit@debbugs.gnu.org; Mon, 21 Mar 2011 16:31:10 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q1lkq-0001J3-EE for 8311@debbugs.gnu.org; Mon, 21 Mar 2011 16:31:08 -0400 Received: from localhost ([127.0.0.1]:51158) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q1lkl-00073C-1c; Mon, 21 Mar 2011 16:31:03 -0400 From: Glenn Morris To: Leo Subject: Re: bug#8311: 24.0.50; [PATCH] eshell-eval-using-options duplicate symbols References: X-Spook: satellite imagery Operation Iraqi Freedom warfare Putin X-Ran: 3YKK2'hnc>~8qsUIQu[FsAF-$%rbA#y]PHvw;IIk"O-XiC)1VcG9uC8l!-PZB~~#h#Cq|Y X-Hue: yellow X-Debbugs-No-Ack: yes X-Attribution: GM Date: Mon, 21 Mar 2011 16:31:02 -0400 In-Reply-To: (Leo's message of "Tue, 22 Mar 2011 02:08:17 +0800") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.3 (------) X-Debbugs-Envelope-To: 8311 Cc: 8311@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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.3 (------) Leo wrote: > The second let has quite a few duplicate symbols. Anybody seeing any > problem with the following patch: If you're talking about all the `eshell-option-stub's, why not just stop them being inserted, since they don't seem to be used for anything: *** lisp/eshell/esh-opt.el 2011-03-21 06:42:23 +0000 --- lisp/eshell/esh-opt.el 2011-03-21 20:26:03 +0000 *************** *** 102,111 **** macro-args (list 'eshell-stringify-list (list 'eshell-flatten-list macro-args))))) ! (let ,(append (mapcar (lambda (opt) ! (or (and (listp opt) (nth 3 opt)) ! 'eshell-option-stub)) ! (cadr options)) '(usage-msg last-value ext-command args)) (eshell-do-opt ,name ,options (quote ,body-forms))))) --- 102,110 ---- macro-args (list 'eshell-stringify-list (list 'eshell-flatten-list macro-args))))) ! (let ,(append (delq nil (mapcar (lambda (opt) ! (and (listp opt) (nth 3 opt))) ! (cadr options))) '(usage-msg last-value ext-command args)) (eshell-do-opt ,name ,options (quote ,body-forms))))) From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 21 20:57:18 2011 Received: (at 8311) by debbugs.gnu.org; 22 Mar 2011 00:57:19 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q1puQ-00086t-0h for submit@debbugs.gnu.org; Mon, 21 Mar 2011 20:57:18 -0400 Received: from mail-iw0-f172.google.com ([209.85.214.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q1puP-00086h-1u for 8311@debbugs.gnu.org; Mon, 21 Mar 2011 20:57:17 -0400 Received: by iwl42 with SMTP id 42so6669802iwl.3 for <8311@debbugs.gnu.org>; Mon, 21 Mar 2011 17:57:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=Y+qdJDB1StNDr81b++qFfwXHjMTQmvdAQxbeHLXe+gM=; b=CHt3k2zof1YRti97X3LUePf7A2cy+QySly5+JFzTvZ3sj9fPIw1yN7R6nzb1PVRB9q dnzhlPZr7LvewkD757SIxhOyqSbEFGm77A/Q+Y/anQkOqDNN3crro1TDgA1N7YXaznSD hhE0Ja7v3/wMOolhEG8QUBM3yZo5Jg6zS3Fmg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=dT6vFY8z2jGvydNKwyk2y8o8v6aBMxDmkt0t/a6adpWXKBpVfaEu9kRQAmMw63DxGX 9CpvMXX2xeWSSjQYhaSl4q0QJGh2zIetSX+q3zgKRr0EF2ald3MLI1yWHW/VKbzaNhOf IO6UumogZnaovraNWLbXRAD7UQTuGjMg8lSy4= Received: by 10.231.26.87 with SMTP id d23mr4958672ibc.18.1300755431477; Mon, 21 Mar 2011 17:57:11 -0700 (PDT) Received: from localhost (th041092.ip.tsinghua.edu.cn [59.66.41.92]) by mx.google.com with ESMTPS id u9sm4029706ibe.36.2011.03.21.17.57.06 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 21 Mar 2011 17:57:08 -0700 (PDT) From: Leo To: Glenn Morris Subject: Re: bug#8311: 24.0.50; [PATCH] eshell-eval-using-options duplicate symbols References: Date: Tue, 22 Mar 2011 08:57:01 +0800 In-Reply-To: (Glenn Morris's message of "Mon, 21 Mar 2011 16:31:02 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (Mac OS X 10.6.6) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: 8311 Cc: 8311@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -4.0 (----) On 2011-03-22 04:31 +0800, Glenn Morris wrote: > If you're talking about all the `eshell-option-stub's, why not just stop > them being inserted, since they don't seem to be used for anything: Indeed there is only one occurrence of eshell-option-stub in the eshell source. So your patch fixes the bug too. Please install it. Thanks. Leo From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 22 23:10:26 2011 Received: (at control) by debbugs.gnu.org; 23 Mar 2011 03:10:27 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q2ESo-0005cb-5y for submit@debbugs.gnu.org; Tue, 22 Mar 2011 23:10:26 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q2ESm-0005cQ-7z for control@debbugs.gnu.org; Tue, 22 Mar 2011 23:10:24 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1Q2ESh-00021g-5O for control@debbugs.gnu.org; Tue, 22 Mar 2011 23:10:19 -0400 Date: Tue, 22 Mar 2011 23:10:19 -0400 Message-Id: Subject: control message for bug 8311 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -6.3 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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.3 (------) close 8311 From unknown Mon Aug 18 14:21:59 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 20 Apr 2011 11:24:04 +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