From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#50470: 27.1; 'company-mode' 'eshell' Date: Sun, 19 Mar 2023 21:34:52 -0400 Message-ID: References: <87h7evegav.fsf@debian-BULLSEYE-live-builder-AMD64> <154bd0e9-2779-5a28-5587-a845a982e39f@yandex.ru> <815516d6-262b-4ef1-786e-ec5b4199847c@yandex.ru> <01845bee-7637-76f6-2e86-2e2de91f6f6e@yandex.ru> <0e8cc089-63ae-71b5-9617-ce76478d3ba4@yandex.ru> <602e2d92-7914-0e2b-b06e-0d47d0ac8c99@yandex.ru> <20ee85be-aafc-8942-14ea-b0c2a1abc2c9@yandex.ru> <00ad5c72-20c5-d27e-2bc8-6436858bbd8d@gmail.com> <5d0b85af-2cd0-bc7c-16ca-17ecd2cbf12c@yandex.ru> <0c63be3e-5c7d-bea4-e23d-606abe59a847@gmail.com> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31192"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Christophe , 50470@debbugs.gnu.org, John Wiegley , Dmitry Gutov To: Jim Porter Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Mar 20 02:36:24 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 1pe4Rj-0007vN-ND for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 20 Mar 2023 02:36:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pe4RR-0007wv-Ey; Sun, 19 Mar 2023 21:36:05 -0400 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 1pe4RP-0007wS-An for bug-gnu-emacs@gnu.org; Sun, 19 Mar 2023 21:36:03 -0400 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 1pe4RO-00034P-Lk for bug-gnu-emacs@gnu.org; Sun, 19 Mar 2023 21:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pe4RO-0002Qn-9R for bug-gnu-emacs@gnu.org; Sun, 19 Mar 2023 21:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Mar 2023 01:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50470 X-GNU-PR-Package: emacs Original-Received: via spool by 50470-submit@debbugs.gnu.org id=B50470.16792761069273 (code B ref 50470); Mon, 20 Mar 2023 01:36:02 +0000 Original-Received: (at 50470) by debbugs.gnu.org; 20 Mar 2023 01:35:06 +0000 Original-Received: from localhost ([127.0.0.1]:53333 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pe4QT-0002PV-VO for submit@debbugs.gnu.org; Sun, 19 Mar 2023 21:35:06 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:37758) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pe4QP-0002Ot-35 for 50470@debbugs.gnu.org; Sun, 19 Mar 2023 21:35:05 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id A2F281000BE; Sun, 19 Mar 2023 21:34:55 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 46C4010008C; Sun, 19 Mar 2023 21:34:54 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1679276094; bh=nGoh0aBhmbZoQLevRTcBRmTu0wqjx4bI1pSbIyd6pRY=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=jfAEIeNRAYh3/ygRxRDpbKT6EVtbd3+gW2UlFm772DBpnl8lCZY7vXSTrzs3Z/++F gcSykOmYdWOCVJ2q2+JfnNZQlOQUMdJsUn8UppKbJd2Zcs/pBC1fKlT+sbca6sB9PL Csp/T7qGb6pKSMBV3eI/rznAXBDboikrC7REQdNSZkiHONNpUd1QW64U3DcI8Igsg5 CZxcZOHuRFuBqcao1ebTjcz8CRwQ8xeJv+55ThpU+dE5WtFoOLLGVx97XMHzChwi6m /ud0Sd6R45g0lKJg+osjjKu0uQwg0MadPUf+ob+HKVUUdvKDhlec7ggRDL+MEB3yXc brr4mqxsWTP2A== Original-Received: from pastel (unknown [216.154.34.24]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 0C7F31232E5; Sun, 19 Mar 2023 21:34:54 -0400 (EDT) In-Reply-To: (Jim Porter's message of "Sun, 19 Mar 2023 17:30:56 -0700") 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:258268 Archived-At: >> Ok, here we are. >>> - (when (memq (char-after) eshell-glob-chars-list) >>> + (when (and (not (bound-and-true-p eshell-parse-for-completion-p)) >> >> Can we (cheaply) arrange so that the var is always defined at this >> point (same for the other uses further down in the patch)? >> Maybe by moving the `defvar` elsewhere (e.g. next to >> `eshell-parse-argument-hook`)? > > It's a bit ugly, but I'm trying to follow the conventions in Eshell: since > completion is an optional extension module for Eshell, other modules jump > through hoops like this to allow the module to be not-loaded. I definitely don't want to force preloading that module. But maybe that var could have a meaning that's independent from completion, thus justifying to move it out of the completion extension module? E.g. something like "keep parsing free of side effects"? This would also have the benefit of clarifying the actual meaning of this var: defining a var based on who uses it or how it's used is always a source of trouble. > Another way to do this (arguably more Eshell-y) would be: > > (when (and (eshell-using-module 'eshell-cmpl) > eshell-parsing-for-completion) `boundp` is definitely much better. Stefan