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.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 24718 invoked from network); 11 May 2021 10:18:58 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 11 May 2021 10:18:58 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1620728338; b=1JIiAv7kyO3VSLMCnCiuiTy73skXKv25DgzaZcwLvHZ+Ril++qzt4sYch2GM93iEvFLKgUPo2T ER0zRFaxSxjJyY5BrzBD793kArG85WXxHcjUPPLa1PbCQOg7/4rdXOUBrBcU/CAN744mWIchgG mS/VsAntVi8V8avznToA+sQxiMBlAj35R4jO4DHUxaAi1CEQOIftg7WDHCKlY2dEuMBTZRDiWI zU4zIeS8z5HCr5pC8t64AuLKMlZmYvFnd09sVc0LFJGeYlhBBimlF1m7MuFUYICML0jvU5Rak0 7IMWq4cqSh13Y7lkhBcgQd+4kOvtoAZv+QkjAJa0KhLJww==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-il1-f174.google.com) smtp.remote-ip=209.85.166.174; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1620728338; bh=0ypHZvJCz5mkydYLf0qhBe6bOJBIUDF9SYTP+l4IuCc=; 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:References: In-Reply-To:MIME-Version:DKIM-Signature:DKIM-Signature; b=vpcfzZKoe+F7GDAnPlkQeXe7eHoRCkpKDhWEEp4u8tDFz/jId+w77yezqWeaKnolAzkQLMc8oz v8CwFqPe6/ChSEnL1iAxTXu8ZXSPVpA8iX71GRoyVqU7pXvIdOUhPEdafYoBS3UieCnm5tkY5N YrhzNgQDNBLBd5GgbPKH+JtCzgdw3t25MJ1M65wE8GTERpoLNwmd8NlisRvSFeTV+UH6t9SkRq jgo9AKyR/smMamfw7FLhoc4H+OF1f2cfaFhQy4LZqOsVHUuRKkVZ5ebE9do+X/QAQDwuT6YOxB VVX5rAL1Ec7QGGjsitw8VZjA3+eRJPZstfrJmXSuoifuJw==; 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:References:In-Reply-To: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=+f0deaYTPQGrmXxjXxtvuO2vALcSZXZK3KJWRYdm3RQ=; b=IzLb6qimfrY3+4YOq5DEk0LCOF N9igrGhpHjOMDF/wSgIMNdZGuuuMGmEHtxPK+Z1jc2xf4GBZklAcT8O0jQ/jTDaO4s19vRvxtE9te Aq1zieggsbqhAaJk9aZ7JCGDL9Tz0CqB5Fa96OR+yPvjRjSWALtAfQcTYNC1Lxuxzek23cPpYLxS/ 4zLpi3I1W4mSe6TbPeHb8MnL22zLxvX82iSKfz809HB2wiN9A/h34Avxh4bEP4sm/3nZqvbl2Zr5N akSBlsS3ehpw2+JZBvCvstYtQcdhks3qqK5oFk/JFQjNTqMoIidwDEz9k5CR2pWfWxZiJkj3Bu7qs RKMANsfA==; Received: from authenticated user by zero.zsh.org with local id 1lgPTd-0002HJ-IJ; Tue, 11 May 2021 10:18:57 +0000 Authentication-Results: zsh.org; iprev=pass (mail-il1-f174.google.com) smtp.remote-ip=209.85.166.174; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-il1-f174.google.com ([209.85.166.174]:41813) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1lgPT5-0001zQ-GR; Tue, 11 May 2021 10:18:24 +0000 Received: by mail-il1-f174.google.com with SMTP id v13so16683666ilj.8 for ; Tue, 11 May 2021 03:18:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=+f0deaYTPQGrmXxjXxtvuO2vALcSZXZK3KJWRYdm3RQ=; b=V4gByqJYk07vIYHWDMu1niKKrhnvqt6V8650/KoO0xYao4jBVTlLUaAf6BhW2fn8qQ SyxhgrxGcFsLSlq9KBgmsH9pcn04gUmjmffkMNVaefx7ogyjQfRML1INAbhtEDdt5rnT 55dy8RXjgadlXc5eAm0tf+ShxdYcO7m0uhfWqZ1Cot+g3JIYU26d05G+m3PW/IIJA8Jj 3OQnlcV6wSPsMb1R8KeRSKxpZhiwAp2F21kUCwATEZZx+tsPybeON3QZmV+NAV/HB/1Z r1zPfKVbLvYJgv64kq8jYqZTZZL6oXGgwuEzZ4d3FKgH4F+3jfb2T7Bqfu6w/pmp3F6U uFzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=+f0deaYTPQGrmXxjXxtvuO2vALcSZXZK3KJWRYdm3RQ=; b=W0FVjL8jE6tOiAQPmMxoyxxE2r1jIvnkhD+yNkjyV2OzmVjL7iuKYwk/5nf38X6GnC iZsUJAYOuWwJpe8Fe5vpTLZJNGTp6i5ggjBdRg0gqhNeOihcBLVWhF5roW8uEQoXy412 Oc3woaZofC9mJY7OH83kdhNWTWjZkvJrX0fOgsglwD65E1EX7F7+TjmV76/U1e3zW0oc BtYOKHzXZfOR+AmGwzjck2NfUi+wF5uhTuHvHdpDT5n+Zt5Cq23rHBXJCwN1fURi/Eu8 f4BUaHzC3OaSQIPUI+Nt1XLGYapZ+loz/hRRxSaeDqPC5FYy9m25s71115z86RXtVeT0 bjpQ== X-Gm-Message-State: AOAM53049+2ssPGky7rKeEZYOu82S81Cn0UZVhz4XV5CapmD71XNbB90 k6QNz6SMfyK9dZPXiC4UzRTu/nnFZ+XalM8EIKM= X-Google-Smtp-Source: ABdhPJwJHkrxQwticjaPmnLOx1/sM2oNP7Kb0vKPScFGupC57X2SV+Cuc/bnvwhgZo2YTzrEhrk5A/oCKcJeglICh1U= X-Received: by 2002:a05:6e02:1384:: with SMTP id d4mr23346099ilo.25.1620728302245; Tue, 11 May 2021 03:18:22 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a4f:cc46:0:0:0:0:0 with HTTP; Tue, 11 May 2021 03:18:20 -0700 (PDT) In-Reply-To: References: <1185563186.165566.1619896723304.ref@mail.yahoo.com> <1185563186.165566.1619896723304@mail.yahoo.com> <1293997275.666259.1620093977494@mail.yahoo.com> From: Mikael Magnusson Date: Tue, 11 May 2021 12:18:20 +0200 Message-ID: Subject: Re: Suggested improvement for sticky-note To: Bart Schaefer Cc: vapnik spaknik , Zsh Hackers List Content-Type: text/plain; charset="UTF-8" X-Seq: 48811 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 5/9/21, Bart Schaefer wrote: > Just now getting back to this ... > [...] > Finally, you've embedded the definition-time theme color in the note > at the point where blink is turned off, so if the theme changes (new > zstyle applied) any notes that had color changes or blink will revert > to the previous theme's coloring. In fact this makes me aware that it > doesn't really work to interpret prompt escapes, because (for example) > after %Bbold%b the background color reverts as well and the rest of > the note is no longer yellow. > > It's going to take a bit more thought to decide what it's possible to > salvage from this, so no patch yet. > > For any other zsh-workers reading this: Does anyone know why > putpromptchar() has this? > case 'b': > txtchangeset(txtchangep, TXTNOBOLDFACE, TXTBOLDFACE); > txtunset(TXTBOLDFACE); > tsetcap(TCALLATTRSOFF, TSC_PROMPT|TSC_DIRTY); > break; > That is, why TCALLATTRSOFF ? That isn't done for %s or %u ... why is > there no TCBOLDFACEEND defined? I think that's a shortcoming in termcap and/or terminfo. In termcap there is md (1m) and me (0m) that should correspond to bold, but 0m turns off all attributes. Compare with us (4m) and ue (24m). https://www.gnu.org/software/termutils/manual/termcap-1.3/html_chapter/termcap_4.html also implies that there is no specific termcap sequence to only turn off specific appearance modes. When it comes to ANSI sequences though, there definitely are. From ctlseqs.txt, Ps = 2 2 -> Normal (neither bold nor faint) Ps = 2 4 -> Not underlined Ps = 2 5 -> Steady (not blinking) Ps = 2 7 -> Positive (not inverse) Ps = 2 8 -> Visible, i.e., not hidden (VT300) Since we already assume ANSI for things like colors, I don't think we would lose a lot of compatibility in practice if we just use 22 instead of 0 for %b, but we could potentially put it behind a setopt? -- Mikael Magnusson