From: dme@dme.org
Subject: patch: support '/' in group shortening
Date: 07 Sep 2000 09:47:09 +0100 [thread overview]
Message-ID: <m3snrceghe.fsf@serafina-pekkala.dme.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 213 bytes --]
Our MS Exchange server uses '/' as a path separator (as opposed to
'.'). This patch attempts to make gnus-short-group-name guess which
is in use and flatten the name accordingly.
Apologies if my elisp is poor.
[-- Attachment #2: patch: support '/' in group shortening --]
[-- Type: application/octet-stream, Size: 1460 bytes --]
*** gnus.el 2000/08/21 13:49:24 5.142
--- gnus.el 2000/09/06 08:43:52
***************
*** 2663,2671 ****
group (substring group (+ 1 colon))))
(setq foreign (concat foreign ":")))
;; Collapse group name leaving LEVELS uncollapsed elements
! (let* ((glist (split-string group "\\."))
! (glen (length glist))
res)
(setq levels (- glen levels))
(dolist (g glist)
(push (if (>= (decf levels) 0)
--- 2664,2684 ----
group (substring group (+ 1 colon))))
(setq foreign (concat foreign ":")))
;; Collapse group name leaving LEVELS uncollapsed elements
! (let* ((slist (split-string group "/"))
! (slen (length slist))
! (dlist (split-string group "\\."))
! (dlen (length dlist))
! glist
! glen
! gsep
res)
+ (if (> slen dlen)
+ (setq glist slist
+ glen slen
+ gsep "/")
+ (setq glist dlist
+ glen dlen
+ gsep "."))
(setq levels (- glen levels))
(dolist (g glist)
(push (if (>= (decf levels) 0)
***************
*** 2674,2680 ****
(substring g 0 1))
g)
res))
! (concat foreign (mapconcat 'identity (nreverse res) "."))))))
(defun gnus-narrow-to-body ()
"Narrow to the body of an article."
--- 2687,2693 ----
(substring g 0 1))
g)
res))
! (concat foreign (mapconcat 'identity (nreverse res) gsep))))))
(defun gnus-narrow-to-body ()
"Narrow to the body of an article."
[-- Attachment #3: Type: text/plain, Size: 6 bytes --]
dme.
next reply other threads:[~2000-09-07 8:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-09-07 8:47 dme [this message]
2000-09-08 19:12 ` Simon Josefsson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3snrceghe.fsf@serafina-pekkala.dme.org \
--to=dme@dme.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).