From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Visuwesh Newsgroups: gmane.emacs.bugs Subject: bug#74944: 31.0.50; Double TAB does not pop up *Completions* buffer when completing filename with dashes Date: Thu, 26 Dec 2024 18:41:35 +0530 Message-ID: <87wmfmd1x4.fsf@gmail.com> References: <87msgtyx32.fsf@gmail.com> <87cyhlusjb.fsf@ledu-giraud.fr> <87pllk0wn7.fsf@ledu-giraud.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31100"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 74944@debbugs.gnu.org To: Manuel Giraud Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 26 14:12:21 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 1tQnf2-0007vo-FR for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 26 Dec 2024 14:12:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tQneo-0002Wt-Sc; Thu, 26 Dec 2024 08:12:07 -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 1tQnem-0002WX-39 for bug-gnu-emacs@gnu.org; Thu, 26 Dec 2024 08:12:05 -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 1tQnek-0003Us-JV for bug-gnu-emacs@gnu.org; Thu, 26 Dec 2024 08:12:03 -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=XFkFPC8d/IyG/LWl+M16P1E3EU7ZsiyntVOZgu11PcY=; b=lUHnDQMWym6n8B59c6HVwOCpxSG7grC08HBLOwmHDscYTWIDFV+leXp0OwHCIQsGkQF3HsUUjfoLCmiHE1fvHscfD5b1LAFbeCJY8wc5fc3qDjl0AT14nXtv72GVXdqa55j0PbQwzMXLzQGR3//1HSqqvI6w5mqZN5Tas6kZ2Q6AE4UKP9F6LUhWxRtTs0/84g4U2TY9waw17uIFziJvrnJzT5tCQIx9HeoJAOsPV1bU3cIB0eThGrux0NekPnnq/3J7p4fkIT/yW69outZj93nKZG+2pl4glnwmtiCUFmuiSoDRO3vuyeY5x7BxFKEq8sRANgXZHSa1BMh9ofD+5Q==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tQnek-0005ON-4a for bug-gnu-emacs@gnu.org; Thu, 26 Dec 2024 08:12:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Visuwesh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 26 Dec 2024 13:12: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-Cc: "Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors" , 74944@debbugs.gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.173521870720706 (code B ref -1); Thu, 26 Dec 2024 13:12:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 26 Dec 2024 13:11:47 +0000 Original-Received: from localhost ([127.0.0.1]:40442 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQneU-0005Nt-Q8 for submit@debbugs.gnu.org; Thu, 26 Dec 2024 08:11:47 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:41744) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQneQ-0005Ng-2T for submit@debbugs.gnu.org; Thu, 26 Dec 2024 08:11:44 -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 1tQneP-0002Uj-Qv for bug-gnu-emacs@gnu.org; Thu, 26 Dec 2024 08:11:41 -0500 Original-Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tQneO-0003UB-5z for bug-gnu-emacs@gnu.org; Thu, 26 Dec 2024 08:11:41 -0500 Original-Received: by mail-pl1-x642.google.com with SMTP id d9443c01a7336-218c8aca5f1so89038555ad.0 for ; Thu, 26 Dec 2024 05:11:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735218699; x=1735823499; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XFkFPC8d/IyG/LWl+M16P1E3EU7ZsiyntVOZgu11PcY=; b=EWnapqCk7x5eoJ6AcRXwOyCYZgZCKmceniq7D1kpn1ZoOteNkhxTfthyoo3v+9biie 4YWpRdFsN5PnBAcvOhBuvy8uOoc2Djvmo6DtoGeMuHuK+eAm22om1lHjJCWCsqEAO6/u 2tNN92z/PhYfXS1s0OhE09ZUSn1T6sXymmMM5z/bUs6ssuAFmU0N8dQeAo1lj/UX7Cwp RFP8LimgDb+Ewc9Hyn4cmaVJuDXGYP/QU9qiutgC2pjybea+ZQmqfvwRou0D2IsVIFKc 7TvcuTU4/hf930OgF4Tq+gEfwT6jkCmSCEmJAyn6HOEdIrlH1Qu5arbaMRDV0GyDdws8 FlkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735218699; x=1735823499; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=XFkFPC8d/IyG/LWl+M16P1E3EU7ZsiyntVOZgu11PcY=; b=tB0qa4l4XTxcI9RGk5v5H++Lq9wW9s4C3y02J84CryRqWVATDajF61QTmFMGrZBWY9 /bFvd5gqlL8q9iZlHU7XHP2pEkjTgctYZOein0YhxpulCWvSGu2uimPAsI2Qxm4bV/Qx aFumS9DChn+4VA3/of75XGNm/Uj2sos7huWoDZPS/6pfGjEa+ignU7N1goRAWH4qGzTQ g2NfxJD7Ty1zhp9Ns4CNHyiFD5umw6LLvg3jJFSBmCSDh4fd3EBTR+ZevAEi3FGdXxTB rtmY1dQqAEyg0Cu1yziU2qPZKD4rDXzA8sxqxINrN7eJLYRgqex9WHqcJYJr8unCgMx5 JjmA== X-Gm-Message-State: AOJu0YwKTVMFNhxKz9QNdjBcqPzptU/hlamiycejMfItS230AEMtH43E rZkhTlvnEVeodj/u6BfNP1rGrlvEH45lkPCRcY/98H2PW0KnLqVQ/FALrE0G X-Gm-Gg: ASbGncvHXafIgpJaSYSYwU8xcfcITfyTuBqLIvVYkh3tW4BqiRbt6Au3nlV6TvU1RTP 75UOIENE4E1o/JwRxLcflVIDk638Y4gPvCC6S0Xr66jr8nG/GEiqEB7xxsDjI7l2IC2bgO6Xt2W RnIDOK60xG8VU/Fd8HEhl1Mum9JPQ6i8JE4qKW4v7orPeqrPFmzxawv/jJi3J3io84kMqRbtErW SKc5q9jv21WraEv4lHBebseum7KaXGc7rqp7wwUSDFVl1U5xtU= X-Google-Smtp-Source: AGHT+IG7PSJ19rBGlnikQ0zS7Kphsq2WI00GXunFcNiSaILV0YdAEBG8hJ4dIRQQe0SdOMgqPeDoNA== X-Received: by 2002:a17:903:24e:b0:215:5625:885b with SMTP id d9443c01a7336-219e6f28552mr340570325ad.52.1735218698895; Thu, 26 Dec 2024 05:11:38 -0800 (PST) Original-Received: from localhost ([49.205.85.12]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-219dc9705c1sm119476475ad.101.2024.12.26.05.11.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Dec 2024 05:11:38 -0800 (PST) In-Reply-To: <87pllk0wn7.fsf@ledu-giraud.fr> (Manuel Giraud's message of "Sun, 22 Dec 2024 12:45:00 +0100") Received-SPF: pass client-ip=2607:f8b0:4864:20::642; envelope-from=visuweshm@gmail.com; helo=mail-pl1-x642.google.com 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, FREEMAIL_FROM=0.001, PDS_OTHER_BAD_TLD=1.999, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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:297768 Archived-At: [=E0=AE=9E=E0=AE=BE=E0=AE=AF=E0=AE=BF=E0=AE=B1=E0=AF=81 =E0=AE=9F=E0=AE=BF= =E0=AE=9A=E0=AE=AE=E0=AF=8D=E0=AE=AA=E0=AE=B0=E0=AF=8D 22, 2024] Manuel Gir= aud wrote: > 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.=20=20 Thank you for looking into this. I have probably lower familiarity with it than you. > Anyway, here is what I did (and think I understood): > > - First, I instrument `shell-filename-completion' with edebug >=20=20=20=20=20=20=20=20=20 > - 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.=20=20 The second call which moves the before the first '-' makes sense to me since to complete further one, one has to insert text before that character. This happens elsewhere too so I am not exactly surprised. However, I think this is where the capf gets stuck since Emacs thinks it has to complete an option / a flag and the completion engine stops. This is my guess, anyway.