Discussion:
trn4: Where are memorized command stored?
(too old to reply)
Kenny McCormack
2021-05-23 21:35:09 UTC
Permalink
I had an accident with keystrokes (think: cat walked on keyboard) while I
was reading news with trn (version 4). Somehow, a certain thread got
marked as "memorized", so that whenever I join that particular group, it
gets "selected". I, of course, want to undo this operation.

tl;dr: I eventually figured out that hitting T then c on that thread would
"de-memorize" it, so problem is solved. However, ...

I would like to know how/where this command gets stored - so that I could
just edit it out of that file. I know about killfiles and where they are
stored and frequently end up editing them by hand, so no problem doing that
if needed. But, here's the thing:

1) Everything in the man page ("man trn"), says that "memorized"
commands are stored in the killfile (either the so-called "global"
killfile or the group-specific killfile). But this doesn't seem to
be the case, because...

2) There was nothing in either killfile that had to do with
the memorization of this thread. I can tell this by the access
date/time on the killfile file and/or by comparing the file (via
the "diff" utility) to a previous version of it. I can state with
pretty close to total certainty, that there's nothing in either
file having to do with this memorization stuff.

So, it must be stored somewhere else. Where?

P.S. I suspect that something got changed in the software and the docs
(the man page) was not updated. So, they are out of sync.
--
The only thing Trump's made great again is Saturday Night Live.
Adam H. Kerman
2021-05-23 21:57:31 UTC
Permalink
Post by Kenny McCormack
I had an accident with keystrokes (think: cat walked on keyboard) while I
was reading news with trn (version 4). Somehow, a certain thread got
marked as "memorized", so that whenever I join that particular group, it
gets "selected". I, of course, want to undo this operation.
tl;dr: I eventually figured out that hitting T then c on that thread would
"de-memorize" it, so problem is solved. However, ...
I would like to know how/where this command gets stored - so that I could
just edit it out of that file.
In a specific newsgroup, ^k will bring up the kill file for editing.

Mine are in ~/News/Kill. I don't remember if that's default or I set
that somewhere.
Kenny McCormack
2021-05-23 22:09:37 UTC
Permalink
Post by Adam H. Kerman
Post by Kenny McCormack
I had an accident with keystrokes (think: cat walked on keyboard) while I
was reading news with trn (version 4). Somehow, a certain thread got
marked as "memorized", so that whenever I join that particular group, it
gets "selected". I, of course, want to undo this operation.
tl;dr: I eventually figured out that hitting T then c on that thread would
"de-memorize" it, so problem is solved. However, ...
I would like to know how/where this command gets stored - so that I could
just edit it out of that file.
In a specific newsgroup, ^k will bring up the kill file for editing.
Mine are in ~/News/Kill. I don't remember if that's default or I set
that somewhere.
Thanks, but I have already painstakingly established that they are not there.

They are somewhere else.
--
Faith doesn't give you the answers; it just stops you from asking the questions.
Adam H. Kerman
2021-05-24 01:14:20 UTC
Permalink
Post by Kenny McCormack
Post by Adam H. Kerman
Post by Kenny McCormack
I had an accident with keystrokes (think: cat walked on keyboard) while I
was reading news with trn (version 4). Somehow, a certain thread got
marked as "memorized", so that whenever I join that particular group, it
gets "selected". I, of course, want to undo this operation.
tl;dr: I eventually figured out that hitting T then c on that thread would
"de-memorize" it, so problem is solved. However, ...
I would like to know how/where this command gets stored - so that I could
just edit it out of that file.
In a specific newsgroup, ^k will bring up the kill file for editing.
Mine are in ~/News/Kill. I don't remember if that's default or I set
that somewhere.
Thanks, but I have already painstakingly established that they are not there.
They are somewhere else.
Look through your environment variables, then.

