* patch: support '/' in group shortening
@ 2000-09-07 8:47 dme
2000-09-08 19:12 ` Simon Josefsson
0 siblings, 1 reply; 2+ messages in thread
From: dme @ 2000-09-07 8:47 UTC (permalink / 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.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: patch: support '/' in group shortening
2000-09-07 8:47 patch: support '/' in group shortening dme
@ 2000-09-08 19:12 ` Simon Josefsson
0 siblings, 0 replies; 2+ messages in thread
From: Simon Josefsson @ 2000-09-08 19:12 UTC (permalink / raw)
Cc: ding
dme@dme.org writes:
> 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.
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-09-08 19:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-09-07 8:47 patch: support '/' in group shortening dme
2000-09-08 19:12 ` Simon Josefsson
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).