From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: from zero.zsh.org (zero.zsh.org [IPv6:2a02:898:31:0:48:4558:7a:7368]) by inbox.vuxu.org (Postfix) with ESMTP id D85952017C for ; Sat, 30 Mar 2024 20:15:11 +0100 (CET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1711826111; b=bsNjzYZEUzp54pxJG8R5m2r5iM/HI/1oERUk1l8PWjlBRLIlt4IwucznwPlN5qOblGg+XG6eqW S4sVE0GAv04X1QnuQJyOW9rgaZ7qVmWMX/26ViwAeuEVM6JrN89gEEQELU1TVXSZEAk4zan/jC PwoW0X0wP5yq9dKJqlKJ2W2JQ9oMU8Dirfgi51r6qSUUq43Lz0gUB2yulHTOgLx+HtOLX+iclM 1cyJb9W38RV3TH19L1dH9n91A7DY3UygHmExARytyL63lCWLV8b3DsvCsBL0r3Oq7CChVQk9ug fumLSzUyFZJxqLMhhzA8aVqEuqNR0fQh94OvN6itOTqZbg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f52.google.com) smtp.remote-ip=209.85.218.52; dkim=pass header.d=brasslantern-com.20230601.gappssmtp.com header.s=20230601 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-20210803; t=1711826111; bh=oWehyMPeyWHstqyzNm8dXUZuEpFc0RDl59psf289aM4=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:To:Subject:Message-ID: Date:From:In-Reply-To:References:MIME-Version:DKIM-Signature:DKIM-Signature; b=CFOXYb/QcpEOuYDzuqcbdJ0lqKXe8oEzJP3h/mq/eJtawvslT4GVLmmjOoo07qUwc46ddG3PBU o3Pmpc5UBVEyLp2t+849FUqoQ1funC2qf62lQ3GcvAEFJI87ZBoWyOZAso7wuELKuXQStOLn5q aU+BZf9psQShghPoXR+EBO6ePwj19PNOPx0WE8vIR87Y2avqO7EP0ewlejFVoWfk7FOFo4PeeH dzDu+8jCke3sFvPGAZ38zjrVLg9lSTOH3xYLKvWPFeLps64LazRRzen1ZehB5mmhUYQW77QTXE w2wJAtw3I1aezChDBSbEfAt96ksd+r8xGXaERO6uq8y8qQ==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding: Content-Type:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Reply-To:Cc:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=ywRHpqh8wbAvqIZr3HpIkdp4wTFFANXauiZ4ERZQ2w4=; b=iBMd/Zh45KcS8ZxdmzFz5y4hAH Ekjd7ZaOKp/ZxBdN8aO2L3lmNa4Sws0bdt1uZM2foQadUu3PjxHQAX4gC7ht2hVLRQonLV/GH952S 3Z5mgo4m++c1xkufo1wQbNpcNUWUhJyEL4jRVI4KDNtRICJlh8S6Y3Juw5s4GK7hKAiiKrZH34qzw tsK52taMwvyas53L10uGMotyV0+0Z5JTrMiYNWv9jlKiGbDwo9fVKnRZ9ZJ7DFogbP3n4g0IIecIv Ly5F1IoiPPJZdnfYGI1gppX8bkNQ8jMe3INbRjP8L0A2wHaTu6asagGYxG628n9hdldU1ZrvHwzTn mqH2lLVg==; Received: by zero.zsh.org with local id 1rqeAX-000Kyf-Og; Sat, 30 Mar 2024 19:15:09 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f52.google.com) smtp.remote-ip=209.85.218.52; dkim=pass header.d=brasslantern-com.20230601.gappssmtp.com header.s=20230601 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ej1-f52.google.com ([209.85.218.52]:58711) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1rqe9v-000Kel-5X; Sat, 30 Mar 2024 19:14:32 +0000 Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-a466e53f8c0so377609366b.1 for ; Sat, 30 Mar 2024 12:14:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20230601.gappssmtp.com; s=20230601; t=1711826070; x=1712430870; darn=zsh.org; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=ywRHpqh8wbAvqIZr3HpIkdp4wTFFANXauiZ4ERZQ2w4=; b=r64cowKKMmnxavEwG8quDOdEA21Vwbv0Wi+zvSAsD9JQD9YwTk9nvasD0iBOmc3DWE 01PIP7uWMqQ+wF9F5bap0prgyEWucL5JynjFUG5OeRBLiAUdz2rT47r6s+7BqrO/aigq 0Wo4BoY6AaKEn1AGEpdpxHizpmN/bDckCquiwkzjedGphJVgjChZ6xGhEqc3Xlkyr/61 eRq9O4RwEACW4YSCG9pM5Wb6hgqy2htIPEXyqd3uPn/x2adZrZRyJWkp8TV1bbYoFAeG 2cjoaxHyAqHOsa+BElUaoJKgybpoL1bu58I7F2OOaYXHqwPUNFVuHH4T4FJts9psx1VY kUCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711826070; x=1712430870; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ywRHpqh8wbAvqIZr3HpIkdp4wTFFANXauiZ4ERZQ2w4=; b=GLOh0UdPiIoQr2PCDWJNEpMCJlff2GwYIaIUxNR2lrRwIYzySN/JPgyJXzkLt2Ct1C Fl00JcEShTB7EVKiPQgRd24+bcRmYNU5GIfIgFZfaJoLIamDKHCnPNzVlpfsB0svQevp R2vhgknBsw8lu6dmwJ1yP+zM21uUNBLMJL3ViC/Y1TJIa/3MwLYr7cFJtnjFYTgOxN+2 LLtLLRTVFtzAVAN86/Sh23UNJa0CNf4vDbZ3TYtXZSBXycpJSlR3bfw4/iELUoO3khcd Y33dBg0ZD+PvGHcFcgl27KflzEsEJrrFYvMgQU7EnL9bla3vQzteInjYTy/pscsZIsOU Yo/Q== X-Gm-Message-State: AOJu0Yw2tj7ICXQnqMPwfEmjeID5bHbgpQMOBf9MqnMmsl+HZAH9W3Er UlFrX3j1Gi6xfIiPX8RpGY8WiIQNLBGKrTY/I0ogwKjPRwes1b6jfzbTgUx1gG00OqRB/fp8Zmh 8xqHJpm/rRGFS003ksIuAYN0YelalSLZh4S30HlUgRzynNsjFmODY X-Google-Smtp-Source: AGHT+IHKnB585IMRn8xdunjyR6xUGOD4gahQ/IE4QqmKdfzjD6GHDHzA7uaJo4mkKDsuT47RQe6ogxozTN2E8732NZo= X-Received: by 2002:a17:906:39c2:b0:a4e:1109:9007 with SMTP id i2-20020a17090639c200b00a4e11099007mr3809764eje.19.1711826070049; Sat, 30 Mar 2024 12:14:30 -0700 (PDT) MIME-Version: 1.0 References: <90949-1709342493.093890@W3fn.AXo8.ESGa> <65188-1711760801.491883@dElB.g8CB.0-rg> <94987-1711801416.293559@CNCH.O8Et.GLEz> In-Reply-To: <94987-1711801416.293559@CNCH.O8Et.GLEz> From: Bart Schaefer Date: Sat, 30 Mar 2024 12:14:19 -0700 Message-ID: Subject: Re: sticky-note and prompt color leftovers (Re: PATCH: broader support for highlight groups) To: Zsh workers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 52863 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: On Sat, Mar 30, 2024 at 5:23=E2=80=AFAM Oliver Kiddle wrote: > > Bart Schaefer wrote: > > No, but I was planning to commit 52314 if any feedback were provided > > From the perspective of display attributes, that change would make it > significantly harder to adapt to using zle_highlight instead of the > colors function if you also need to maintain backward compatibility with > user style settings. There's no need for backward compatibility at this point, as that has never gone anywhere except into 52314. That implementation can be scrapped and replaced with zle_highlight -compatible constructs. The more complicated issue is how to apply the highlighting when doing "list the existing sticky notes", because ZLE is not involved there. I guess if it's limited to styling the entire note rather than individual words, I only need the starting and ending %-expandos, if there's an easy way to extract that from the $zle_highlight value. > The purpose of the display style might have been easier to follow if > you had used keys with names like urgent, later, work I was copying the names originally proposed back in vapnik spaknik's "Suggested improvement" thread (May 2021). > [...] as %s turns off standout, %d or %n may be > better. Could also just use a parameter interpolation, e.g. ${.zsticky.note} ... I used %s so that it could be passed to printf but that's not really necessary, especially if I rewrite with ${|...}. > I'd also be inclined to make use of the zstyle context, e.g.: > > zstyle ':sticky-note:urgent' display '%H{urgent}<<< %d >>>' That's complicated when it comes to listing out the possible context choices for completion in _sticky_displays. Suggestions? > I don't personally like the existing approach of defining a style for > the fallback default. sticky-note currently does this for theme. This should be changed to use zstyle -q at the very least. Hadn't got there yet. > The recursive-edit doesn't seem to work too well, at least not starting > with my setup. I somehow need to Ctrl-C out of it. Might be related to > that ^M^M binding which is somehow hard to trigger despite KEYTIMEOUT If you've entered sticky-display with ^X? then you need one ^M to get out of that and then two more rapidly to finish the note. Does that explain what you see? > Is there a way to remove or edit an existing note? Presently you can edit an existing note but then that is appended as a new one. Editing old notes would have to be done with e.g. "zed -h" which I haven't integrated yet ... and has other issues because the history timestamps are used to match up the notes with the display file. Otherwise sticky-note has to be completely rewritten to avoid use of "fc -p" for the notefile, which is not out of the question but makes up/down "history" of notes complicated. > Would you want blink? I would not, but vapnik did, which what got this started. Could there e.g. be a zattr bit that means "the next five bytes are a custom attribute" and then just stuff in the escape sequence directly? I suppose that messes with remembering how attributes overlap. > > I don't recall discussion either. How (if at all) does the PREDISPLAY > > / POSTDISPLAY text fit into this? Would the fallback case be to match > > the bg=3D color or to use the terminal default background? > > The background color would equally apply to those. Perhaps a single boolean that says either to extend the background color to the end of the line vs. reverting to the default terminal at the end of the printable text, would be sufficient. The only reason I can think of for using something different would be to distinguish trailing whitespace (i.e., where the background shows through but there's actually something there in $BUFFER).