From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] em-cmpl: fix completion of command paths Date: Tue, 7 Feb 2023 22:06:49 -0800 Message-ID: <4261f6b0-5464-4a08-5006-34ab411a7a19@gmail.com> References: <20230107121943.44658-1-nicolas@n16f.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="617"; mail-complaints-to="usenet@ciao.gmane.io" To: Nicolas Martyanoff , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Feb 08 07:07:41 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 1pPdcL-000AUa-0b for ged-emacs-devel@m.gmane-mx.org; Wed, 08 Feb 2023 07:07:41 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pPdbc-0005Tw-8I; Wed, 08 Feb 2023 01:06:56 -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 1pPdba-0005TW-3F for emacs-devel@gnu.org; Wed, 08 Feb 2023 01:06:54 -0500 Original-Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pPdbY-0007oW-Hq for emacs-devel@gnu.org; Wed, 08 Feb 2023 01:06:53 -0500 Original-Received: by mail-pj1-x1032.google.com with SMTP id m2-20020a17090a414200b00231173c006fso502571pjg.5 for ; Tue, 07 Feb 2023 22:06:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=hIkWlokZnS/+k6S28tPcv+UqrOlRfDhy23lVauSHNdk=; b=XSdjgvV/Y9ojecOMgKAkZrMFqa5heJ4nLGg8KQWRrTGOyz7y3eOKwCOAD4yp9NaDjm mS3ilA3NOGC4CjH+K9tl+IGH24o362a0qye5o9+prPbZAZM71ORhihPZRU80vhInQIJm LRp+naz+CVoU/FxrxswN6YoVOr4AXvV6xSMPpmkEj0xIHmG9nmH8Wh0lWfA8ZQRUMo1c xK+s25gvVUgqScUCk/F6RXWpHJ+w5U2gD8d0xpr78vf0QmrKwPGwdbXTGPrlBr2c/35M kBxUGReKRzuhG9j/zaV5TA00JNM9NAsVphZGC7O/Kmn5sKRJGyc5AwcmtO5JqJ20/l4I DzDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=hIkWlokZnS/+k6S28tPcv+UqrOlRfDhy23lVauSHNdk=; b=Q3bOyhZ4Z3y3JN90CJ2cAMUu1ykI69TynjFHxLxFOSGbVSTbAEMO5Xa3w61y0Y7I7B KYCZYPMXSlfdym4bw71LT4e/iPuA7k6zBx5JYDGOiZCf13867Wyu3bYYfXrWdmzQpxxj SEL+I4oaFH7+FCfLrEiukGdHXrqkUEhC1Hnf8hQgx7KkR3G+i8k3ozwcKdM3w03VC/ba Fk5Liq4XSxsN9Bnr5BI7rloSssOAJjYx9GrEJaly1ypv7YBezU65B0MNtGXnDgWTrlKt 4Q52hjqe1qbO0jEl+hdnTpQU17ELp0lOU9QAcXDfeAOes8y8GwyeMpNEDsgx6aSYw4VY Pu4g== X-Gm-Message-State: AO0yUKUKvly/G1fxTwc9MFtE1ld6cDEBNQ7kiB2DN5u/xb99MSnIRWHu 9ukZrnKZDEIQl6wCKK0wBGc= X-Google-Smtp-Source: AK7set9g9Lo2MNjGMxEmiCN9grwF19xl1LT0x6GN9+lmIi3doAfLei+QMH/7SyxX/Ab/gB3qo0zhqw== X-Received: by 2002:a17:903:230a:b0:196:2546:7cdd with SMTP id d10-20020a170903230a00b0019625467cddmr6909143plh.38.1675836410478; Tue, 07 Feb 2023 22:06:50 -0800 (PST) Original-Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id u9-20020a17090341c900b001960096d28asm7952511ple.27.2023.02.07.22.06.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Feb 2023 22:06:49 -0800 (PST) Content-Language: en-US In-Reply-To: <20230107121943.44658-1-nicolas@n16f.net> Received-SPF: pass client-ip=2607:f8b0:4864:20::1032; envelope-from=jporterbugs@gmail.com; helo=mail-pj1-x1032.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:303045 Archived-At: Hi Nicolas, On 1/7/2023 4:19 AM, Nicolas Martyanoff wrote: > Completion was originally broken by 82c76e3. > > The use of `completion-table-dynamic' was introduced in 899055e to fix > bug#48995. However the following issue remains: when completing a command > path, absolute ("/usr/bin/") or relative ("./subdir/"), a space is > automatically added at the end. Thanks for this patch. I'm looking to add a regression test for this so that it doesn't crop up again sometime in the future. However, I can't seem to cause completion to fail as you describe, so it's hard to write the test. I tried reverting your patch on the emacs-29 branch and then running: emacs -Q -f eshell ;; Within Eshell, enter: /usr/bi This completes to "/usr/bin/|", where "|" is the point. However, that's the correct behavior as far as I understand it, so I must be missing something. Do you have more complete steps to reproduce this?