From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id a54da7e2 for ; Fri, 9 Aug 2019 12:00:36 +0000 (UTC) Received: (qmail 9435 invoked by alias); 9 Aug 2019 12:00:29 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 24140 Received: (qmail 3302 invoked by uid 1010); 9 Aug 2019 12:00:29 -0000 X-Qmail-Scanner-Diagnostics: from mail-vs1-f41.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.101.2/25531. spamassassin: 3.4.2. Clear:RC:0(209.85.217.41):SA:0(-2.0/5.0):. Processed in 1.739269 secs); 09 Aug 2019 12:00:29 -0000 X-Envelope-From: sgniazdowski@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.217.41 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=EGyxh4hqstUtNAN7U7YNGbtzEDCmFnk4eSvAdHPog78=; b=md0RnlezBc/ryKFG8u4Nh412V7gvs5CIGxQtYCrlEbNagt2DHkOiK23tkOMPzMiGuQ MJWIIpSgeFpE9VhIXcYdh0a1l5f+eLXrPYQaLaQQPeWqBYLabNDlTVUskpVALK13AuuQ EYbDx8iISN0PrAqXZ3nFYCeWWSLIX+Qpd6T5A5Yp+A1tZWzLQxuxNgezKqoqD03PENN/ aqLJnPZUKnd6shGAI8Hx0e99KbFG5TS02Dn9s7UAEUl+p0vz3GmI19AI8JHJLzaiCzGB 5JuX1tmpX7i28biPyJPVJDJcTwoL0mfa8xRF8xIKiXrwWobe74EVpTkMZbrkOUuJhsjK P2fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=EGyxh4hqstUtNAN7U7YNGbtzEDCmFnk4eSvAdHPog78=; b=tL96z/AY6GW+O1AtbvBPKyIVaGnDvJ1wTydZ6dlPXj907sFQ9avdtvZhXwz+YM+TLD gehIMr4ZRP2HAZF38zk/DO7U6IIjZt59Pu0Gcp3tlS04K8pW6Pfnu50PJRCLiGX3ZA5/ S6Oii5V85JY1HrEDgX2Uix5IfZAPhQoZWq0FTeb4NF1BzDkxN60sjG+l6wDS8NMkItmF RLu+00ED12Epkg+rngAgUs530oe8Z9PyLDUb3jo+r6rvIlM++Wl5azQ6AwJ59FHEaHyJ fAaBaDVYxawXNn5w9Ki9Vt4DJFh1vdrIEmfRIxMIjkuHAeV7tV51keE1HyMLTxRxd34c c4dw== X-Gm-Message-State: APjAAAWx04yWc7ajDpYRgYVjCAzJwTjish8Dqn43Snn4eqBffb0TWDnW vswVRzNr+oPtTSJAV1SvB6CtcR9uPX+zK/YXkvj65XLck9U= X-Google-Smtp-Source: APXvYqzgk4/GgckjR2JNQS+betSiYL7jzYrV1kGUa5K4RRIHeh/3e00dbLkLDXsWMlpD7l9YVfZcEmDXHKSni763v2w= X-Received: by 2002:a67:ead3:: with SMTP id s19mr12972480vso.147.1565351992678; Fri, 09 Aug 2019 04:59:52 -0700 (PDT) MIME-Version: 1.0 From: Sebastian Gniazdowski Date: Fri, 9 Aug 2019 13:59:41 +0200 Message-ID: Subject: A more advanced tracking of plugins in Zplugin To: Zsh Users Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello, out of the discussion with romkatv I've updated the tracking and unloading of Zle widgets in Zplugin. The stacking of Zle widgets now gets resolved. So for example, if 1st plugin will do: zle -N -- orig-vi-backward-char ${widgets[vi-backward-char]#user:} eval "_wrap_vi-backward-char() { =E2=80=A6do something additional here zle orig-vi-backward-char }" zle -N -- vi-backward-char _wrap-vi-backward-char and then a second plugin does the same, then unloading of the first plugin will correctly redirect the zle orig-vi-backward-char of the second plugin above the seconth plugin to the preceding vi-backward-char widget. Side for that, there's a new ice-mod wrap-track'' which takes a list of names of functions that should be tracked *once*. In other words, it wraps the functions with a preceding and following code that enables and disables the tracking, and then unwraps the function after the first call. You can use this to extend the tracking beyond the moment of loading of a plugin, for example prompts often postpone their initialization to a precmd hook, which can be tracked with the wrap-track''. --=20 Sebastian Gniazdowski News: https://twitter.com/ZdharmaI IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin Blog: http://zdharma.org