Wayne used to read this newsgroup. Maybe he'll poke his nose in.
Joanna Shuttleworth
2021-05-24 07:46:11 UTC
Permalink
Post by Kenny McCormack
I had an accident with keystrokes (think: cat walked on keyboard) while I
was reading news with trn (version 4). Somehow, a certain thread got
marked as "memorized", so that whenever I join that particular group, it
gets "selected". I, of course, want to undo this operation.
tl;dr: I eventually figured out that hitting T then c on that thread would
"de-memorize" it, so problem is solved. However, ...
I would like to know how/where this command gets stored - so that I could
just edit it out of that file. I know about killfiles and where they are
stored and frequently end up editing them by hand, so no problem doing that
1) Everything in the man page ("man trn"), says that "memorized"
commands are stored in the killfile (either the so-called "global"
killfile or the group-specific killfile). But this doesn't seem to
be the case, because...
2) There was nothing in either killfile that had to do with
the memorization of this thread. I can tell this by the access
date/time on the killfile file and/or by comparing the file (via
the "diff" utility) to a previous version of it. I can state with
pretty close to total certainty, that there's nothing in either
file having to do with this memorization stuff.
So, it must be stored somewhere else. Where?
P.S. I suspect that something got changed in the software and the docs
(the man page) was not updated. So, they are out of sync.
use the source, Luke
Lewis
2021-05-24 10:21:31 UTC
Permalink
Post by Joanna Shuttleworth
Post by Kenny McCormack
I had an accident with keystrokes (think: cat walked on keyboard) while I
was reading news with trn (version 4). Somehow, a certain thread got
marked as "memorized", so that whenever I join that particular group, it
gets "selected". I, of course, want to undo this operation.
tl;dr: I eventually figured out that hitting T then c on that thread would
"de-memorize" it, so problem is solved. However, ...
I would like to know how/where this command gets stored - so that I could
just edit it out of that file. I know about killfiles and where they are
stored and frequently end up editing them by hand, so no problem doing that
1) Everything in the man page ("man trn"), says that "memorized"
commands are stored in the killfile (either the so-called "global"
killfile or the group-specific killfile). But this doesn't seem to
be the case, because...
2) There was nothing in either killfile that had to do with
the memorization of this thread. I can tell this by the access
date/time on the killfile file and/or by comparing the file (via
the "diff" utility) to a previous version of it. I can state with
pretty close to total certainty, that there's nothing in either
file having to do with this memorization stuff.
So, it must be stored somewhere else. Where?
P.S. I suspect that something got changed in the software and the docs
(the man page) was not updated. So, they are out of sync.
use the source, Luke
Or, probably simpler, pick a random thread with a distinctive rod in the
subject in a group you do not normally subscribe to. grep your trn files
for that group name, mark the thread as memorized, then grep again.

Chances are very good you will see a file has changed.

Also, searching "trn memorize:" brings up some threads for a group hosted
on <spit> sourceforge that might be helpful?
--
'Now what?' it said. IT'S UP TO YOU. IT'S ALWAYS UP TO YOU.
--Maskerade
Eli the Bearded
2021-05-24 18:30:05 UTC
Permalink
Post by Kenny McCormack
2) There was nothing in either killfile that had to do with
the memorization of this thread. I can tell this by the access
date/time on the killfile file and/or by comparing the file (via
the "diff" utility) to a previous version of it. I can state with
pretty close to total certainty, that there's nothing in either
file having to do with this memorization stuff.
I think there are three places it could be. Global killfile I do not
think is ever added to by trn, you have to edit it manually.
(Corrections welcome.) Group killfiles can be added by commands in the
newreader, and edited by typing <ctrl-k> at article selection level. I
use this, and I think this is likely the most commonly used filtering
in trn. Where those live is configurably, but it defaults to (eg)
~/News/news/software/readers/KILL . It is not easy to do _accidentally_
add rules there.

Third case, and easiest to accidentally trigger, is the scoring rules,
backported from some some trn fork, and not well documented. The default
location for those is ~/.trn/savedscores .

[ Examing code, I see there is another filtering/scoring system in trn,
but that one is even less likely to be accidentally triggered, as you
have to first configure a filter script. Those ones apparently get
saved as (eg) ~/News/Filters/News.software.readers ]

I don't really know the format of the savedscores files, I have some 200
lines in mine. It _appears_ to take a format like:

!group.name
:articleno
.rules

Where the .rules line may or may not exist. I think after the article
with the number expires, the rules become moot. If your news server
doesn't expire articles, probably removing the triplet of lines would
work, or just dropping the dot line with the rules.

Or you, know, just delete the whole savedscores file.

Elijah
------
mostly has rulesets without dot lines
Steven M. O'Neill
2021-05-28 19:25:59 UTC
Permalink
Post by Eli the Bearded
Or you, know, just delete the whole savedscores file.
Or rename it with a "funny" name so trn can't find it.

-smo (trn4 user who makes these files by finger-fumble fairly frequently)
--
Steven O'Neill ***@panix.com
Brooklyn, NY http://www.panix.com/~steveo
Eli the Bearded
2021-05-28 20:11:58 UTC
Permalink
Post by Steven M. O'Neill
Post by Eli the Bearded
Or you, know, just delete the whole savedscores file.
Or rename it with a "funny" name so trn can't find it.
Perhaps you could future proof that with:

ed ~/.trn/trnrc <<_EDIT
/^\[environment\]
a
SAVESCOREFILE=/dev/null
.
w
q
_EDIT

Elijah
------
/dev/null is funny, right?
Steven M. O'Neill
2021-05-28 20:36:41 UTC
Permalink
Post by Eli the Bearded
Post by Steven M. O'Neill
Post by Eli the Bearded
Or you, know, just delete the whole savedscores file.
Or rename it with a "funny" name so trn can't find it.
ed ~/.trn/trnrc <<_EDIT
/^\[environment\]
a
SAVESCOREFILE=/dev/null
.
w
q
_EDIT
I don't know; rc files are so much work.
Post by Eli the Bearded
Elijah
------
/dev/null is funny, right?
Also that; panix would have to hire someone to mop all the bits
off the floor.
--
Steven O'Neill ***@panix.com
Brooklyn, NY http://www.panix.com/~steveo
Loading...