Article View: news.software.nn
Article #10842Re: Reading only 3 groups with nn?
From: Aaron W. Hsu
Date: Sun, 10 Aug 2008 03:27
Date: Sun, 10 Aug 2008 03:27
120 lines
6749 bytes
6749 bytes
andrew <andrew@ilium.invalid> writes:
>As this is only my second day using nn I hope a few noob questions
>will be excused?
Not a problem at all. ;-)
>1. I only expect to read 3 groups with nn: news.software.readers,
> news.software.nn and a leafnode 'local' test group. What is
> the best way to limit nn to these groups only? nn has its own
> .newsrc file but I manages to kill this fairly quickly when
> editing :-).
Actually, NN uses the "standard" .newsrc file that most other
newsreaders can handle. However, if you do not have any other news
reader that will be using that file, you can just enter a few lines:
news.software.nn:
news.software.readers:
local:
If those are the names of the newsgroups. Now, NN checks for new groups
on startup by default, so you'll want to add the following to your
init file:
set new-group-action 0
And, you can see the relavent information from the man page:
new-group-action action (integer, default 3)
This variable controls how new groups are treated
by nn. It is an integer variable, and the follow-
ing values can be used. Some of these actions
(marked with an *) will only work when keep-unsub-
scribed is set, since the presence of a group in
.newsrc is the only way to recognize it as an old
group:
0) Ignore groups which are not in .newsrc. This
will obviously include new groups, and therefore
you must explictly add any new groups that you care
about (by editting the .newsrc file, or using the G
menu command and then subscribing to the group).
When NNTP is being used, this setting prevents the
active.times data from being read from the server;
this can be helpful when using a slow link, since
the data can often be hundreds of KBytes long.
1*) Groups not in .newsrc are considered to be
new, and are inserted at the beginning of the
.newsrc file.
2*) Groups not in .newsrc are considered to be
new, and are appended to the end of the .newsrc
file.
3) New groups are recognized via a time-stamp
saved in the file .nn/LAST and in the database,
i.e. it is not dependent on the groups currently in
.newsrc. The new groups are automatically appended
to .newsrc with subscription. Old groups not pre-
sent in .newsrc will be considered to be unsub-
scribed.
4) As 3, but the user is asked to confirm that the
new group should be appended to .newsrc. If
rejected, the group will not be appended to
.newsrc, and thus be regarded as unsubscribed.
5) As 4, except that the information is stored in
a format compatible with the rn news reader
(.rnlast). This needs to be tested!
>2. I would like to set editor instructions in the .nn/init file
> for vim but the syntax escapes me. I would like to add something
> along the lines of:
> set editor vim '+set tw=72' +%d '%s'
> but nn was not happy with varying combinations of ", ', etc.
Well, see, normally, you would just set your editor in the EDITOR
environment, and everything would just work. In fact, normally,
nn will automatically position the editor on the right line for you.
However, looking at the copy of my aux file, vim will not be
automatically recognized. :-) So, a little fancy stuff can be done.
The problem is that the editor variable -- I think -- does not take
options, but just a string to the program. This program is then fed
into a script, known as the aux script in the library directory of
NN. It then scans the string to figure out if it knows how to handle
this editor. If it does, then it will invoke the right options.
First thing you should do is just set your environment variable to
vim unless you want to use another editor for other programs, in
which case "set editor /usr/local/bin/vim" in your init file or the
equivalent will work.
Secondly, you need to look at where you put your executable utilities
when you installed NN, maybe /usr/local/lib or /usr/local/libexec. You
are looking for the aux* file. Once you find that file, you will see
around line 303 where it decides what options to feed to the program.
You'll want to add after line 310:
vim )
# Vim with width Limit
eval $EDITOR '+set tw=72' +%d '%s'
;;
This will provide a case for handling vim with your options in it. :-)
How did I know this? THe archives help, a lot. :-)
>Thank you very much for your trouble, and thanks Aaron for putting
>me onto this great newsreader :-).
Well, I am glad that I could be of some service. I hope that you'll
come to appreciate NN as much as I have.
Sincerely,
Aaron Hsu
--
+++++++++++++++ ((lambda (x) (x x)) (lambda (x) (x x))) +++++++++++++++
Email: <arcfide@sacrideo.us> | WWW: <http://www.sacrideo.us>
Scheme Programming is subtle; subtlety can be hard.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Technical Details
Message-ID:
<6oKdnROfVZ6I_QPVnZ2dnUVZ_uOdnZ2d@giganews.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nn.20140326.mbox.gz!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local02.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mailReferences:
<umq1n5xqsm.ln2@ilium.andrews-corner.org>Show Full Headers
Complete Article Headers
Message-ID: <6oKdnROfVZ6I_QPVnZ2dnUVZ_uOdnZ2d@giganews.com> Subject: Re: Reading only 3 groups with nn? Date: Sat, 09 Aug 2008 22:27:17 -0500 From: Aaron W. Hsu <arcfide@sacrideo.us> References: <umq1n5xqsm.ln2@ilium.andrews-corner.org> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nn.20140326.mbox.gz!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local02.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Sat, 09 Aug 2008 22:27:17 -0500 Newsgroups: news.software.nn Organization: Sacrificum Deo Reply-To: arcfide@sacrideo.us User-Agent: nn/6.7.3 Lines: 120 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-oRoxiDOu6GtUmaP+9RmBH91Ua8bg3Kga+a5VeNSyqHlreu42VFy5i3c+gRc0q8tY71MKFt8RUDkUk1G!gdxkivianC2/UshPYlktk4aiBOg0Bx79pJVQRdrKkneXSmcwACsD47u0f8WIRs2iyMvs6g2mRw== X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.39