From unknown Fri Jun 20 07:24:57 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#62265 <62265@debbugs.gnu.org> To: bug#62265 <62265@debbugs.gnu.org> Subject: Status: Underline does not work in Terminal Emacs Reply-To: bug#62265 <62265@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:24:57 +0000 retitle 62265 Underline does not work in Terminal Emacs reassign 62265 emacs submitter 62265 Mohsin Kaleem severity 62265 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 18 13:48:11 2023 Received: (at submit) by debbugs.gnu.org; 18 Mar 2023 17:48:11 +0000 Received: from localhost ([127.0.0.1]:49007 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pdaf1-0002TK-SP for submit@debbugs.gnu.org; Sat, 18 Mar 2023 13:48:11 -0400 Received: from lists.gnu.org ([209.51.188.17]:38376) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pdaez-0002Sw-DA for submit@debbugs.gnu.org; Sat, 18 Mar 2023 13:48:05 -0400 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 1pdaez-0006mn-1i for bug-gnu-emacs@gnu.org; Sat, 18 Mar 2023 13:48:05 -0400 Received: from 119.ip-51-38-65.eu ([51.38.65.119] helo=mail.kisara.moe) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pdaew-0007nh-VY for bug-gnu-emacs@gnu.org; Sat, 18 Mar 2023 13:48:04 -0400 Received: from mk-desktop (33b719f5.skybroadband.com [51.183.25.245]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.kisara.moe (Postfix) with ESMTPSA id DDA45A1043 for ; Sat, 18 Mar 2023 18:40:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kisara.moe; s=202207; t=1679161255; bh=d1G4ZISWs3EOnoNWbsuq6NWR6anpQm7fIPEbnh7jRBs=; h=From:To:Subject:Date:From; b=gycP92lmXRtuhqmCoudZ2557L6bqhVIwv1UoITlHJAFe1Xqeqv8nAXdLb+RDvsP5i qNioqP1rENBlSVpE0NoFEdxYoe2Wl7KVeEB/bl48izhdBZlBCols6YCvFZuxfIIH/z I/9PXalv9PQlQr7TgwHYau7IT3Dx/Jbl6gJk6yGo= From: Mohsin Kaleem To: bug-gnu-emacs@gnu.org Subject: Underline does not work in Terminal Emacs Date: Sat, 18 Mar 2023 17:40:51 +0000 Message-ID: <87wn3ex8ik.fsf@kisara.moe> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=51.38.65.119; envelope-from=mohkale@kisara.moe; helo=mail.kisara.moe X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, PDS_RDNS_DYNAMIC_FP=0.01, RDNS_DYNAMIC=0.982, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain Hi, Underline support for tty frames was added to Emacs back in the Emacs 28.0.90 release. It hasn't worked for me since. Today I tried investigating why. I tracked it down ncurses and discovered the tgetstr function to retrieve the escape sequence for underline support doesn't fetch the value configured in the terminfo database for my Terminal (st). I can reproduce this function failing to fetch the entry in a minimal sample program (code attached). --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=reproduce-smxx-failure.c Content-Description: Sample program that fails to get smxx #include #include #include int main() { curses_trace(TRACE_MAXIMUM); const char* term = "tmux-24bit"; char buffer[4096]; if (tgetent(buffer, term) <= 0) { printf("Failed"); return 1; } char *area = NULL; char **address = &area; char * it = tgetstr("smxx", address); printf("p: %p\n", it); return 0; } --=-=-= Content-Type: text/plain The cause for this seems to be in ncurses directly. In the definition of tgetstr in lib_termcap.c there's a check for ValidExt for any non-standard terminfo entries. This macro fails when fetching an entry that is longer than 2 characters, meaning tgetstr for "smxx" fails and I get no underlines. I've managed to fix this by using tigetstr in-place of tgetstr (this variant is also used for querying the setf24 and setb24 termcaps already in "term.c" so I suspect this is a known issue). I'm not sure what the termcap library does but I'm guessing it doesn't have this restriction. Please fix this by switching to tigetstr instead of tgetstr for this record when building with terminfo. I've got a sample patch for this attached. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=fix-underline.patch diff --git a/src/term.c b/src/term.c index d881dee39fe..a2d1743bdad 100644 --- a/src/term.c +++ b/src/term.c @@ -4163,7 +4163,11 @@ use the Bourne shell command 'TERM=...; export TERM' (C-shell:\n\ tty->TS_enter_alt_charset_mode = tgetstr ("as", address); tty->TS_exit_alt_charset_mode = tgetstr ("ae", address); tty->TS_exit_attribute_mode = tgetstr ("me", address); +#ifdef TERMINFO + tty->TS_enter_strike_through_mode = tigetstr ("smxx"); +#else tty->TS_enter_strike_through_mode = tgetstr ("smxx", address); +#end MultiUp (tty) = tgetstr ("UP", address); MultiDown (tty) = tgetstr ("DO", address); --=-=-= Content-Type: text/plain -- Mohsin Kaleem --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 18 13:51:43 2023 Received: (at submit) by debbugs.gnu.org; 18 Mar 2023 17:51:43 +0000 Received: from localhost ([127.0.0.1]:49016 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pdaiV-0002aT-12 for submit@debbugs.gnu.org; Sat, 18 Mar 2023 13:51:43 -0400 Received: from lists.gnu.org ([209.51.188.17]:34222) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pdaiS-0002aL-PG for submit@debbugs.gnu.org; Sat, 18 Mar 2023 13:51:41 -0400 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 1pdaiS-0007C1-GJ for bug-gnu-emacs@gnu.org; Sat, 18 Mar 2023 13:51:40 -0400 Received: from 119.ip-51-38-65.eu ([51.38.65.119] helo=mail.kisara.moe) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pdaiQ-0008Rg-Ty for bug-gnu-emacs@gnu.org; Sat, 18 Mar 2023 13:51:40 -0400 Received: from mk-desktop (33b719f5.skybroadband.com [51.183.25.245]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.kisara.moe (Postfix) with ESMTPSA id 5F183A1043 for ; Sat, 18 Mar 2023 18:51:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kisara.moe; s=202207; t=1679161897; bh=vPwt5sKDfqI5YWZdBr6aj0iPIN9RO2gswD4EJsszuFM=; h=From:To:Subject:In-Reply-To:References:Date:From; b=YUVQss3MuxiC/z3u74BjltwoSi4c5PcSEvpjZZRB7iQ2Z6bU2RMqtdLK75JloLhhF 3M3WdjW53v3y4DjSsCwK4wJY4HGWgIMkrN+x9bTJ/CDSsk7WJ7a2KfS3pxgnquw34d DDtcetUkH6cPstI2I+eelFqF6fEp0nl+edYbWt0I= From: Mohsin Kaleem To: bug-gnu-emacs@gnu.org Subject: Re: Underline does not work in Terminal Emacs In-Reply-To: <87wn3ex8ik.fsf@kisara.moe> References: <87wn3ex8ik.fsf@kisara.moe> Date: Sat, 18 Mar 2023 17:51:36 +0000 Message-ID: <87sfe2x80n.fsf@kisara.moe> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=51.38.65.119; envelope-from=mohkale@kisara.moe; helo=mail.kisara.moe X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, PDS_RDNS_DYNAMIC_FP=0.01, RDNS_DYNAMIC=0.982, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) S.N. Sorry, smxx is the code for strike-through. The error description should be strikethrough doesn't work in terminal emacs. Not underline. -- Mohsin Kaleem From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 18 13:55:07 2023 Received: (at 62265) by debbugs.gnu.org; 18 Mar 2023 17:55:08 +0000 Received: from localhost ([127.0.0.1]:49021 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pdaln-0002fg-IY for submit@debbugs.gnu.org; Sat, 18 Mar 2023 13:55:07 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48240) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pdall-0002f5-2D for 62265@debbugs.gnu.org; Sat, 18 Mar 2023 13:55:06 -0400 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 1pdalf-0000PB-Fu; Sat, 18 Mar 2023 13:54:59 -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=gWiHarhGn9u6bdeyD5T5CXeuWNEMOo6X8Fkz7NQh8PE=; b=DrukMmSYVzty fpR5T7ujl50HiU6kUTUUeIH9u0mmh6zl/J1CXIae0QoAHxDb3DciOo7FPXytp/l+uT6FB1ibl97O/ r2IBDnK4FIu55Gfiof110tD6YMdG4EG305wL9nQqDcYwA3iNTqhd3CVKZqxAbCw1xaX9Og5OfB3/j pO1tDy/1V8EBV1PhwIvVzhbzH9Wx6tiuQJw2qJz7kFvCuk+rvIl937r56cR6Lt+HZ90mXqRiEcNwC wLwXJp/URTp8Q6HD5aU0EtMFZvEmEruJGuyyxYzEQ3DKu/je1hrZoH2SokeD+yk8FaRaEDGqZ6vSE 6cb4IFYvbch0SzZULbuoJw==; 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 1pdale-000603-SM; Sat, 18 Mar 2023 13:54:59 -0400 Date: Sat, 18 Mar 2023 19:55:03 +0200 Message-Id: <83edpmaqrs.fsf@gnu.org> From: Eli Zaretskii To: Mohsin Kaleem In-Reply-To: <87wn3ex8ik.fsf@kisara.moe> (message from Mohsin Kaleem on Sat, 18 Mar 2023 17:40:51 +0000) Subject: Re: bug#62265: Underline does not work in Terminal Emacs References: <87wn3ex8ik.fsf@kisara.moe> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 62265 Cc: 62265@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Mohsin Kaleem > Date: Sat, 18 Mar 2023 17:40:51 +0000 > > Underline support for tty frames was added to Emacs back in the Emacs > 28.0.90 release. It hasn't worked for me since. Today I tried > investigating why. I tracked it down ncurses and discovered the tgetstr > function to retrieve the escape sequence for underline support doesn't > fetch the value configured in the terminfo database for my Terminal > (st). I can reproduce this function failing to fetch the entry in a > minimal sample program (code attached). > > The cause for this seems to be in ncurses directly. In the definition of > tgetstr in lib_termcap.c there's a check for ValidExt for any > non-standard terminfo entries. This macro fails when fetching an entry > that is longer than 2 characters, meaning tgetstr for "smxx" fails and I > get no underlines. I've managed to fix this by using tigetstr in-place > of tgetstr (this variant is also used for querying the setf24 and setb24 > termcaps already in "term.c" so I suspect this is a known issue). I'm > not sure what the termcap library does but I'm guessing it doesn't have > this restriction. > > Please fix this by switching to tigetstr instead of tgetstr for this > record when building with terminfo. I've got a sample patch for this > attached. Thanks. Can someone with access to such a terminal please verify the issue with ncurses, and also verify the proposed change? From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 18 14:01:48 2023 Received: (at 62265) by debbugs.gnu.org; 18 Mar 2023 18:01:48 +0000 Received: from localhost ([127.0.0.1]:49036 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pdasG-0002rR-71 for submit@debbugs.gnu.org; Sat, 18 Mar 2023 14:01:48 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45744) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pdasE-0002rD-JK for 62265@debbugs.gnu.org; Sat, 18 Mar 2023 14:01:47 -0400 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 1pdas8-0002H0-Uh; Sat, 18 Mar 2023 14:01:40 -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=XZhPjpNXg7o+jhQDPdr5fjrEFokgsFU0im8VaERPqu4=; b=PvduNbRCE4fk mTWbaApZZHT/Exxe27j2E+Ys3JeqUniJwg5Hz0jjnopbaXNY5hmyqAa9IDezx/97mK0reHvHOxOR7 unLVPyYs+C7PljlJYn35LsrZcJTUfH+AZULapf+wKRo58FdDPdvdnhUYKhjomJk1RAhsSaj/5G481 hhXFHfmSb0roslb1dZKXYSxjdcCOisKUeW2ceKPcaujo2aGwX7lkGWFGf9VNNl3EdrpAJ1SIC+OKb eQoHI7gnmdRJCBBMz7IzolDA9L9DmVcbfbHLKbCYcsdEcGItM4OfkNQv+iVp7f3bXUmESJtEfp9J9 60EoI/EvqDUTChMy6NAqnA==; 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 1pdas7-0003LF-Po; Sat, 18 Mar 2023 14:01:40 -0400 Date: Sat, 18 Mar 2023 20:01:42 +0200 Message-Id: <83cz56aqgp.fsf@gnu.org> From: Eli Zaretskii To: Mohsin Kaleem In-Reply-To: <87wn3ex8ik.fsf@kisara.moe> (message from Mohsin Kaleem on Sat, 18 Mar 2023 17:40:51 +0000) Subject: Re: bug#62265: Underline does not work in Terminal Emacs References: <87wn3ex8ik.fsf@kisara.moe> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 62265 Cc: 62265@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Mohsin Kaleem > Date: Sat, 18 Mar 2023 17:40:51 +0000 > > Underline support for tty frames was added to Emacs back in the Emacs > 28.0.90 release. It hasn't worked for me since. Today I tried > investigating why. I tracked it down ncurses and discovered the tgetstr > function to retrieve the escape sequence for underline support doesn't > fetch the value configured in the terminfo database for my Terminal > (st). I can reproduce this function failing to fetch the entry in a > minimal sample program (code attached). > [...] > --- a/src/term.c > +++ b/src/term.c > @@ -4163,7 +4163,11 @@ use the Bourne shell command 'TERM=...; export TERM' (C-shell:\n\ > tty->TS_enter_alt_charset_mode = tgetstr ("as", address); > tty->TS_exit_alt_charset_mode = tgetstr ("ae", address); > tty->TS_exit_attribute_mode = tgetstr ("me", address); > +#ifdef TERMINFO > + tty->TS_enter_strike_through_mode = tigetstr ("smxx"); > +#else > tty->TS_enter_strike_through_mode = tgetstr ("smxx", address); > +#end There's something I don't understand here: you are talking about underline support, but the proposed patch affects the support for strike-through, not underline. What am I missing here? From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 18 14:07:13 2023 Received: (at 62265) by debbugs.gnu.org; 18 Mar 2023 18:07:13 +0000 Received: from localhost ([127.0.0.1]:49040 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pdaxU-0002zV-Vj for submit@debbugs.gnu.org; Sat, 18 Mar 2023 14:07:13 -0400 Received: from 119.ip-51-38-65.eu ([51.38.65.119]:60748 helo=mail.kisara.moe) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pdaxR-0002zL-SJ for 62265@debbugs.gnu.org; Sat, 18 Mar 2023 14:07:11 -0400 Received: from mk-desktop (33b719f5.skybroadband.com [51.183.25.245]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.kisara.moe (Postfix) with ESMTPSA id 401E2A1043; Sat, 18 Mar 2023 19:07:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kisara.moe; s=202207; t=1679162828; bh=rx5mu4FrepjqfhkseaBQDz1c7AaHbmxkMKbqqW88R8I=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=eJProeBa9OOHMUkjIYosAVJ9PwgSWDtZf6E3CpWtWXAtQgztmaXO1LFTQFY6YoUWf sleDd1lKYWVsv+/xi//xZ062bpayenGSNBcZx6kAcjSYsgsXqG2pw1yNADYy6AiEYs hcjioTRUlNy1MMMnrrsl/rYdvCmJtLgebnStMWtw= From: Mohsin Kaleem To: Eli Zaretskii Subject: Re: bug#62265: Underline does not work in Terminal Emacs In-Reply-To: <83cz56aqgp.fsf@gnu.org> References: <87wn3ex8ik.fsf@kisara.moe> <83cz56aqgp.fsf@gnu.org> Date: Sat, 18 Mar 2023 18:07:07 +0000 Message-ID: <87pm96x7as.fsf@kisara.moe> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 62265 Cc: 62265@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) Eli Zaretskii writes: > There's something I don't understand here: you are talking about > underline support, but the proposed patch affects the support for > strike-through, not underline. What am I missing here? Hi, yes, I sent a follow up message clarifying my mistake. Just re-sharing it again: S.N. Sorry, smxx is the code for strike-through. The error description should be strikethrough doesn't work in terminal emacs. Not underline. -- Mohsin Kaleem From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 18 14:50:46 2023 Received: (at 62265) by debbugs.gnu.org; 18 Mar 2023 18:50:46 +0000 Received: from localhost ([127.0.0.1]:49076 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pdbdd-00049Y-TC for submit@debbugs.gnu.org; Sat, 18 Mar 2023 14:50:46 -0400 Received: from mail-pl1-f170.google.com ([209.85.214.170]:38796) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pdbdc-00049K-O3 for 62265@debbugs.gnu.org; Sat, 18 Mar 2023 14:50:45 -0400 Received: by mail-pl1-f170.google.com with SMTP id ja10so8520763plb.5 for <62265@debbugs.gnu.org>; Sat, 18 Mar 2023 11:50:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679165439; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=H4HdD1mTr6BdS8KSqU6+be+MDEu5ctukbDStPRRXhNs=; b=lGPXfy044VlUkHcizQKs2UQPu4E5y278dkGf+DL/cDTObP57hear3vqLmixBcwlz3S FndzpD0oM8lIWZnuzhtZIeTOVmnKLwztGfXcOJ3HtcLMMqyNtJNBPy2wM4mr/wUshSc8 bMtZPc9rJOU/oAfgwJZD+JhvRLsezchCKfiycuCHbqA42tF3c3W1XaR7BfpNAQWFSJdh wbu57ZaWfPWMLYJnuvYp1q4Y1CNtnNm0ply1mY1semdsTuNkXnwKnH+sBl060UjhzIll bOB6Mzbw1IHsvahlIqEOlvb6ZNPB3QIBIXi0vskhAg0Te1YDxN5G7qSKhGvFQOPkBmPt zfCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679165439; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=H4HdD1mTr6BdS8KSqU6+be+MDEu5ctukbDStPRRXhNs=; b=LTwGmcuROMhXknd7skbKnniUvDMTMdpcPvbImS2Gvj4T2RfGu3kAeZOVRa4sqiHqG1 TLY04id+DOsH2ExNV1nlohK9Hl5knxe9hH0zqcFHhAvItADNl3QdSeZpKGDSPaVpPRTl q9MVaAKS14j7nhw70k0+S8H38oe55tWX6SM9bFB78PwpurHvQ6PYRv6hlCsi+8P+yUum vg1wmzTYTKeuva0P8vhkFNwtEIp4YHUEjuVLAlY6ps99oGVghZNuf9R3EFrBVzYjV4Lf F/kAgVhrhGaej0yCpaYfmVF2XkraNMTdGY7jWpZ9NITE15cvprcJfqGdsHs3jIzaI042 khtg== X-Gm-Message-State: AO0yUKUWGPRygbOhOjdc1dAxeziK57Rn9U7T4dZUDh9zMW485J9W/Saf 1FFSogUM9Zm+qwK5LuUaf1M= X-Google-Smtp-Source: AK7set+BVFxr6cSWMagDeDj8mZglKjIM6LtqLAxGqwUdjTv+dqNAj5mDVUuL7BmnnPtY+2aE3rxPXw== X-Received: by 2002:a17:90b:1c12:b0:23f:7196:2faf with SMTP id oc18-20020a17090b1c1200b0023f71962fafmr4835549pjb.19.1679165438845; Sat, 18 Mar 2023 11:50:38 -0700 (PDT) Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id n20-20020a170902d0d400b0019eae717885sm3618387pln.107.2023.03.18.11.50.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 18 Mar 2023 11:50:38 -0700 (PDT) Message-ID: <7cf462de-97f7-26ef-a33f-e3ff59c8b55e@gmail.com> Date: Sat, 18 Mar 2023 11:50:35 -0700 MIME-Version: 1.0 Subject: Re: bug#62265: Underline does not work in Terminal Emacs Content-Language: en-US To: Eli Zaretskii , Mohsin Kaleem References: <87wn3ex8ik.fsf@kisara.moe> <83edpmaqrs.fsf@gnu.org> From: Jim Porter In-Reply-To: <83edpmaqrs.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 62265 Cc: 62265@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 3/18/2023 10:55 AM, Eli Zaretskii wrote: > Thanks. Can someone with access to such a terminal please verify the > issue with ncurses, and also verify the proposed change? I'm not sure about the issue with ncurses or this specific terminal, but the patch does seem to make strike-through work on the Gnome Terminal. Previously, I wasn't able to get strike-through to work, but with this patch, it works correctly in Gnome Terminal. (One easy way to see what happens is to use Org mode and type "+text+" into the buffer. That's Org markup for strike-through, and you should get a line through "text".) From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 19 06:07:38 2023 Received: (at 62265) by debbugs.gnu.org; 19 Mar 2023 10:07:39 +0000 Received: from localhost ([127.0.0.1]:49469 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pdpwr-0003dL-Rf for submit@debbugs.gnu.org; Sun, 19 Mar 2023 06:07:38 -0400 Received: from 119.ip-51-38-65.eu ([51.38.65.119]:40200 helo=mail.kisara.moe) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pdpwq-0003dA-2Q for 62265@debbugs.gnu.org; Sun, 19 Mar 2023 06:07:32 -0400 Received: from mk-desktop (33b719f5.skybroadband.com [51.183.25.245]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.kisara.moe (Postfix) with ESMTPSA id 7CB65A1043; Sun, 19 Mar 2023 11:07:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kisara.moe; s=202207; t=1679220450; bh=GQrj35ceZwO8p+f1iyNOhQaWoVgmnsMl4JaGLSvMaKA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=u3lNH6YSbJJbqJhrQyVOVUKEgTH9gYnZK+9RxHB3ALBREwmj8zM2E6nNzJo9E2OLr 4q/OhstNlxcd22BONV5Rn9Nd9oCGAfw3tmQmtsckK8e7+lAJS7qvYYswYgqNRYCVNW kT98j17GtiZfweEOy48gwvfB4yLWI7GDRMYn12Xw= From: Mohsin Kaleem To: Jim Porter , Eli Zaretskii Subject: Re: bug#62265: Underline does not work in Terminal Emacs In-Reply-To: <7cf462de-97f7-26ef-a33f-e3ff59c8b55e@gmail.com> References: <87wn3ex8ik.fsf@kisara.moe> <83edpmaqrs.fsf@gnu.org> <7cf462de-97f7-26ef-a33f-e3ff59c8b55e@gmail.com> Date: Sun, 19 Mar 2023 10:07:14 +0000 Message-ID: <87mt49jbql.fsf@kisara.moe> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 62265 Cc: 62265@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) --=-=-= Content-Type: text/plain Jim Porter writes: Hi, so turns out terminfo returns a max-ptr for tigetstr when the terminfo definition is missing. There's checks for this for setb24 and setf24 but not in the patch I supplied. Updated to check this and added a macro definition to avoid repeating the same condition logic 3 times. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=01-fix-terminfo-strikethrough.patch diff --git a/src/term.c b/src/term.c index d881dee39fe..c47cdc8bb8a 100644 --- a/src/term.c +++ b/src/term.c @@ -95,6 +95,8 @@ #define OUTPUT_IF(tty, a) \ #define OUTPUT1_IF(tty, a) do { if (a) emacs_tputs ((tty), a, 1, cmputc); } while (0) +#define TERMINFO_NON_STRING_CAP_P(cap) ((cap) == (char *) (intptr_t) -1) + /* Display space properties. */ /* Chain of all tty device parameters. */ @@ -4163,7 +4165,14 @@ init_tty (const char *name, const char *terminal_type, bool must_succeed) tty->TS_enter_alt_charset_mode = tgetstr ("as", address); tty->TS_exit_alt_charset_mode = tgetstr ("ae", address); tty->TS_exit_attribute_mode = tgetstr ("me", address); +#ifdef TERMINFO + tty->TS_enter_strike_through_mode = tigetstr ("smxx"); + if (TERMINFO_NON_STRING_CAP_P (tty->TS_enter_strike_through_mode)) { + tty->TS_enter_strike_through_mode = NULL; + } +#else tty->TS_enter_strike_through_mode = tgetstr ("smxx", address); +#endif MultiUp (tty) = tgetstr ("UP", address); MultiDown (tty) = tgetstr ("DO", address); @@ -4193,8 +4202,8 @@ init_tty (const char *name, const char *terminal_type, bool must_succeed) const char *bg = tigetstr ("setb24"); /* Non-standard support for 24-bit colors. */ if (fg && bg - && fg != (char *) (intptr_t) -1 - && bg != (char *) (intptr_t) -1) + && !TERMINFO_NON_STRING_CAP_P (fg) + && !TERMINFO_NON_STRING_CAP_P (bg)) { tty->TS_set_foreground = fg; tty->TS_set_background = bg; --=-=-= Content-Type: text/plain -- Mohsin Kaleem --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 19 07:37:17 2023 Received: (at 62265) by debbugs.gnu.org; 19 Mar 2023 11:37:17 +0000 Received: from localhost ([127.0.0.1]:49568 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pdrLh-0000AP-Ba for submit@debbugs.gnu.org; Sun, 19 Mar 2023 07:37:17 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37146) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pdrLf-0000A9-Rm for 62265@debbugs.gnu.org; Sun, 19 Mar 2023 07:37:16 -0400 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 1pdrLa-0001lW-2s; Sun, 19 Mar 2023 07:37:10 -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=sZsTESbTBkJPbPGUwBLU4yr2kSoLxRa2wxFsPwpSjHk=; b=OwqCl3Cj1Te7 EkKG9fL6zFBmhupUmQnpQ69qtrfPDbAtgH0Lbmx6BEJ4hrWtnJCzWiLpHG7dPrs8fSwNT8m3FO271 yydxycgfjvJSUS64sJ3DqSlLYgsO9toa4o3EkwhbupO6FvP8h79FDxMYuaGZymeSV5cG7blszMZP2 IU2Ot6gU0aLY/tVNZdg5M58NS4irO2psHCQJj26pHs5OJOBlEGy3HUVUUqPK2CQtmaxigTUn+xgHr 3yMlFL+a9QocYI2zSgdUhWxFX44BAhHWybwVbEfFBaJeXCChk+/r0OGybmh1W6N1D7Qjzb3t/7K/x gw6OOPu3yNeA899UR1bfMA==; 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 1pdrLZ-0006Dh-Ga; Sun, 19 Mar 2023 07:37:09 -0400 Date: Sun, 19 Mar 2023 13:37:14 +0200 Message-Id: <83v8ix9dlh.fsf@gnu.org> From: Eli Zaretskii To: Mohsin Kaleem In-Reply-To: <87mt49jbql.fsf@kisara.moe> (message from Mohsin Kaleem on Sun, 19 Mar 2023 10:07:14 +0000) Subject: Re: bug#62265: Underline does not work in Terminal Emacs References: <87wn3ex8ik.fsf@kisara.moe> <83edpmaqrs.fsf@gnu.org> <7cf462de-97f7-26ef-a33f-e3ff59c8b55e@gmail.com> <87mt49jbql.fsf@kisara.moe> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 62265 Cc: jporterbugs@gmail.com, 62265@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Mohsin Kaleem > Cc: 62265@debbugs.gnu.org > Date: Sun, 19 Mar 2023 10:07:14 +0000 > > Hi, so turns out terminfo returns a max-ptr for tigetstr when the > terminfo definition is missing. There's checks for this for setb24 and > setf24 but not in the patch I supplied. Updated to check this and added > a macro definition to avoid repeating the same condition logic 3 times. Thanks. However, what about the non-TERMINFO branch? Do termcap databases support this capability and tigetstr? I wonder whether we should do one of the following: . support "smxx" only when TERMINFO is defined . support "smxx" regardless of whether TERMINFO is defined With your patch, it's neither here nor there. tgetstr is documented to pay attention only to the first 2 characters of the capability's name, at least in the ncurses documentation. If this is generally so in other curses libraries, then leaving the tgetstr call intact in the non-TERMINFO case makes no sense. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 19 07:51:52 2023 Received: (at 62265) by debbugs.gnu.org; 19 Mar 2023 11:51:52 +0000 Received: from localhost ([127.0.0.1]:49580 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pdrZn-0000bL-Ml for submit@debbugs.gnu.org; Sun, 19 Mar 2023 07:51:51 -0400 Received: from 119.ip-51-38-65.eu ([51.38.65.119]:58746 helo=mail.kisara.moe) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pdrZk-0000b8-V9 for 62265@debbugs.gnu.org; Sun, 19 Mar 2023 07:51:49 -0400 Received: from mk-desktop (33b719f5.skybroadband.com [51.183.25.245]) (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 4FA46A1043; Sun, 19 Mar 2023 12:51:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kisara.moe; s=202207; t=1679226706; bh=/ONlQ6Mh0sjFtlCXQjcoUV+nZlUdkr6QHVtarkmO5rg=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=hGRj8MjZfKISKN+kaB5bbd7lr1wG7R+WiOzbPwqvsHXsJbDpEp0OslZY2WlDqyA1A SlgFm4wk7RQYTklmy48ZXh4n6RjpAx9LxMvZTYaFdgRiEsICASkxMcPoPRzihSpVOP i/C9+I8SUij0QMffeLdM/SfO1xApsYX7R1cpe15Y= From: Mohsin Kaleem To: Eli Zaretskii Subject: Re: bug#62265: Underline does not work in Terminal Emacs In-Reply-To: <83v8ix9dlh.fsf@gnu.org> References: <87wn3ex8ik.fsf@kisara.moe> <83edpmaqrs.fsf@gnu.org> <7cf462de-97f7-26ef-a33f-e3ff59c8b55e@gmail.com> <87mt49jbql.fsf@kisara.moe> <83v8ix9dlh.fsf@gnu.org> Date: Sun, 19 Mar 2023 11:51:45 +0000 Message-ID: <87r0tlm01a.fsf@kisara.moe> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 62265 Cc: jporterbugs@gmail.com, 62265@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) Eli Zaretskii writes: > However, what about the non-TERMINFO branch? Do termcap databases > support this capability and tigetstr? I wonder whether we should do > one of the following: > > . support "smxx" only when TERMINFO is defined > . support "smxx" regardless of whether TERMINFO is defined The latter wouldn't be possible for those using terminfo because of the issue I described before. I'm okay with the former approach but I imagine the author of the original TTY strikethrough patch was building Emacs without terminfo and they described the patch as working for them so I'd have to conclude termcap does support this (in a non-compliant ncurses way). Switching to the former approach might break their workflow since if they build without terminfo they'd lose strikethrough altogether. I'm happy to test whether this would be the case but not sure how to. The difference between termcap and terminfo seem kinda arbitrary to me and I can't find any documentation describing the exact difference (except this sort of 2 letter restriction in termcap extensions). -- Mohsin Kaleem From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 19 08:24:21 2023 Received: (at 62265) by debbugs.gnu.org; 19 Mar 2023 12:24:21 +0000 Received: from localhost ([127.0.0.1]:49604 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pds5E-0001R6-RY for submit@debbugs.gnu.org; Sun, 19 Mar 2023 08:24:21 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33982) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pds5D-0001Qq-HE for 62265@debbugs.gnu.org; Sun, 19 Mar 2023 08:24:19 -0400 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 1pds57-0005sy-FU; Sun, 19 Mar 2023 08:24:13 -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=mP16TZYAeWOFja9zjn1lrrOSP+BsT61TjZ94GgT8A9g=; b=Ysa3ach9rZSx 81NdpoGQEp1A1rcaoyLRh1dqMfj6QDbeiLk1arArUjyy2SJfrMmzUB+lYfx5601E1il2vd3QMv9T2 dP7Ndaq2M0/uUdkFDIF7Ph+djULqfMPM8vFVaW73iGSHRoeegUcsn45dE1OuqJW5RjGkc4gIZc7B2 sKP9BoNQ/Hl0cJQNCJFeB7Tq5+2NkKvwpKBdRRpJv7Kv9Q6FyyQihfkb6wTDR16TAjp5jm5S1JMDn OZUPQ7qbqLmXMhSCHGbZrZRw5xyeeqqhUQrHEu5aXaEGURLf1FYYjYsgLW45MGP9qfNUPCjTLNs7x jIMhbLRLyxOpGKFkaELXhg==; 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 1pds56-00026K-U2; Sun, 19 Mar 2023 08:24:13 -0400 Date: Sun, 19 Mar 2023 14:24:19 +0200 Message-Id: <83r0tl9bf0.fsf@gnu.org> From: Eli Zaretskii To: Mohsin Kaleem , Mike Hamrick In-Reply-To: <87r0tlm01a.fsf@kisara.moe> (message from Mohsin Kaleem on Sun, 19 Mar 2023 11:51:45 +0000) Subject: Re: bug#62265: Underline does not work in Terminal Emacs References: <87wn3ex8ik.fsf@kisara.moe> <83edpmaqrs.fsf@gnu.org> <7cf462de-97f7-26ef-a33f-e3ff59c8b55e@gmail.com> <87mt49jbql.fsf@kisara.moe> <83v8ix9dlh.fsf@gnu.org> <87r0tlm01a.fsf@kisara.moe> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 62265 Cc: jporterbugs@gmail.com, 62265@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Mohsin Kaleem > Cc: jporterbugs@gmail.com, 62265@debbugs.gnu.org > Date: Sun, 19 Mar 2023 11:51:45 +0000 > > Eli Zaretskii writes: > > > However, what about the non-TERMINFO branch? Do termcap databases > > support this capability and tigetstr? I wonder whether we should do > > one of the following: > > > > . support "smxx" only when TERMINFO is defined > > . support "smxx" regardless of whether TERMINFO is defined > > The latter wouldn't be possible for those using terminfo because of the > issue I described before. I'm okay with the former approach but I > imagine the author of the original TTY strikethrough patch was building > Emacs without terminfo and they described the patch as working for them > so I'd have to conclude termcap does support this (in a non-compliant > ncurses way). Switching to the former approach might break their > workflow since if they build without terminfo they'd lose strikethrough > altogether. I'm happy to test whether this would be the case but not > sure how to. The difference between termcap and terminfo seem kinda > arbitrary to me and I can't find any documentation describing the exact > difference (except this sort of 2 letter restriction in termcap > extensions). If your hypothesis is correct, I'm fine with leaving the non-TERMINFO branch using tgetstr. But is it indeed correct? Let's ask the author of that strikethrough patch. Mike, can you tell whether you tested the patch on a system with or without terminfo? And what, if anything, can you tell about using tgetstr for capabilities whose names are more than 2 characters -- is that supported with the curses library you were using at the time? Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 16 02:19:09 2023 Received: (at control) by debbugs.gnu.org; 16 Apr 2023 06:19:09 +0000 Received: from localhost ([127.0.0.1]:50504 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pnvjA-0004xI-Lx for submit@debbugs.gnu.org; Sun, 16 Apr 2023 02:19:08 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37230) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pnvj7-0004wi-Fz; Sun, 16 Apr 2023 02:19:07 -0400 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 1pnvj1-0000NV-7F; Sun, 16 Apr 2023 02:18:59 -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=plKuzCWuEor6rOVZFIS756Zs3iv7OjPOd3a7Qfe/Qrc=; b=HauelEiS8PxN YM/VsooQYzuM60B4Glbg8OPz9GTd2+PDBRSHV9XJ3DvD/tmtsCUuUYb7PPVjj+PVjNdUtN4Cx8dli S8Ui17JKuIh/5gzvtSDog5QnTzDtEvROIEdAZHGoseX+dqRtx6uG+Vts0VzKm9S9bmn9lrSmb+YtX UUTv4DiZTTtHhRF+qVqfdEf5vJoNF9b11mzqAcQv2Rst+h1ZeKeGVPcRN85PshN3dqfXcOgC2rUKi Ggfc8Av3Wtbomh3AZGTQdDXsufJbgI9TOW+e1znjlDw1Lvt1qQNr8aMapMpkCa/T9qmBWHJE93Zq2 +g0h2cI2Ykmqg7xxgM86pA==; 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 1pnvj0-0002XG-7I; Sun, 16 Apr 2023 02:18:58 -0400 Date: Sun, 16 Apr 2023 09:19:01 +0300 Message-Id: <83pm84bb8q.fsf@gnu.org> From: Eli Zaretskii To: Ivan Kuraj In-Reply-To: <913550lj8f.fsf@csail.mit.edu> (message from Ivan Kuraj on Sat, 15 Apr 2023 21:11:00 -0400) Subject: Re: bug#62876: 28.2; strikethrough text on TTY not showing References: <913550lj8f.fsf@csail.mit.edu> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control Cc: 62876@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) merge 62876 62265 thanks > From: Ivan Kuraj > Date: Sat, 15 Apr 2023 21:11:00 -0400 > > > Strikethrough text is not displaying properly when Emacs is started with `emacs -nw`. I tried xterm (Arch Linux), iTerm2 (MacOS), xterm/iterm2 over ssh. Tried Emacs 28.2 (Linux/Macos, with/without native compilation, with/without Doom Emacs). > > On xterm strikethrough is underlined. Terminals, as well as GUI Emacs, properly display strikethrough. (Terminals on executing `echo -e "\e[9mstrikethrough\e[0m"`.) TERM is set so that the terminals confirm support for "smxx": > > $ TERM=xterm-24bit infocmp -x | grep -E '(rm|sm)xx' > > 79: kpZRO=\EOp, rmxx=\E[29m, > > 82: smxx=\E[9m, xm=\E[<%i%p3%d;%p1%d;%p2%d;%?%p4%tM%em%;, > > If I am not mistaken, this was working properly on prior versions of Emacs. (As confirmed, e.g. here: https://emacs.stackexchange.com/questions/43722/emacsclient-nw-and-strikethrough-text-in-org-mode) This is a duplicate of bug#62265, for which I just installed a fix on the emacs-29 branch. Please try that branch if you can. P.S. Support for strikethrough on TTY frames was added to Emacs in version 28.1. From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 16 02:23:00 2023 Received: (at 62265-done) by debbugs.gnu.org; 16 Apr 2023 06:23:00 +0000 Received: from localhost ([127.0.0.1]:50510 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pnvmu-00053V-BT for submit@debbugs.gnu.org; Sun, 16 Apr 2023 02:23:00 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53230) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pnvms-00053I-HX for 62265-done@debbugs.gnu.org; Sun, 16 Apr 2023 02:22:58 -0400 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 1pnvmm-00019E-Ce; Sun, 16 Apr 2023 02:22:52 -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=7S9OzokyjrsHCquAi4/OsJoLuXvxvHTwTfrB9b12Ht8=; b=Mo35wSoQD9G4 wACTR7roGzwC5IXGg+hxieSUS/hhV3bvhyFSZ8+4qYr4mjrqEVeTG2ygzAgxIGXz5lmLs5f6lFwBK PI3784z3grvjBoQTshmmA5SK8D8a36CAr8cLhFntuMct+kNdUKsRXEThqeiUnYl8BXCxpphtK9iRK PNO8Hmol++oYBlQC0EAtdrb/x2FEQjcXZB6EingoU0s9er2rYWZFYiJ3fFQg2ejP7GK7SYgJuwzdJ ILOYOQnUEHFQLgFVFmLCCAJeh0AzGWZZ2wUtiRMhWsrKtZwtpJoPm1BYGQA0HrbhJiQuarBZiQXTa aAwQqCuZrvqpfvNic8klZg==; 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 1pnvml-0002qI-HM; Sun, 16 Apr 2023 02:22:51 -0400 Date: Sun, 16 Apr 2023 09:22:53 +0300 Message-Id: <83o7nobb2a.fsf@gnu.org> From: Eli Zaretskii To: mohkale@kisara.moe, mikeh@muppetlabs.com In-Reply-To: <83r0tl9bf0.fsf@gnu.org> (message from Eli Zaretskii on Sun, 19 Mar 2023 14:24:19 +0200) Subject: Re: bug#62265: Underline does not work in Terminal Emacs References: <87wn3ex8ik.fsf@kisara.moe> <83edpmaqrs.fsf@gnu.org> <7cf462de-97f7-26ef-a33f-e3ff59c8b55e@gmail.com> <87mt49jbql.fsf@kisara.moe> <83v8ix9dlh.fsf@gnu.org> <87r0tlm01a.fsf@kisara.moe> <83r0tl9bf0.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 62265-done Cc: jporterbugs@gmail.com, 62265-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: jporterbugs@gmail.com, 62265@debbugs.gnu.org > Date: Sun, 19 Mar 2023 14:24:19 +0200 > From: Eli Zaretskii > > > From: Mohsin Kaleem > > Cc: jporterbugs@gmail.com, 62265@debbugs.gnu.org > > Date: Sun, 19 Mar 2023 11:51:45 +0000 > > > > Eli Zaretskii writes: > > > > > However, what about the non-TERMINFO branch? Do termcap databases > > > support this capability and tigetstr? I wonder whether we should do > > > one of the following: > > > > > > . support "smxx" only when TERMINFO is defined > > > . support "smxx" regardless of whether TERMINFO is defined > > > > The latter wouldn't be possible for those using terminfo because of the > > issue I described before. I'm okay with the former approach but I > > imagine the author of the original TTY strikethrough patch was building > > Emacs without terminfo and they described the patch as working for them > > so I'd have to conclude termcap does support this (in a non-compliant > > ncurses way). Switching to the former approach might break their > > workflow since if they build without terminfo they'd lose strikethrough > > altogether. I'm happy to test whether this would be the case but not > > sure how to. The difference between termcap and terminfo seem kinda > > arbitrary to me and I can't find any documentation describing the exact > > difference (except this sort of 2 letter restriction in termcap > > extensions). > > If your hypothesis is correct, I'm fine with leaving the non-TERMINFO > branch using tgetstr. But is it indeed correct? > > Let's ask the author of that strikethrough patch. Mike, can you tell > whether you tested the patch on a system with or without terminfo? > And what, if anything, can you tell about using tgetstr for > capabilities whose names are more than 2 characters -- is that > supported with the curses library you were using at the time? No further comments, so I've installed a fix for this along the lines we discussed, and I'm closing this bug. From unknown Fri Jun 20 07:24:57 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 15 May 2023 11:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator