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.0 required=5.0 tests=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 05f3b3e0 for ; Fri, 3 Jan 2020 21:05:51 +0000 (UTC) Received: (qmail 25387 invoked by alias); 3 Jan 2020 20:28:44 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 45215 Received: (qmail 28959 invoked by uid 1010); 3 Jan 2020 20:28:44 -0000 X-Qmail-Scanner-Diagnostics: from wout4-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.1/25677. spamassassin: 3.4.2. Clear:RC:0(64.147.123.20):SA:0(-2.6/5.0):. Processed in 0.73274 secs); 03 Jan 2020 20:28:44 -0000 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrvdegfedgudefjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfhfgggtugfgjggfse htkedttddtredunecuhfhrohhmpeffrghnihgvlhcuufhhrghhrghfuceougdrshesuggr nhhivghlrdhshhgrhhgrfhdrnhgrmhgvqeenucfkphepjeelrddukedtrdehjedruddule enucfrrghrrghmpehmrghilhhfrhhomhepugdrshesuggrnhhivghlrdhshhgrhhgrfhdr nhgrmhgvnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Date: Fri, 3 Jan 2020 20:28:07 +0000 From: Daniel Shahaf To: zsh-workers@zsh.org Subject: Re: Feature request: italic style in region_highlight Message-ID: <20200103202807.cxocci634aksqwot@tarpaulin.shahaf.local2> References: <40813-1577992732.270919@2Jfy.SNk-.4lUU> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Bart Schaefer wrote on Thu, Jan 02, 2020 at 18:30:17 -0800: > On Thu, Jan 2, 2020 at 1:06 PM Roman Perepelitsa > wrote: > > > > > %O/%o (for "oblique") would be available. I realise that an oblique font > > > is not strictly the same as italic. > > > > Perfect timing. I wanted to ask which alternative letter to use as %a > > is taken by something (watch, perhaps?). %O/%o sounds good. > > Agree. (However, the only use of %a I could find is in the zstyle > formats for VCS, which didn't seem to conflict. In vcs_info one can always double the percent sign if needed. Well, %a for one is used in both patch-format and actionformats, so it's possible it'd have to be doubled twice if someone wanted to use %a in its prompt meaning in patch-format. > > With %A{...} we would have to > > explain how it interacts with the other sequences. E.g., does %u > > cancel %A{4}? > > I think if we created %A{4} (which BTW I would recommend requiring at > least two digits, e.g. %A{04}) then we would have to document the > existing escapes as being shorthands for the corresponding %A forms, > so yes, %u would cancel %A{04}. Why would we create either %A{4} or %A{04}? The API to script writers should use symbolic names; the API between us and the terminal should use terminfo rather than hardcoded escape sequences. If anything, something like «%X{foo}» that does the equivalent of «%{`tput foo`%}» might be worthwhile? We could still add an %Y/%y pair of escapes for italics but they'd be syntactic sugar for %X{sitm} and %X{ritm} respectively. (X, Y, and y are metasyntactic variables for the actual letters we'd use.) Cheers, Daniel