From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Manuel Giraud via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#74944: 31.0.50; Double TAB does not pop up *Completions* buffer when completing filename with dashes Date: Sun, 22 Dec 2024 12:45:00 +0100 Message-ID: <87pllk0wn7.fsf@ledu-giraud.fr> References: <87msgtyx32.fsf@gmail.com> <87cyhlusjb.fsf@ledu-giraud.fr> Reply-To: Manuel Giraud Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20247"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: visuweshm@gmail.com To: 74944@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 22 12:46:22 2024 Return-path: Envelope-to: geb-bug-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 1tPKPe-00058u-1S for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 22 Dec 2024 12:46:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tPKPL-000090-V0; Sun, 22 Dec 2024 06:46:04 -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 1tPKPK-00008d-K9 for bug-gnu-emacs@gnu.org; Sun, 22 Dec 2024 06:46:02 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tPKPK-0003Ep-CD for bug-gnu-emacs@gnu.org; Sun, 22 Dec 2024 06:46:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=5vwd4wR6fSJKYWuJwPKy30GJ/5XaChp8MpOS+kuAVr4=; b=hWEBae5tm0kgBigt9/SvVRUoTpfF+R/unqJbY5Dd8hij2TsFwpg3NcSoXRINXHc2l95SSvbZkqWuaP60TpbjY+8vrhD8aJTH0zfAWVbxTZml1sZfQHgKjKnw5Lbjlxve1L2l3CKeIiVw4iKFxYuTvkRFti9pjGITHPkt5k8n9Jf9zuf/GSI1oR5//0yN8PtaF6OChrZkR0brXiz0LE2l+N2mHW2DdVIZ9Ykool2tksiKMR5d8FRu5YZLLq9HYst4myKfEM3VJ41wogImkfGWCYa7LVuyi59b9qK4xOR8//Et0f5t5lgqBSQ/wPGuol/6dIXh6VqtHWlfBUznzBJZUg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tPKPK-0007ky-6J for bug-gnu-emacs@gnu.org; Sun, 22 Dec 2024 06:46:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Manuel Giraud Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 22 Dec 2024 11:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74944 X-GNU-PR-Package: emacs X-Debbugs-Original-To: Manuel Giraud via "Bug reports for GNU Emacs, the Swiss army knife of text editors" X-Debbugs-Original-Cc: 74944@debbugs.gnu.org, Visuwesh Original-Received: via spool by submit@debbugs.gnu.org id=B.173486792229760 (code B ref -1); Sun, 22 Dec 2024 11:46:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 22 Dec 2024 11:45:22 +0000 Original-Received: from localhost ([127.0.0.1]:49226 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tPKOf-0007jw-VQ for submit@debbugs.gnu.org; Sun, 22 Dec 2024 06:45:22 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:56482) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tPKOd-0007jn-FH for submit@debbugs.gnu.org; Sun, 22 Dec 2024 06:45:20 -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 1tPKOX-00005j-O5 for bug-gnu-emacs@gnu.org; Sun, 22 Dec 2024 06:45:17 -0500 Original-Received: from ledu-giraud.fr ([51.159.28.247]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tPKOT-00037f-OH for bug-gnu-emacs@gnu.org; Sun, 22 Dec 2024 06:45:11 -0500 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=9a4X27Q9 2XSndo6ASK3v/d6ZZObwiKgF0scFxl9enW8=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=A+KwnqJCu9iNCwEMcnH0ioah4cILGM h9yDPJMcJPFRCk7AktEq4LTzChJl04PlBKJshrRZHC+pSPrRB9F/RoCQ== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=9a4X27Q92XSndo6A SK3v/d6ZZObwiKgF0scFxl9enW8=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=iPXc6s1VykrsZR8Y+rnxpOxDX/BumNQtKU0eD8 yw5rku/a5stgiFLBcFqtJe9x/ZU1IzVFLdGF56c//qF3CoTnq/os0VhwZ7Qj1fib2WuKZ3 HcP9BOxjhidEDI4bUsLHNGweyd1SIzW1dfsHECDb88IXlExSH52I3k5H0nHj0I6Dp6cQ+a TyoMhk9UZGEozZvobiQMiaKi7LUjFP68pmsRvS4fg1/dDafaRcjtFKfH5wlS8IMC/xR6nB Rs7FJDXDcqCZOiaAYpdmg4ZsgGzvMCPMxFvyzvjAelVV6W+LTKU5U51iF2Nw+r27CYD5KG a4HeS/gYOx1lhe/aKNg0rvcw== Original-Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 559409b5 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sun, 22 Dec 2024 12:45:02 +0100 (CET) In-Reply-To: <87cyhlusjb.fsf@ledu-giraud.fr> (Manuel Giraud via's message of "Sat, 21 Dec 2024 13:31:04 +0100") Received-SPF: pass client-ip=51.159.28.247; envelope-from=manuel@ledu-giraud.fr; helo=ledu-giraud.fr X-Spam_score_int: 0 X-Spam_score: -0.1 X-Spam_bar: / X-Spam_report: (-0.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, PDS_OTHER_BAD_TLD=1.999, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:297591 Archived-At: Manuel Giraud via "Bug reports for GNU Emacs, the Swiss army knife of text editors" writes: > Visuwesh writes: > >> When completing filenames with dashes in them inside a shell-buffer, >> double TAB does not pop open the *Completions* buffer because it >> conflicts with argument completion. To reproduce, >> >> 1. cd /tmp >> 2. mkdir test; cd test >> 3. touch blah_blah-pos-1.xyz; touch wowow-pos-1.xyz >> 4. Go to this directory in a shell buffer >> 5. Type rm pos.xyz TAB >> 6. Observe how it completes to `rm -pos-1.xyz' >> 7. Press TAB again and observe *Completions* buffer not popping up > > Hi Visuwesh, > > I can reproduce this. FWIW, by instrumenting > `shell-filename-completion' with edebug, I can see that there is a > correct *Completions* buffer at some point but it "disappears" later. > I'll try to investigate it further. Hi, I did some more tests but this issue is tricky for me and I'm not familiar with the completion framework. Anyway, here is what I did (and think I understood): - First, I instrument `shell-filename-completion' with edebug - I enter "rm -pos-1.xyz" and hit Tab with the point is right after the 'z' - Edebug is trigerred and I can step through it hitting Space. - All seems fine, but at the end of this `shell-filename-completion' call (which returns something), Edebug is triggered again this time with the point placed just before the first '-' I really don't understand why there is what seems to be a *second* call to `shell-filename-completion' while the first one seems to have succeeded. The backtrace from the first call looks like this: --8<---------------cut here---------------start------------->8--- shell-command-completion() run-hook-with-args-until-success(shell-command-completion) comint-completion-at-point() completion--capf-wrapper(comint-completion-at-point all) run-hook-wrapped(completion--capf-wrapper comint-completion-at-point all) completion-at-point() funcall-interactively(completion-at-point) call-interactively(completion-at-point nil nil) command-execute(completion-at-point) --8<---------------cut here---------------end--------------->8--- And here is the backtrace from this "second" call: --8<---------------cut here---------------start------------->8--- shell-command-completion() run-hook-with-args-until-success(shell-command-completion) comint-completion-at-point() #f(compiled-function () #)() completion-in-region--postch() --8<---------------cut here---------------end--------------->8--- -- Manuel Giraud