From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 1619 invoked from network); 4 Apr 2021 19:32:14 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 4 Apr 2021 19:32:14 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1617564734; b=BMyd3v5LM/EEPEgDkhfaxO5VfStKshYZje/x4eCFOU19eWzqNEMNqXJ4Vh1Rh+uCQcG1IOG472 h9C2KXPxyudivlC7DWSsovF86N4fuVYo6tJoJVcHu1FtbciQUEl9INehNYGfYBJTrPYAQGmOFT 5bPHnnd/KKDQ5PyTvVPjmr+N09TS+RWIcIhl/TE95/hdqCirUtLMQE2Bfqo7ytPu1RKMmYD6lz XOs4zUCvK2sMtE6bz9DYc5ntwWs6IJ+cuDRLcRpzFzhyUFxl6MTPVsHamJyAXEVhiavemws9Iu AhFwm6ghNSuS5IbHzKS977ILT8O9DNal6bhdIqwJip+HDA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ot1-f48.google.com) smtp.remote-ip=209.85.210.48; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1617564734; bh=+9lK5eGuxrFRNydqXITgZ0QSyBLOalqws2Kdw3QF5m4=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=OjiEGSRtNMvrLwks6pbc5Mbco7wVaYr1x/qiz+a7kA09nagkIJ3Gi7P/lgTkkKIBHg0t4+4KkY TTaZRwzVdRb7xl0KFrLKoAJEFowiu5PH8850e97AH7Vbtmvo2l4Kgz4fwygCodii7EREOj75E+ t31JC9+eWk3AGB6JEIP8zVjULw1H1meV0sF9fGQvnNZjC8u0+GJCqwzSE4BVv3G9C59h2Nuev0 99BRBFEed4NxTCwYVUoBMc2TW1Qm9CN1sc3YG7EuB+EXAzZbEs9tL6HCaQFytqZdd9J7BtX0y8 03AMWjBrfAM/IFRc/+w+ztKEZm35SbpbYzAykh28XXHnZA==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=b2x9wipkm9bOlhSGqzNk3TJOF/8JT9I+pQDsLIHPwbU=; b=mz4wWv9Xi7pxwuUPoV/Qcj6rFx VuH69lEjUZ9r22nOPlj5cGzFWtd+dUJUHDvDt4pqjO+sBm8kY9mXNtpIKeY2YdqMt7SzNeH23nJcG p9few7cdJUFxN5MwOfvMWWItYbZYKyfLdFCxXh/ktEe5uA5PfgjAYJvvC6ahj7IHJl1v+trEvQ6uk 1cpkrZfyeBoPcx8CLdhN9cjciAcEDg2E9W8Q3pejxWJYOqQOEV6GCGp4F4RExaf6H3BnQdtXzoCeG 94w9hkPgsWcRag0qwRyYp4sHXutTfW/ltk9eiiTWl9wepd0ksUY6bPXcHDC/3xeF1ekmRHNn1fEwl iMKtamYg==; Received: from authenticated user by zero.zsh.org with local id 1lT8Te-000Ge3-Pz; Sun, 04 Apr 2021 19:32:06 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ot1-f48.google.com) smtp.remote-ip=209.85.210.48; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ot1-f48.google.com ([209.85.210.48]:37608) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1lT8TL-000GVo-QG; Sun, 04 Apr 2021 19:31:49 +0000 Received: by mail-ot1-f48.google.com with SMTP id t23-20020a0568301e37b02901b65ab30024so9630522otr.4 for ; Sun, 04 Apr 2021 12:31:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=b2x9wipkm9bOlhSGqzNk3TJOF/8JT9I+pQDsLIHPwbU=; b=Yzy7jJUEoazv/PotuSyT45I1gEK7Ql6WWujorO8riMLnMbV0X/4Exrl5cc8kD58Q7N j73qpJ6hiayPmitJ49kQ+tmAG45xInEnDGpRMuhSm7HEqSs8Fm8zfdsSFKtD8Oar8Lps 3Ew2FrCnE8dGiVw5Wf0WdcwqmXCQMIJj2I/dE0nYnBWRPVBfGGdQo8BrzMftuZ2Wwf/c JKql7T1vxDnKvJGOiGgt39T5F/fESIaGMqejVcLdbpVIpDz1tRSHLnPMh5o1GTI99aD7 JxDCDDA/tHlW8X12Bv92kSB/AuNaKUSrmb2UaODXcf3oY6SEsduCpq8lOoosRFSDAUAI TwYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=b2x9wipkm9bOlhSGqzNk3TJOF/8JT9I+pQDsLIHPwbU=; b=rbKV3W3oxnAX8wZM7bpm9MPzDXW3rRH+LRJLJURsKwjEmreVt7ldl/UFVQKLSoGn9q nFVxPlRqFpa7HyXqyj863aopQVPr2npDxFxMCk7CoifJwBw2CGNpUWF1crYwBoIDfRKz vlB4Gzu1n1wzDvUNgDPL4038zC50a63cQlAe53jniKTiDNbhVj/scNfulEI5Pg5iQmbi H4Aj9sO2UqgG7u5btELtLl/9vR0lKn+SC2/oCLTLutQT48+NLClbJaXRfHlBU4/L9HJo dF/rJr3FQ1pZ1iqc49YRlqwTNlk3r6EcxuZO3beDZJP4z1dYLR2yJxfe6ZHG/N4Pf50o dPZQ== X-Gm-Message-State: AOAM530o/uIni7Ikehg/nZUqLXZnaBpySh/h0elj66FjFPAWjcCYMnOu N7PuiOKpBBUGHEBCqUHtHyOfbj/jlvOJkK/0gjVTNQ== X-Google-Smtp-Source: ABdhPJxFGj675XS/cTHIJGi1Gv8F6XOtaNCOQJhfludufSE09Av6IKaE+099otRNovTFJXE2qoklHQwhX+RuWGZCP94= X-Received: by 2002:a05:6830:55b:: with SMTP id l27mr18850730otb.260.1617564706422; Sun, 04 Apr 2021 12:31:46 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Bart Schaefer Date: Sun, 4 Apr 2021 12:31:35 -0700 Message-ID: Subject: Re: Proposal: Let compinit make standard widgets with _generic instead of _main_complete To: Marlon Richert Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 48397 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: On Sun, Apr 4, 2021 at 11:35 AM Bart Schaefer wrote: > > The problem with calling _generic at all (right now) is that it messes > with $curcontext in a way that may break other functions that rely on > _main_complete behavior. If we can invert the call sequence so > _main_complete remains first, then _generic itself can be tweaked so > that it does NOT mung the context in that circumstance Sorry, that's also an incomplete explanation, and it might not be only _generic that needs tweaking. Suppose I want to invoke _complete_debug. It's supposed to emulate complete-word, but has a hardwired call to _main_complete. If complete-word is _generic, then when I try _complete_debug I won't get a backtrace that actually matches what happens when I complete-word. If instead _main_complete runs _generic, the backtrace from _complete_debug is correct, and there's an opportunity to build some additional intelligence into _complete_debug because it can check which widgets are _generic. Similar things apply to _complete_help, etc.