From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20733 invoked by alias); 13 Sep 2016 17:22:12 -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: X-Seq: 21894 Received: (qmail 20300 invoked from network); 13 Sep 2016 17:22:12 -0000 X-Qmail-Scanner-Diagnostics: from mail-qk0-f172.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.220.172):SA:0(0.0/5.0):. Processed in 0.317872 secs); 13 Sep 2016 17:22:12 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM,SPF_PASS, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 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.220.172 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=2bpzzxNie8mMF6a4EKuab2d0E2MaZhMi6xm4X9KYWCA=; b=rHp6J3AMVqGCreGfMrhi5Jx30hH2SAxnMjXH8O8s4KCEL4k34igsBkCudM51ymOorm Ty26raeEj0XK/twUSrGWc4s2U4vv3Mr/lxlXM6yeHaROQUQ/jCNZrZ4WfnC0xTRhCIYB TsM/HlabYw0y80l6BfUSegW/rUaGAa8P6lTZcafz8rMTy6mJfsgr1paboDCwJPwk1Ehd SpnrJBFpPPuFkqWvs8gIYDebLgmGTyr9Y8B+LYQwGSQs8rMQ29WNOOdHU73hVRRxkC6z Au94mvzgJ63sVwKbqAhwjO50L+C9MYlx/jtPC/5ttTXlEPMNf8HyGBTrofZuAmUioBlH Vgbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=2bpzzxNie8mMF6a4EKuab2d0E2MaZhMi6xm4X9KYWCA=; b=nCdmRZHTNqFyk9UZJEICdx/nMZrG2ny0IRxHUX8M5tmGh8fM8MZqR0nvyARIE2qiUM So7Gzj+oL7/OwYwqYPNt63nUUlI37aTZ9+M/e4AvB/7Zzu85BLiEea5pCxH/hkmONic5 U0PVGTMbXUWimX4zILHaH6Vrr5wudOTRqaZBvS2XmCCcHJH1cWicu+NcqjkyNcwHwScY +8lr4KrIZ4DJC49qE7KMEcFOmWXU9ElqJ8uCnGUpxWwx/1DWvpq/+17weoDT2WQv+tdI +BkzIMzxQ98nMLj13kCxeW4ZnhNE0g/FddE12c4l+PclrRlv4zHT2ganjCk+g9dzm9YA j8lw== X-Gm-Message-State: AE9vXwNKVYFew7n9iWOuj6P9udsZT1TtQUqpiaWiXkzRrjJZ2duM1w07jLhG57/hvsmI9K8g06q7NuqyOFYDqg== X-Received: by 10.55.41.198 with SMTP id p67mr1693726qkp.217.1473781519393; Tue, 13 Sep 2016 08:45:19 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <160912103408.ZM25185@torch.brasslantern.com> References: <160911181347.ZM21403@torch.brasslantern.com> <160912080654.ZM24107@torch.brasslantern.com> <160912103408.ZM25185@torch.brasslantern.com> From: Sebastian Gniazdowski Date: Tue, 13 Sep 2016 17:44:58 +0200 Message-ID: Subject: Re: Cannot use LBUFFER+= nor print -zr from zsh/sched call To: Bart Schaefer Cc: Zsh Users Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 12 September 2016 at 19:34, Bart Schaefer wr= ote: > On Sep 12, 5:24pm, Sebastian Gniazdowski wrote: > } > } The ZLE solution you gave is ok, but sched can start without zle =3D=3D= true > > Well, yes. It should be fine to do e.g.: > > if zle; then > zle -U "${(j.;.)commands}" > else > print -zr "${(j.;.)commands}" > fi > > If zle is not yet running, then it's going to start up the very next > thing, and will pop the buffer stack onto the new command line. > > If you want an implicit accept-line, then you're going to have to do > something to coordinate with zle-line-init in the "else" branch. The zle-via-widget method works: function __convey_zle_paster() { zle .kill-buffer LBUFFER+=3D"$*" zle .redisplay zle .accept-line } zle -N __convey_zle_paster Except it doesn't accept the buffer. I don't know how to coordinate with zle-line-init, any hints maybe? And it will be hard to do with print -zr.. So I include this method as option: # To put commands on command line, Zconvey can use small program "feeder". # Or "zsh" method, which currently doesn't automatically run the command = =E2=80=93 to # use when e.g. feeder doesn't build (unlikely) or when occurring any probl= ems # with it zstyle ":plugin:zconvey" output_method "feeder" Best regards. Sebastian Gniazdowski