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.bugs Subject: bug#58921: Tab completion hangs in eshell Date: Thu, 23 Feb 2023 11:25:15 -0800 Message-ID: <714828fe-bf60-f991-363b-6ee86fd70c30@gmail.com> References: <2cb2b8aa-0813-5eae-3bfc-27831b3d50dd@housseini.me> <010201842d4961c3-56e13f9e-0c67-4fd2-9731-657c131da32c-000000@eu-west-1.amazonses.com> <537afe67-809e-c09b-db84-05f41ba5d3b4@gmail.com> 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="14912"; mail-complaints-to="usenet@ciao.gmane.io" Cc: reza , 58921@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 23 20:26:20 2023 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 1pVHER-0003gE-HA for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 23 Feb 2023 20:26:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVHEC-0003xp-7N; Thu, 23 Feb 2023 14:26: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 1pVHEB-0003xf-00 for bug-gnu-emacs@gnu.org; Thu, 23 Feb 2023 14:26:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVHEA-0003qW-I8 for bug-gnu-emacs@gnu.org; Thu, 23 Feb 2023 14:26:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVHEA-0000mj-EC for bug-gnu-emacs@gnu.org; Thu, 23 Feb 2023 14:26:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 23 Feb 2023 19:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58921 X-GNU-PR-Package: emacs Original-Received: via spool by 58921-submit@debbugs.gnu.org id=B58921.16771803252963 (code B ref 58921); Thu, 23 Feb 2023 19:26:02 +0000 Original-Received: (at 58921) by debbugs.gnu.org; 23 Feb 2023 19:25:25 +0000 Original-Received: from localhost ([127.0.0.1]:35388 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVHDZ-0000lj-CR for submit@debbugs.gnu.org; Thu, 23 Feb 2023 14:25:25 -0500 Original-Received: from mail-pj1-f46.google.com ([209.85.216.46]:38723) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVHDX-0000lW-S5 for 58921@debbugs.gnu.org; Thu, 23 Feb 2023 14:25:24 -0500 Original-Received: by mail-pj1-f46.google.com with SMTP id qa18-20020a17090b4fd200b0023750b675f5so342281pjb.3 for <58921@debbugs.gnu.org>; Thu, 23 Feb 2023 11:25:23 -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:cc:to :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=o5jm9bLR0y3YE8XIIJhNScg/E7QMnDEEkipbI7oER7Q=; b=aaRKDLre6M6J3Q+U1JXYTV767d6yA+VIJT2JCNs5rkrm/k5qr5nlyhLzGurVHDUdYd ljrDu5TihvZ/q6GzpEgkBuWiG5oQ2D2M1Is19ki0HY5e7HwVsE1zV6x/D1+an2lKYdUm nLTrr0biVV+r+HeuXDGbj8laPwVm6EkS7HQT1Z33jMsEpmMo6l2u7Bk8sFQLop0zaq6M aDQ8koJUVeGdtWWeSecczWvJyEIObxfiOu2igYdQb8i6Pr+6NPgSveH5p8THLG95I7WP qF5MA7IOsnLbvcM4rpJeDoV7QCsO3l/mhnpfwdmmGaqD0qhRbdjMdcjUxKYoPqDIXMRP U5ZQ== 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:cc:to :content-language:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=o5jm9bLR0y3YE8XIIJhNScg/E7QMnDEEkipbI7oER7Q=; b=DD0A9av0XoBeJ+A/1xajnjIGotdSoFGekJOWTc/hHN5wMQncfNN17hra8KG7+LY8I7 73ON4cehVcKJ8HqMI4an8PfEwM6RbZW/xwKHDF+OOjLdm6CF5fAcX5swgCyylcGHw+Bu +D5yZNdxMpDi2R3gQ/lzXggbSPYNSa3c7f9N8FAbFg4m4ZmEcRpNyCHiuIraLXi/7Zkq NErTNwpUwNGE1UUdRQFNCR2+q28EqjVIthNdfRIpGvBSlg9QmndbqpzHrcBeDdKfpleJ jnKvgmxXNmK9iWI4FYwW/GvH25t65E6Fb556Mycg0kFq0reFmR5kJZYTmJPHXLq2Iz4C eTsg== X-Gm-Message-State: AO0yUKWGo1fBq05di08GLOxlNTo6iM7gDF+pE20fWHbBRg0tftTRaIrQ wClreqFlMAYeopQe7OK+jUk= X-Google-Smtp-Source: AK7set/NC0C8bFZ6B63pAlI3ADyzC05t4P35MFF6binhNZevdc82LWEW0D08D7CWlgdSwpvzDcYqOg== X-Received: by 2002:a05:6a20:7d93:b0:c7:23ad:63eb with SMTP id v19-20020a056a207d9300b000c723ad63ebmr11820595pzj.10.1677180317831; Thu, 23 Feb 2023 11:25:17 -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 n2-20020a62e502000000b00589a7824703sm2104195pff.194.2023.02.23.11.25.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 23 Feb 2023 11:25:17 -0800 (PST) Content-Language: en-US In-Reply-To: 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:256520 Archived-At: On 2/23/2023 10:08 AM, Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors wrote: > This looks good, but doesn't that still leave an inf-loop bug when the > input doesn't (pcomplete-match "\\`--.*=" 0)? Testing this manually, I think it's ok. Prior to my patch, the following works ok: 1) tar potato 2) tar --potato However, this would hang: 3) tar --potato=russet So we just need to fix the case where the argument matches "\\`--.*=". I'm still not really clear on all the details of how Pcomplete works, but I think case (2) works because of this code just before my diff: (if (pcomplete-match "^--\\([^= \t\n\f]*\\)\\'" 0) ;; FIXME: Extract this list from "tar --help". (pcomplete-here* '("--absolute-names" ;; ... "--volno-file="))) That is, if we have an arg starting with "--" and without an "=", call 'pcomplete-here*'. Even the arg doesn't match anything in that list, it should still move forward (I think). However, when we have an "=" in the arg, the function instead evaluates the 'cond' block that I modified, so it needs to be sure to call 'pcomplete-here*' (or some other function) to make forward progress. Maybe this should have some regression tests...