From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Blyte Scholar Newsgroups: gmane.emacs.bugs Subject: bug#72739: [PATCH] * lisp/gnus/gnus-sum.el: Handle leafs with children in summary line Date: Tue, 20 Aug 2024 17:44:48 -0400 Message-ID: <87plq2c1in.fsf@rhipidon.mail-host-address-is-not-set> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4015"; mail-complaints-to="usenet@ciao.gmane.io" To: 72739@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 21 00:09:40 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 1sgX2p-0000uj-HV for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 21 Aug 2024 00:09:39 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sgX2Y-0008NF-Nw; Tue, 20 Aug 2024 18:09:22 -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 1sgX2V-0008N0-Pg for bug-gnu-emacs@gnu.org; Tue, 20 Aug 2024 18:09:19 -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 1sgX2V-0004YY-1O for bug-gnu-emacs@gnu.org; Tue, 20 Aug 2024 18:09:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=pLyxtqW6/7wLsSqvBFwd14C06uGmY7Fm33NQOoSqyx8=; b=ivndHS3iBMWRrK/IJhULqyjGY1eQyuOTjSHi7QAYyHsi8ZxpPWUn6lT9ZXdCWw27D9yb4DvPQruQh+ONU14UbWhfPE3+Nt3Gv/ZFFt6j3f34rJ2P2gKTc2Ubp8nSi4wlPx1Q82VvXtIQVrp8ofMG+ju3SDpmUuVDH1z+tBBcK1ZwyGnlwM4pCjA0RzfA9tDMp3gWqzZbpWpciI5dSDhmQ8cBvivTc+akbhg8Z/bsZT14DHjNdU4tiCYuWnnWDw5r8J3l4SEd/oaPtprnabHBzMJvxDSkV4udc2hWrQHDIZMJCQwjSoorXSb8m3lI89tVjQBHQIB6rWOLgyq1q7WF/g==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sgX3C-000890-8j for bug-gnu-emacs@gnu.org; Tue, 20 Aug 2024 18:10:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Blyte Scholar Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Aug 2024 22:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 72739 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.172419179831290 (code B ref -1); Tue, 20 Aug 2024 22:10:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 20 Aug 2024 22:09:58 +0000 Original-Received: from localhost ([127.0.0.1]:33758 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sgX36-00088a-1E for submit@debbugs.gnu.org; Tue, 20 Aug 2024 18:09:58 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:41158) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sgWg0-0007Wa-1j for submit@debbugs.gnu.org; Tue, 20 Aug 2024 17:46: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 1sgWf6-0005lH-5B for bug-gnu-emacs@gnu.org; Tue, 20 Aug 2024 17:45:16 -0400 Original-Received: from paras.blyte.net ([198.12.76.26]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sgWew-0001Yy-NR for bug-gnu-emacs@gnu.org; Tue, 20 Aug 2024 17:45:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=blyte.net; s=20240716; t=1724190291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=pLyxtqW6/7wLsSqvBFwd14C06uGmY7Fm33NQOoSqyx8=; b=GFmGvbZ7kgJswt3k0keIft4LATbGmXA7s/2beJubPtoNxS+WixPFRiJGhI9wLUNc7Vheq9 yFsRijUfj5ssm3IBc8Jsn1bt+NRuy1Xor5SasX02MSseKIP/LWuplF40JYBrfKhokgdX4a n9CnFfTrCGWdY77WrnaDksiXZUvLMjM= Original-Received: from localhost (173-23-18-246.client.mchsi.com [173.23.18.246]) by paras.blyte.net (OpenSMTPD) with ESMTPSA id 4efb0dca (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Tue, 20 Aug 2024 17:44:50 -0400 (EDT) Received-SPF: pass client-ip=198.12.76.26; envelope-from=bs@blyte.net; helo=paras.blyte.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 20 Aug 2024 18:09:54 -0400 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:290473 Archived-At: --=-=-= Content-Type: text/plain Tags: patch Tags: patch Tags: patch This patch adds customization options which handle the cases where a thread leaf has both siblings and children. This allows using box drawing characters to seamlessly connect all messages in a thread. Previously, there would be messages could either be connected to a sibling or a child, but not both. In GNU Emacs 31.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.43, cairo version 1.18.0) of 2024-08-20 built on rhipidon Repository revision: 5d435afc0e389e107fcee8d63405078341592f97 Repository branch: master System Description: Fedora Linux 40 (Workstation Edition) Configured using: 'configure --with-imagemagick --with-tree-sitter --with-native-compilation=aot --with-pgtk' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-lisp-gnus-gnus-sum.el-Handle-leafs-with-children-in-.patch >From fca49a37ec7cc0c512290de93dd8311ca5a012d6 Mon Sep 17 00:00:00 2001 From: Blyte Scholar Date: Tue, 20 Aug 2024 17:32:10 -0400 Subject: [PATCH] * lisp/gnus/gnus-sum.el: Handle leafs with children in summary line (gnus-sum-thread-tree-leaf-with-other-root): New variable. (gnus-sum-thread-tree-single-leaf-root): New variable. (gnus-summary-prepare-threads): Use gnus-sum-thread-tree-leaf-with-other-root and gnus-sum-thread-single-leaf-root strings in summary line when they are available. --- lisp/gnus/gnus-sum.el | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index a9caa83b15c..2fd342f3a0c 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -5193,12 +5193,26 @@ gnus-sum-thread-tree-leaf-with-other :type 'string :group 'gnus-thread) +(defcustom gnus-sum-thread-tree-leaf-with-other-root nil + "With %B spec, used for a leaf with brothers and children. +If nil use `gnus-sum-thread-tree-leaf-with-other' instead." + :version "31.1" + :type 'string + :group 'gnus-thread) + (defcustom gnus-sum-thread-tree-single-leaf "\\-> " "With %B spec, used for a leaf without brothers." :version "22.1" :type 'string :group 'gnus-thread) +(defcustom gnus-sum-thread-tree-single-leaf-root nil + "With %B spec, used for a leaf without brothers but children. +If nil use `gnus-sum-thread-tree-leaf-single-leaf' instead." + :version "31.1" + :type 'string + :group 'gnus-thread) + (defcustom gnus-summary-display-while-building nil "If non-nil, show and update the summary buffer as it's being built. If the value is t, update the buffer after every line is inserted. If @@ -5474,8 +5488,14 @@ gnus-summary-prepare-threads gnus-sum-thread-tree-indent)) (cdr (reverse tree-stack)))) (if (nth 1 thread) - gnus-sum-thread-tree-leaf-with-other - gnus-sum-thread-tree-single-leaf))))) + (if (and gnus-sum-thread-tree-leaf-with-other-root + (cadar thread)) + gnus-sum-thread-tree-leaf-with-other-root + gnus-sum-thread-tree-leaf-with-other) + (if (and gnus-sum-thread-tree-single-leaf-root + (cadar thread)) + gnus-sum-thread-tree-single-leaf-root + gnus-sum-thread-tree-single-leaf)))))) (when (string= gnus-tmp-name "") (setq gnus-tmp-name gnus-tmp-from)) (unless (numberp gnus-tmp-lines) -- 2.46.0 --=-=-=--