]> git.eshelyaron.com Git - emacs.git/commitdiff
Shorten Gnus groups with [foo] in the name better
authorLars Ingebrigtsen <larsi@gnus.org>
Fri, 29 Oct 2021 13:29:17 +0000 (15:29 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 29 Oct 2021 13:30:21 +0000 (15:30 +0200)
* lisp/gnus/gnus.el (gnus-short-group-name): Shorten groups with
[] in the names better (bug#51450).

lisp/gnus/gnus.el

index 6644cc4d8140123931f9ce411c8c5f24f8c73705..dbbbb71e57fbc78b9ff942dd1dea33131e9df798 100644 (file)
@@ -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))