From unknown Mon Jun 23 04:09:40 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#50125 <50125@debbugs.gnu.org> To: bug#50125 <50125@debbugs.gnu.org> Subject: Status: completion-in-region in shell.el Reply-To: bug#50125 <50125@debbugs.gnu.org> Date: Mon, 23 Jun 2025 11:09:40 +0000 retitle 50125 completion-in-region in shell.el reassign 50125 emacs submitter 50125 Madhu severity 50125 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 19 11:51:59 2021 Received: (at submit) by debbugs.gnu.org; 19 Aug 2021 15:51:59 +0000 Received: from localhost ([127.0.0.1]:60725 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGkKl-0002Lm-1a for submit@debbugs.gnu.org; Thu, 19 Aug 2021 11:51:59 -0400 Received: from lists.gnu.org ([209.51.188.17]:52300) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGkKj-0002Lf-Pi for submit@debbugs.gnu.org; Thu, 19 Aug 2021 11:51:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47300) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mGkKj-00075L-Hn for bug-gnu-emacs@gnu.org; Thu, 19 Aug 2021 11:51:57 -0400 Received: from ciao.gmane.io ([116.202.254.214]:51700) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mGkKh-0000wE-4O for bug-gnu-emacs@gnu.org; Thu, 19 Aug 2021 11:51:57 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1mGkKe-000Aar-MU for bug-gnu-emacs@gnu.org; Thu, 19 Aug 2021 17:51:52 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Madhu Subject: completion-in-region in shell.el Date: Thu, 19 Aug 2021 21:22:06 +0530 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Cancel-Lock: sha1:aOWeRCNRw45EJaW2ucKhzOSQM5A= Received-SPF: pass client-ip=116.202.254.214; envelope-from=geb-bug-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: submit 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: -2.1 (--) --=-=-= Content-Type: text/plain In a *shell* buffer, if I position the cursor after typing "pass" and invoke M-: (shell-dynamic-completion-command), this should yield a completion "passwd" if /bin is in exec-path. However it errors out with error: (wrong-number-of-arguments (3 . 4) 5) completion-in-region(484 486 #f(compiled-function (string pred action) #) :exit-function #f(compiled-function (string finished) #)) apply(completion-in-region (484 486 #f(compiled-function (string pred action) #) :exit-function #f(compiled-function (string finished) #))) shell-dynamic-complete-command() eval((shell-dynamic-complete-command) t) eval-expression((shell-dynamic-complete-command) nil nil 127) funcall-interactively(eval-expression (shell-dynamic-complete-command) nil nil 127) call-interactively(eval-expression nil nil) command-execute(eval-expression) The completion data functions shell-environment-variable-completion and shell-command-completion include an :exit-function keyword value pair in the result. But this cannot be passed on to completion-in-region. (How is this exit-function to be used at all?) Commit e71564921ec760638105c910fdfae8b648724130 fixed similar issues in comint.el, and probably missed shell.el during that pass * lisp/shell.el (shell-dynamic-complete-command) (shell-dynamic-complete-environment-variable): Correctly call completion-in-region. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=shell-dynamic-complete-fix.patch >From 913b77f13b5d2a7cb3e91d0c057ea3321740f845 Mon Sep 17 00:00:00 2001 From: Madhu Date: Thu, 19 Aug 2021 20:57:48 +0530 Subject: [PATCH] * lisp/shell.el (shell-dynamic-complete-command) (shell-dynamic-complete-environment-variable): Correctly call completion-in-region. --- lisp/shell.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/shell.el b/lisp/shell.el index 292f267d2e..5cdc0385a6 100644 --- a/lisp/shell.el +++ b/lisp/shell.el @@ -1199,7 +1199,7 @@ shell-dynamic-complete-command (if data (prog2 (unless (window-minibuffer-p) (message "Completing command name...")) - (apply #'completion-in-region data))))) + (completion-in-region (nth 0 data) (nth 1 data) (nth 2 data)))))) (defun shell-command-completion () "Return the completion data for the command at point, if any." @@ -1314,7 +1314,7 @@ shell-dynamic-complete-environment-variable (if data (prog2 (unless (window-minibuffer-p) (message "Completing variable name...")) - (apply #'completion-in-region data))))) + (completion-in-region (nth 0 data) (nth 1 data) (nth 2 data)))))) (defun shell-environment-variable-completion () -- 2.31.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 19 12:03:45 2021 Received: (at 50125) by debbugs.gnu.org; 19 Aug 2021 16:03:46 +0000 Received: from localhost ([127.0.0.1]:60739 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGkW6-0004nd-Jm for submit@debbugs.gnu.org; Thu, 19 Aug 2021 12:03:45 -0400 Received: from quimby.gnus.org ([95.216.78.240]:51052) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGkW0-0004nF-T5 for 50125@debbugs.gnu.org; Thu, 19 Aug 2021 12:03:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=vh2tyDxFoYZlipSajZP6tl3xGRsIJlM5ZNjQ4appaU8=; b=lWUOmmH3knj7mk3dFfEDH7On6j T5jwFtXB1YU7sdHihNgArcxdyK2UHohJw9kcy5mVmX42DweOXToo+vzIeJcBfR/BEYv3duQp/rFXF Tn/2qUmx2hnA6uRJ9IdOv1htq66gqzkFEBGGdYm/Nn7HKQruuk1Lg/maa2caVt7VBmiQ=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mGkVp-0007su-P6; Thu, 19 Aug 2021 18:03:30 +0200 From: Lars Ingebrigtsen To: Madhu Subject: Re: bug#50125: completion-in-region in shell.el References: Date: Thu, 19 Aug 2021 18:03:25 +0200 In-Reply-To: (Madhu's message of "Thu, 19 Aug 2021 21:22:06 +0530") Message-ID: <874kbl4e2a.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.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: Madhu writes: > Subject: [PATCH] * lisp/shell.el (shell-dynamic-complete-command) > (shell-dynamic-complete-environment-variable): Correctly call > completion-in-region. Thanks; applied to Emacs 28. 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: -2.3 (--) X-Debbugs-Envelope-To: 50125 Cc: 50125@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 (---) Madhu writes: > Subject: [PATCH] * lisp/shell.el (shell-dynamic-complete-command) > (shell-dynamic-complete-environment-variable): Correctly call > completion-in-region. Thanks; applied to Emacs 28. This change (including the previous one) was small enough to apply without assigning copyright to the FSF. I forget whether I've asked you before -- for future patches you want to submit, it might make sense to get the paperwork started now, so that subsequent patches can be applied speedily. Would you be willing to sign such paperwork? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 19 12:03:46 2021 Received: (at control) by debbugs.gnu.org; 19 Aug 2021 16:03:46 +0000 Received: from localhost ([127.0.0.1]:60741 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGkW9-0004nq-Up for submit@debbugs.gnu.org; Thu, 19 Aug 2021 12:03:46 -0400 Received: from quimby.gnus.org ([95.216.78.240]:51066) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGkW4-0004nM-FI for control@debbugs.gnu.org; Thu, 19 Aug 2021 12:03:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=AeYf1z6cEIjm5VUq4TU/fWzdI4JQCSTCZXhnKjCazfw=; b=NUWDu/DHZ8+X8D8YefrgH99j2A 07jcLC1EshHNrDO+8Hok/jLQJMYWArXnDkVohAitRzKChpxm5Mg1B+GnXkO0CXNpXpKRlNmfNSTi7 Haww8xxHFPOAgMi0RDtvtzEA5FpwcKFQb90uTGUXMbC4lpmNMM4OKxgWNfhYbfTU9u1I=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mGkVw-0007t0-M6 for control@debbugs.gnu.org; Thu, 19 Aug 2021 18:03:34 +0200 Date: Thu, 19 Aug 2021 18:03:32 +0200 Message-Id: <8735r54e23.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #50125 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: close 50125 28.1 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: -2.3 (--) 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: -3.3 (---) close 50125 28.1 quit From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 19 21:14:06 2021 Received: (at 50125) by debbugs.gnu.org; 20 Aug 2021 01:14:06 +0000 Received: from localhost ([127.0.0.1]:60998 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGt6k-0003aq-0i for submit@debbugs.gnu.org; Thu, 19 Aug 2021 21:14:06 -0400 Received: from smtp6.ctinetworks.com ([205.166.61.199]:35742) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGt6h-0003ah-NI for 50125@debbugs.gnu.org; Thu, 19 Aug 2021 21:14:04 -0400 Received: from localhost (unknown [117.193.2.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: enometh@meer.net) by smtp6.ctinetworks.com (Postfix) with ESMTPSA id 0DF7084B84; Thu, 19 Aug 2021 21:13:57 -0400 (EDT) Date: Fri, 20 Aug 2021 06:44:06 +0530 (IST) Message-Id: <20210820.064406.1541156468687235659.enometh@meer.net> To: larsi@gnus.org Subject: Re: bug#50125: completion-in-region in shell.el From: Madhu In-Reply-To: <874kbl4e2a.fsf@gnus.org> References: <874kbl4e2a.fsf@gnus.org> X-Mailer: Mew version 6.8 on Emacs 28.0.50 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ctinetworks-Information: Please contact the ISP for more information X-ctinetworks-MailScanner-ID: 0DF7084B84.A718A X-ctinetworks-VirusCheck: Found to be clean X-ctinetworks-SpamCheck: X-ctinetworks-Watermark: 1630286043.00584@og6Q1yLFqQ4Ji5VWmy1xBA X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 50125 Cc: 50125@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 <874kbl4e2a.fsf@gnus.org> Wrote on Thu, 19 Aug 2021 18:03:25 +0200 > Thanks; applied to Emacs 28. Thanks > This change (including the previous one) was small enough to apply > without assigning copyright to the FSF. > > I forget whether I've asked you before -- for future patches you > want to submit, it might make sense to get the paperwork started > now, so that subsequent patches can be applied speedily. Would you > be willing to sign such paperwork? Yes of course. Although I don't have any substantial contribution lined up right now, and I'd have to check the terms - (Gentoo wouln't let me sign off on commits as "Madhu " but insisted on a full name) From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 20 08:07:19 2021 Received: (at 50125) by debbugs.gnu.org; 20 Aug 2021 12:07:19 +0000 Received: from localhost ([127.0.0.1]:33093 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mH3Is-0001Kq-Vv for submit@debbugs.gnu.org; Fri, 20 Aug 2021 08:07:19 -0400 Received: from quimby.gnus.org ([95.216.78.240]:59596) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mH3Ir-0001KV-4Z for 50125@debbugs.gnu.org; Fri, 20 Aug 2021 08:07:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Q5/8UfmsySRuorrEzWm1hm3Vjoy7/2vtrEa3lSRzhuU=; b=SCwXEWo21+xEMwkwUMgoC/RSH/ nspDxtVCDphBgBWq5OQ5dzpOMAnQbTNtClyqIgTWs3SWGgpMTUjrP22vffHXG3Lr1Re+txpL4U+HY V4npz8oMHj7OdUqJcWCPDnBi7TX9UkIk7fZ8QziQE1spqT6hlw5n3aDOJl5Tl82ClzHA=; Received: from [84.212.220.105] (helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mH3Ie-0003kT-9r; Fri, 20 Aug 2021 14:07:08 +0200 From: Lars Ingebrigtsen To: Madhu Subject: Re: bug#50125: completion-in-region in shell.el References: <874kbl4e2a.fsf@gnus.org> <20210820.064406.1541156468687235659.enometh@meer.net> Date: Fri, 20 Aug 2021 14:07:03 +0200 In-Reply-To: <20210820.064406.1541156468687235659.enometh@meer.net> (Madhu's message of "Fri, 20 Aug 2021 06:44:06 +0530 (IST)") Message-ID: <87tujk8gm0.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.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: Madhu writes: > Yes of course. Although I don't have any substantial contribution > lined up right now, and I'd have to check the terms - (Gentoo wouln't > let me sign off on commits as "Madhu " b [...] 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: -2.3 (--) X-Debbugs-Envelope-To: 50125 Cc: 50125@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 (---) Madhu writes: > Yes of course. Although I don't have any substantial contribution > lined up right now, and I'd have to check the terms - (Gentoo wouln't > let me sign off on commits as "Madhu " but insisted > on a full name) Great; the form to get started is below. (It is my understanding that the FSF needs to have your real name on file, but it's fine to use an alias in the commit messages. The copyright clerk can answer any questions you may have in this area.) Please email the following information to assign@gnu.org, and we will send you the assignment form for your past and future changes. Please use your full legal name (in ASCII characters) as the subject line of the message. ---------------------------------------------------------------------- REQUEST: SEND FORM FOR PAST AND FUTURE CHANGES [What is the name of the program or package you're contributing to?] Emacs [Did you copy any files or text written by someone else in these changes? Even if that material is free software, we need to know about it.] [Do you have an employer who might have a basis to claim to own your changes? Do you attend a school which might make such a claim?] [For the copyright registration, what country are you a citizen of?] [What year were you born?] [Please write your email address here.] [Please write your postal address here.] [Which files have you changed so far, and which new files have you written so far?] From unknown Mon Jun 23 04:09:40 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 18 Sep 2021 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