Article View: news.software.readers
Article #59529slrn - message-id generation with vim autocommand
From: Sven Guckes
Date: Thu, 23 Mar 2000 00:00
Date: Thu, 23 Mar 2000 00:00
55 lines
2477 bytes
2477 bytes
I intend to add this to my slrnrc. Comments?
FAQ: How do I generate the Message-ID within SLRN?
Answer:
(1) You need to compile slrn to allow generation
of Message-IDs, ie in src/slrnfeat.h you need:
#define SLRN_HAS_GEN_MSGID 1
(2) In the setup file of slrn you need to set this:
set generate_message_id 1
Now you can add the Message-ID to your header and
your newsserver has to accept your Message-ID, too.
FAQ: What kind of Message-ID format is allowed?
Answer: The RFC0822 defines this.
(Does anyone have a "nice" regexpr for this?)
I thought about using this format:
<Agent-Version.OS.YYYYmmddHHMM@domain>
Then again, the info on "Agent" and "OS" is on "User-Agent:", anyway.
(Besides, "uname" on SunOS would append a CTRL-J at the end of the
output which I didn't want to have removed with yet more commands.
Also, "uname" is not available on Windows. :-p )
So I am now using this format:
<YYYYmmddHHMM@domain>
I let my editor, Vim, add this line for me automatically on startup:
Message-ID: <200003230532@guckes.net>
This line was generated with this simple "autocommand":
au BufNewFile,BufRead \
~/.article,~/.followup \
let @"="Message-ID: <".strftime("%Y%m%d%H%M")."@guckes.net>\n"\
|exe 'norm 1G}""P'
Yes, this autocommand is broken across lines
where the backslashes ('\') at the end of
the line indicate a "continuation line".
It can probably be made easier to read
but I am too tired now to do that. ;-)
Hey, comp.editors - comments anyone?
And news.software.readers - is the Message-ID okay?
Or does this really need some pseudo random number?
Sven [now everyone know how long it takes me to write a post - dang!]
Technical Details
Message-ID:
<200003230532@guckes.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.editors.mbox.zip!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <200003230532@guckes.net> Subject: slrn - message-id generation with vim autocommand Date: Thu, 23 Mar 2000 00:00:00 +0000 From: guckes@math.fu-berlin.de (Sven Guckes) Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-comp.editors.mbox.zip!not-for-mail X-Deja-AN: 601167429 Mail-Copies-To: guckes-usenet-cc@math.fu-berlin.de X-Trace: fu-berlin.de 953787545 5031597 160.45.41.21 (16 17 19) Organization: Freie Universitaet Berlin User-Agent: slrn/0.9.6.2 (SunOS) Reply-To: guckes-slrn@math.fu-berlin.de Newsgroups: news.software.readers,comp.editors