From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mohsin Kaleem Newsgroups: gmane.emacs.bugs Subject: bug#62994: [PATCH v6] Add support for colored and styled underlines on tty frames Date: Sun, 21 Apr 2024 15:51:16 +0100 Message-ID: <87y196ixaz.fsf@kisara.moe> References: <20240414135632.432193-1-mohkale@kisara.moe> <868r18a1oz.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7111"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 62994@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Apr 21 16:52:12 2024 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 1ryYY8-0001ij-IN for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 21 Apr 2024 16:52:12 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ryYXo-00069C-SZ; Sun, 21 Apr 2024 10:51:52 -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 1ryYXk-00068b-MD for bug-gnu-emacs@gnu.org; Sun, 21 Apr 2024 10:51:49 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ryYXk-0007BM-DN for bug-gnu-emacs@gnu.org; Sun, 21 Apr 2024 10:51:48 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ryYXz-0006Om-BP for bug-gnu-emacs@gnu.org; Sun, 21 Apr 2024 10:52:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mohsin Kaleem Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 21 Apr 2024 14:52:03 +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.171371110224502 (code B ref 62994); Sun, 21 Apr 2024 14:52:03 +0000 Original-Received: (at 62994) by debbugs.gnu.org; 21 Apr 2024 14:51:42 +0000 Original-Received: from localhost ([127.0.0.1]:43326 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ryYXd-0006N8-K1 for submit@debbugs.gnu.org; Sun, 21 Apr 2024 10:51:42 -0400 Original-Received: from 119.ip-51-38-65.eu ([51.38.65.119]:56580 helo=mail.kisara.moe) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ryYXZ-0006MG-1U for 62994@debbugs.gnu.org; Sun, 21 Apr 2024 10:51:39 -0400 Original-Received: from mk-desktop (bcde7b88.skybroadband.com [188.222.123.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by mail.kisara.moe (Postfix) with ESMTPSA id 99FB2A2796; Sun, 21 Apr 2024 16:51:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kisara.moe; s=default; t=1713711079; bh=cGE8dndG7SE7/wA+c3nIzNlSzPcpPQno4tG5dVODODo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=MagYnxHnvJxbzThzt1lfljlrCZxvTvSox5pp6gveM+yNxuhV7YoUSx/rWDCuYiTIP xsw5CCS2NdLo7E2oNssuJE6bcnFyxkDrh+XwjrKeadWW3Y4ZkuboyJQoRUZkPqd7f+ mIXseVM8YP6XFNuzaWfOCcHrhA/b1fFoXTA3ZDnKnqg5OUNy6b9YnZ8KMlR+i+iR1J 5ebM/dX7TOXBGLR7MopyvJY0gE5Vi1Au6sczHSOApMOETJSFPpcCbi/sCYZr/1UQh1 x6ynB2XtUNPW9P/vXzSQQocwrXSaojuBJBLxFVl540pYmBFdDz806mgG2DZ8PDr37E lcpyUGza9T0Rg== In-Reply-To: <868r18a1oz.fsf@gnu.org> 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:283771 Archived-At: Eli Zaretskii writes: > The Subject line is longer than 78 characters, so our commit hooks > didn't allow me to apply this. Please make the Subject line shorter, > possibly by dropping the bug number (mention the bug number somewhere > in the rest of the log message). Sorry, I'm not quite sure what you mean. Are you referring to the subject line of the email message? That's 85 characters, but removing re and the [PATCH X] part condenses it to 70 characters. The original commit I'm making in git is only 58 characters. For reference I've gone ahead and added a reference to the bug number in the commit message body but I'm not sure that's enough to fix this. Would you like me to re-submit with a custom --subject string matching the commit message in git-send-email. I presume that would exclude the re, patch and bug sections? >> * src/xterm.c (x_draw_glyph_string): Updated to use renamed >> FACE_UNDERLINE_SINGLE and FACE_UNDERLINE_WAVE face_underline_type >> enumerations. > > These lines are also too long, and don't follow our conventions. I > suggest to use change-log-mode to format and fill those correctly. To confirm this is what I did, I'm not sure if it's exactly what you were recommending: 1. emacs -Q .git/COMMIT_EDITMSG 2. M-x change-log-mode 3. C-SPC to end of buffer message 4. C-M-\ 5. Manually remove the leading indentation Emacs seems to have inserted (other commit messages didn't seem to have this). The end result doesn't seem to have changed the line length of anything, although it did highlight one point where the entry was malformed. > Period missing at the end of the comment. Also, please leave two > spaces between the end of the comment and the closing "*/", per our > conventions. Added. > >> + /* Check supported underline styles. */ >> + val = attrs[LFACE_UNDERLINE_INDEX]; >> + if (!UNSPECIFIEDP (val)) >> + if (EQ (CAR_SAFE (val), QCstyle)) >> + if (!(EQ (CAR_SAFE (CDR_SAFE (val)), Qline) >> + || EQ (CAR_SAFE (CDR_SAFE (val)), Qwave))) >> + return false; /* Unsupported underline style. */ > > Can this be written in a cleaner way, as a single 'if' with all the > conditions combined together, instead of nesting them? > I think so, yes. This was added from the corresponding tty code which had more nesting because it also supported more checks against the face attribute. Updated. >> - return false; /* same as default */ >> + return false; /* same as default */ > > Why this whitespace change? I suspect this was a byproduct of me re-indenting comments in an earlier patch. Removed now. -- Mohsin Kaleem