From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 30779 invoked from network); 12 Dec 2020 05:22:41 -0000 Received: from mx1.math.uh.edu (129.7.128.32) by inbox.vuxu.org with ESMTPUTF8; 12 Dec 2020 05:22:41 -0000 Received: from lists1.math.uh.edu ([129.7.128.208]) by mx1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1knxMb-007Axh-PY for ml@inbox.vuxu.org; Fri, 11 Dec 2020 23:22:37 -0600 Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.94) (envelope-from ) id 1knxMb-00GoDQ-A6 for ml@inbox.vuxu.org; Fri, 11 Dec 2020 23:22:37 -0600 Received: from mx1.math.uh.edu ([129.7.128.32]) by lists1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1knxMY-00GoDH-UC for ding@lists.math.uh.edu; Fri, 11 Dec 2020 23:22:34 -0600 Received: from quimby.gnus.org ([95.216.78.240]) by mx1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1knxMW-007AxR-1n for ding@lists.math.uh.edu; Fri, 11 Dec 2020 23:22:34 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=gVgTUeGywi93nMIRhgTHG3dvQKg3iz7FHc7h+zibf50=; b=U+7VG2l8PgmeS7YwZJFWuehSdf I5Y6FCUF4DQjKqEhsrMrZWhwtS25U3e/xfQpY+QnJ/S9ljr0rfqJcUihmFEPhvu/dz6Dj/fdZW7pd vm2RDbIkyu6TmoNVdQKk8zFOkpZJ+KhPiQ4bRNNuZViEeHTwcVtUmwAYvatuc+PXuC9k=; Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by quimby.gnus.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1knxML-0006Z4-UH for ding@gnus.org; Sat, 12 Dec 2020 06:22:27 +0100 Received: by mail-pl1-x635.google.com with SMTP id u4so5691620plr.12 for ; Fri, 11 Dec 2020 21:22:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codeisgreat-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:organization:references:mail-followup-to:date :in-reply-to:message-id:user-agent:mime-version; bh=gVgTUeGywi93nMIRhgTHG3dvQKg3iz7FHc7h+zibf50=; b=oqCwONsmGlAukngZbijUvpPXe2IWZSd+6/jzgcC4PvxYyF6MLiLLckiSpXQEoRXtzF cmdHbOTAYNRMANSuZ3C4l0rkZYxCy06thXiKsubSj80c+oe3pttbnzP3MXQ4+ncbylxY u4PsXN9xaxhXn0v9gmUWqorzwFVpW6aGA4qc3Jx5kQ0Jh3G9VwE7WfEMoeU7otMDm4OE /6pjzF1JSRo3OhFdelM+KEyP2Hhd5HJ2xbjVsPXbFVGdhTCztBG69jZ4M487WRIgm0GC J6+hI9jmTzs4LDEUM5erTYWxremUT8oOdkNcSIzp2b8us3F6iMVonlK744I3khSL2OlS nUvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:organization:references :mail-followup-to:date:in-reply-to:message-id:user-agent :mime-version; bh=gVgTUeGywi93nMIRhgTHG3dvQKg3iz7FHc7h+zibf50=; b=Db0KwQPb3Vih8IDwg0zWP7mBBdjy55ciEmY8YiBjyHiYqmao61iYhnkPw4d4HdM6Lj rRep2/vWgokHgakboabXfkRGmsRYyg6FmU/HOlxarju+qN1VzzoUHMJxv2PlOEYBy2pV ExYIV+/HmoNUzoFwEGdxlfyrk+HPdOnSVkN2Wh/ctVdmffqBxDKYD8uUlu6fC08sJjI8 DpxpPfSY/CgWQDEx/sAeMEIHxQY1wai8hcWXdkPYoVfaabwKnqwSng7bTBUT42ImQuIw pZkpg9aPnMOg4KZ1saomNiTpplTbNu57WcGIU7KnQQtnV4kwjxmEapGhVKPXLDv7hAKK 7amg== X-Gm-Message-State: AOAM533jm7AZNzb9Sn+/r5INnymcVaAf0qAy79+zN/AtYiqdT6qpgKPo JmL1T3ya4km2w3tKEk5ykIwejKICBQC86w== X-Google-Smtp-Source: ABdhPJzJ+CV8v1SfAlCvIRl1XkZ1aBUsnOAUBnm4D/INmjRRMZ9pojyhP5Mn0YDEqy4etu2FtICYGA== X-Received: by 2002:a17:902:7d8e:b029:da:cfcb:f4c4 with SMTP id a14-20020a1709027d8eb02900dacfcbf4c4mr13627126plm.79.1607750537788; Fri, 11 Dec 2020 21:22:17 -0800 (PST) Received: from mb2.local ([2405:201:5c06:70bb:6997:f18e:f281:cae8]) by smtp.gmail.com with ESMTPSA id v24sm12612655pgi.61.2020.12.11.21.22.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Dec 2020 21:22:17 -0800 (PST) From: Pankaj Jangid To: Lars Ingebrigtsen Cc: Gnus Users Subject: Re: Customizing %[, %] and fill width Organization: Code Is Great Foundation References: <87y2ipzj9g.fsf@gnus.org> <87eekgxv9i.fsf@gnus.org> <87h7pcuza8.fsf@gnus.org> Mail-Followup-To: Lars Ingebrigtsen , Gnus Users Date: Sat, 12 Dec 2020 10:52:13 +0530 In-Reply-To: <87h7pcuza8.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 26 Nov 2020 12:34:55 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" List-ID: Precedence: bulk --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Lars Ingebrigtsen writes: >> I am definitely willing to sign the papers. Please let me know the >> process. > > Great! (Form sent off-list.) > > When the process has completed, please send a mail reminding me to push > this patch. Hi Lars, Got the signed paper. Yeah! Attached is the patch rebased with =E2=80=98master=E2=80=99. I have been do= ing it daily to prevent merging issues at the last moment. :-) --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-New-user-options-to-customise-the-summary-line-specs.patch >From a67e7c9803fe24b8f235a507cc3d2f203b7c6bc5 Mon Sep 17 00:00:00 2001 From: Pankaj Jangid Date: Fri, 27 Nov 2020 00:33:25 +0530 Subject: [PATCH] New user options to customise the summary line specs %[ and %]. Four new options are introduced - 'gnus-sum-opening-bracket', 'gnus-sum-closing-bracket', 'gnus-sum-opening-bracket-adopted', and 'gnus-sum-closing-bracket-adopted'. * doc/misc/gnus.text: documentation added for the new options * etc/NEWS: entry for new options * lisp/gnus/gnus-sum.el: implementation for new options --- doc/misc/gnus.texi | 31 +++++++++++++++++++++++++++-- etc/NEWS | 13 ++++++++++++ lisp/gnus/gnus-sum.el | 46 +++++++++++++++++++++++++++++++++++-------- 3 files changed, 80 insertions(+), 10 deletions(-) diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index 4aa07ce388..3d04f170bb 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -5028,10 +5028,37 @@ Summary Buffer Lines pushes everything after it off the screen). @item [ Opening bracket, which is normally @samp{[}, but can also be @samp{<} -for adopted articles (@pxref{Customizing Threading}). +for adopted articles (@pxref{Customizing Threading}). This can be +customized using following settings: + +@table @code +@item gnus-sum-opening-bracket +@vindex gnus-sum-opening-bracket +Opening bracket for normal (non-adopted) articles. The default is +@samp{[}. + +@item gnus-sum-opening-bracket-adopted +@vindex gnus-sum-opening-bracket-adopted +Opening bracket for adopted articles. The default is @samp{<}. + +@end table + @item ] Closing bracket, which is normally @samp{]}, but can also be @samp{>} -for adopted articles. +for adopted articles. This can be customised using following settings: + +@table @code +@item gnus-sum-closing-bracket +@vindex gnus-sum-closing-bracket +Closing bracket for normal (non-adopted) articles. The default is +@samp{]}. + +@item gnus-sum-closing-bracket-adopted +@vindex gnus-sum-opening-bracket-adopted +Closing bracket for adopted articles. The default is @samp{>}. + +@end table + @item > One space for each thread level. @item < diff --git a/etc/NEWS b/etc/NEWS index 26e4b8514f..5a4a89245f 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -510,6 +510,19 @@ tags to be considered as well. ** Gnus ++++ +*** New user options to customise the summary line specs %[ and %]. +Four new options introduced in customisation group +'gnus-summary-format'. These are 'gnus-sum-opening-bracket', +'gnus-sum-closing-bracket', 'gnus-sum-opening-bracket-adopted', and +'gnus-sum-closing-bracket-adopted'. Their default values are '[', ']', +'<', '>' respectively. These variables control the appearance of '%[' +and '%]' specs in the summary line format. '%[' will normally display +the value of 'gnus-sum-opening-bracket', but can also be +'gnus-sum-opening-bracket-adopted' for the adopted articles. '%]' will +normally display the value of 'gnus-sum-closing-bracket', but can also +be 'gnus-sum-closing-bracket-adopted' for the adopted articles. + +++ *** New user option 'gnus-paging-select-next'. This controls what happens when using commands like 'SPC' and 'DEL' to diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 9432eefcb4..9488b32487 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -1460,8 +1460,8 @@ gnus-summary-line-format-alist (?I gnus-tmp-indentation ?s) (?T (if (= gnus-tmp-level 0) "" (make-string (frame-width) ? )) ?s) (?R gnus-tmp-replied ?c) - (?\[ gnus-tmp-opening-bracket ?c) - (?\] gnus-tmp-closing-bracket ?c) + (?\[ gnus-tmp-opening-bracket ?s) + (?\] gnus-tmp-closing-bracket ?s) (?\> (make-string gnus-tmp-level ? ) ?s) (?\< (make-string (max 0 (- 20 gnus-tmp-level)) ? ) ?s) (?i gnus-tmp-score ?d) @@ -3748,6 +3748,30 @@ gnus-summary-from-or-to-or-newsgroups (inline (gnus-summary-extract-address-component gnus-tmp-from)))))) +(defcustom gnus-sum-opening-bracket "[" + "With %[ spec, used to identify normal (non-adopted) articles." + :version "28.1" + :type 'string + :group 'gnus-summary-format) + +(defcustom gnus-sum-closing-bracket "]" + "With %] spec, used to identify normal (non-adopted) articles." + :version "28.1" + :type 'string + :group 'gnus-summary-format) + +(defcustom gnus-sum-opening-bracket-adopted "<" + "With %[ spec, used to identify adopted articles." + :version "28.1" + :type 'string + :group 'gnus-summary-format) + +(defcustom gnus-sum-closing-bracket-adopted ">" + "With %] spec, used to identify adopted articles." + :version "28.1" + :type 'string + :group 'gnus-summary-format) + (defun gnus-summary-insert-line (header level current undownloaded unread replied expirable subject-or-nil &optional dummy score process) @@ -3805,8 +3829,14 @@ gnus-summary-insert-line (1+ (match-beginning 0)) (1- (match-end 0)))) (t gnus-tmp-from))) (gnus-tmp-subject (mail-header-subject gnus-tmp-header)) - (gnus-tmp-opening-bracket (if gnus-tmp-dummy ?\< ?\[)) - (gnus-tmp-closing-bracket (if gnus-tmp-dummy ?\> ?\])) + (gnus-tmp-opening-bracket + (if gnus-tmp-dummy + gnus-sum-opening-bracket-adopted + gnus-sum-opening-bracket)) + (gnus-tmp-closing-bracket + (if gnus-tmp-dummy + gnus-sum-closing-bracket-adopted + gnus-sum-closing-bracket)) (inhibit-read-only t)) (when (string= gnus-tmp-name "") (setq gnus-tmp-name gnus-tmp-from)) @@ -5439,10 +5469,10 @@ gnus-summary-prepare-threads (if (and (eq gnus-summary-make-false-root 'adopt) (= gnus-tmp-level 1) (memq number gnus-tmp-gathered)) - (setq gnus-tmp-opening-bracket ?\< - gnus-tmp-closing-bracket ?\>) - (setq gnus-tmp-opening-bracket ?\[ - gnus-tmp-closing-bracket ?\])) + (setq gnus-tmp-opening-bracket gnus-sum-opening-bracket-adopted + gnus-tmp-closing-bracket gnus-sum-closing-bracket-adopted) + (setq gnus-tmp-opening-bracket gnus-sum-opening-bracket + gnus-tmp-closing-bracket gnus-sum-closing-bracket)) (if (>= gnus-tmp-level (length gnus-thread-indent-array)) (gnus-make-thread-indent-array (max (* 2 (length gnus-thread-indent-array)) -- 2.29.2 --=-=-= Content-Type: text/plain -- Regards Pankaj Jangid --=-=-=--