Article View: news.software.nntp
Article #2772simple elisp question... removing substrings?
From: Robert Nicholson
Date: Sat, 30 Jul 1994 08:31
Date: Sat, 30 Jul 1994 08:31
55 lines
2717 bytes
2717 bytes
I make use of mail2news to put all subscribed mailing lists into their
appropriate newsgroup prefixed with "steffi." It's cool reading mail
with gnus :-)
However, whenever I want to save an article I wish it to be saved to
the newsgroup name without the "steffi." prefix.
I'm currently using
(defun gnus-plain-save-name-without-hostname (newsgroup headers &optional last-file)
(let((prefix (substring newsgroup 0 7))
(suffix (substring newsgroup 7 nil)))
(if (string= prefix "steffi.")
(gnus-plain-save-name suffix headers last-file)
(gnus-plain-save-name newsgroup headers last-file))))
which does the job nicely however what I really wanted was something
that just took a string say "steffi.zsh-list" and removed the
"steffi." if it was there or just returned the full-string when it
wasn't. ie. so that I can provide a solution that just has _one_
(gnus-plain call rather than two but I didn't want to do (setq either.
Is there some simple elisp that I'm overlooking? My way appears to be
rather terse.
--- r$
Also, is it possible for me to send _mail_ to these mailing lists by
posting _new_ messages in GNUS? ie. nobody's going to be reading those
groups :-)
I guess I could do it in elisp but can newsfeeds or some INN
configuration set particular newsgroups to be mailed rather than sent
via nntp?
---
If you haven't guessed I'm looking for a solution that allows me to do
all my mailing from within GNUS..
---
And while we're at it.
Should the following newfeeds entry surpress sending all "steffi." newsgroups
down to my host? Currently it doesn't.
news/demon\
:*,!junk/!local,!steffi.*\
:Tf,Wnm:
--
"Real programmers don't create classes. They build hierarchies"
(PGP key: send email with Subject: request pgp key)
(ASCII for text only messages)
Technical Details
Message-ID:
<ROBERT.94Jul30093150@steffi.demon.co.uk>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-gnu.emacs.help.mbox.zip!bga.com!news.sprintlink.net!hookup!swrinde!pipex!demon!steffi.demon.co.uk!usenetShow Full Headers
Complete Article Headers
Message-ID: <ROBERT.94Jul30093150@steffi.demon.co.uk> Subject: simple elisp question... removing substrings? Date: Sat, 30 Jul 1994 08:31:50 +0000 From: robert@steffi.demon.co.uk (Robert Nicholson) Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-gnu.emacs.help.mbox.zip!bga.com!news.sprintlink.net!hookup!swrinde!pipex!demon!steffi.demon.co.uk!usenet Newsgroups: gnu.emacs.help,gnu.emacs.gnus,news.software.nntp Organization: me organized? That's a joke! Lines: 54 Distribution: world NNTP-Posting-Host: steffi.demon.co.uk CC: rsalz@uunet.uu.net CC: emacs-for-ns-users X-Newsreader: GNUS4.1:RFC 977, 1036, 822 compliant