unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Jim Porter <jporterbugs@gmail.com>
Cc: reza <reza@housseini.me>, 58921@debbugs.gnu.org
Subject: bug#58921: Tab completion hangs in eshell
Date: Thu, 23 Feb 2023 14:34:39 -0500	[thread overview]
Message-ID: <jwvttzcdvrt.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <714828fe-bf60-f991-363b-6ee86fd70c30@gmail.com> (Jim Porter's message of "Thu, 23 Feb 2023 11:25:15 -0800")

> 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.

The way I see it, either we still have an inf-loop or your
(pcomplete-match "\\`--.*=" 0) condition is redundant.

From what you say the inf-loop should only manifest if we match neither

    (pcomplete-match "^--\\([^= \t\n\f]*\\)\\'" 0)

nor

    (pcomplete-match "\\`--.*=" 0)

and indeed:

    tar --pot\ <TAB>

seems to hang.


        Stefan






  reply	other threads:[~2023-02-23 19:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <2cb2b8aa-0813-5eae-3bfc-27831b3d50dd@housseini.me>
2022-10-31  9:04 ` bug#58921: Tab completion hangs in eshell reza via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-02  7:28   ` Gerd Möllmann
2023-02-10  7:34   ` Jim Porter
2023-02-23  6:57     ` Jim Porter
2023-02-23 18:08     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-02-23 19:25       ` Jim Porter
2023-02-23 19:34         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-02-23 20:43           ` Jim Porter
2023-03-04  5:37             ` Jim Porter
2023-03-08 23:53               ` Jim Porter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvttzcdvrt.fsf-monnier+emacs@gnu.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=58921@debbugs.gnu.org \
    --cc=jporterbugs@gmail.com \
    --cc=monnier@iro.umontreal.ca \
    --cc=reza@housseini.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).