From: Lars Ingebrigtsen Date: Fri, 29 Oct 2021 13:29:17 +0000 (+0200) Subject: Shorten Gnus groups with [foo] in the name better X-Git-Tag: emacs-29.0.90~3671^2~365 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7f312f0be6b4cd2b46f37c61609fe9ff6315a848;p=emacs.git Shorten Gnus groups with [foo] in the name better * lisp/gnus/gnus.el (gnus-short-group-name): Shorten groups with [] in the names better (bug#51450). --- diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el index 6644cc4d814..dbbbb71e57f 100644 --- a/lisp/gnus/gnus.el +++ b/lisp/gnus/gnus.el @@ -3785,6 +3785,8 @@ just the host name." (setq foreign server group (substring group (+ 1 colon)))) (setq foreign (concat foreign ":"))) + ;; Remove braces from name (common in IMAP groups). + (setq group (replace-regexp-in-string "[][]+" "" group)) ;; Collapse group name leaving LEVELS uncollapsed elements (let* ((slist (split-string group "/")) (slen (length slist))