From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#62994: [PATCH 3/3] Add support for colored underlines on tty frames Date: Fri, 21 Apr 2023 20:56:18 +0300 Message-ID: <83r0sd2k71.fsf@gnu.org> References: <20230421143448.339022-1-mohkale@kisara.moe> <20230421143448.339022-4-mohkale@kisara.moe> <83wn252ozd.fsf@gnu.org> <875y9p5fg0.fsf@kisara.moe> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17580"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 62994@debbugs.gnu.org To: Mohsin Kaleem Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Apr 21 19:57:09 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ppv0P-0004Pk-QY for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 21 Apr 2023 19:57:09 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ppv0K-0004kz-Br; Fri, 21 Apr 2023 13:57:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ppv0J-0004kT-4T for bug-gnu-emacs@gnu.org; Fri, 21 Apr 2023 13:57:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ppv0I-0002gV-T6 for bug-gnu-emacs@gnu.org; Fri, 21 Apr 2023 13:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ppv0I-00089c-9t for bug-gnu-emacs@gnu.org; Fri, 21 Apr 2023 13:57:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Apr 2023 17:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62994 X-GNU-PR-Package: emacs Original-Received: via spool by 62994-submit@debbugs.gnu.org id=B62994.168209977231278 (code B ref 62994); Fri, 21 Apr 2023 17:57:02 +0000 Original-Received: (at 62994) by debbugs.gnu.org; 21 Apr 2023 17:56:12 +0000 Original-Received: from localhost ([127.0.0.1]:41095 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ppuzU-00088P-98 for submit@debbugs.gnu.org; Fri, 21 Apr 2023 13:56:12 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:52298) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ppuzP-00087t-L5 for 62994@debbugs.gnu.org; Fri, 21 Apr 2023 13:56:11 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ppuzK-0002Nw-5n; Fri, 21 Apr 2023 13:56:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=ZAmgfLRRO+p+dj2fL5gnoCpPWf6YVzCizW/RRpvov1k=; b=nmMXW1ztle6T NWptVwGt67jdTg84yGXJIS73V/akc474I4pT1u58zwqrquNYw0vzi9n2XNurktLA2eg0mk3kFhJ7V JrhmtGtxdE/sB0E69m7c8M41AYjXsOn0d/dorDuzd/LrPDH487AmTa94XOAuQ5Xi3wyyBGqqOwHDI jLCmJjNMT8v5owjS6VnwlySwZexiRsTWY2jP88MRdTJSFheOfLG4UPTzP8lzltrPdgkDiQIz/c2V0 xnJoPSf25sgmOLNfHKmzhW5NKJjkFD/M3FAUxAyRZ2QGUF6V5CMwAxKH3noT6tLGzXFFNIxR66BC9 bvBx6bH/l8ZnmKwMlbplwA==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ppuzJ-000892-KB; Fri, 21 Apr 2023 13:56:01 -0400 In-Reply-To: <875y9p5fg0.fsf@kisara.moe> (message from Mohsin Kaleem on Fri, 21 Apr 2023 18:10:39 +0100) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:260407 Archived-At: > From: Mohsin Kaleem > Date: Fri, 21 Apr 2023 18:10:39 +0100 > > > It looks like your edits use indentation with only spaces. Our style > > in C sources is to use TABs and spaces, so please set up your Emacs to > > follow our style (it should happen automatically if you let Emacs read > > and follow the .dir-locals.el file in the Emacs repository). > > Looks like .dir-locals.el won't work for me since I use c-ts-mode and it > hooks into c-mode only. You are right, I've just fixed that. > >> + if (tty->TF_set_underline_style) > >> + tty->TF_set_underline_color = "\x1b[58:2::%p1%{65536}%/%d:%p1%{256}%/%{255}%&%d:%p1%{255}%&%dm"; > > > > What is the source for this escape sequence? can you mention it in a > > comment? > > The form here is nonstandard. It's adapted from the same escape sequence > used by neovim [1]. The difference here is that this form accepts a > single color parameter whereas that one accepts three different > parameters for the color range. Since this form is how the existing > foreground and background sequences are set AND the sequence doesn't > come from a termcap I figured it was okay to adapt it to a form Emacs > can already substitute. > > [1]: https://github.com/neovim/neovim/blob/42f492ac99058bd1cd56c3c7871e7e464b2a5e24/src/nvim/tui/tui.c#L1932 This should all be in a comment there, thanks.