jonathan@unix.cis.pitt.edu (Jonathan Eunice) (02/07/90)
I would find it enormously valuable to be able to issue an m-nk command in rn. While rn will let me do an m-nj, it does not accept k after a range. Would someone familiar with rn internals suggest what I would have to change in the rn source to fix this? References to specific source files and lines particularly appreciated.
levin@bbn.com (Joel B Levin) (02/07/90)
In article <22162@unix.cis.pitt.edu> jonathan@unix.cis.pittsburgh.edu (Jonathan Eunice) writes: |I would find it enormously valuable to be able to issue an m-nk command |in rn. While rn will let me do an m-nj, it does not accept k after a |range. . . . I don't understand what m-nk would be expected to do. k doesn't take an article argument, it takes a (possibly implicit) regular expression (search) argument. j takes (possibly implicit) article number arguments, so m-nj makes sense. I can't make sense out of m-nk. /JBL = Nets: levin@bbn.com | "There were sweetheart roses on Yancey Wilmerding's or {...}!bbn!levin | bureau that morning. Wide-eyed and distraught, she POTS: (617)873-3463 | stood with all her faculties rooted to the floor."
jonathan@unix.cis.pitt.edu (Jonathan Eunice) (02/08/90)
Joel B. Levin (levin@BBN.COM) writes: | [ Jonathan Eunice writes: ] | | I would find it enormously valuable to be able to issue an m-nk command | | in rn. While rn will let me do an m-nj, it does not accept k after a | | range. . . . | | I don't understand what m-nk would be expected to do. k doesn't take | an article argument, it takes a (possibly implicit) regular expression | (search) argument. j takes (possibly implicit) article number | arguments, so m-nj makes sense. I can't make sense out of m-nk. I think of k as applying to the current article, not to a regular expression. m-nk would then be: for (i = m; i <= n; i++) /* loop from m to n inclusive */ { i k /* junk all articles with the same subject as article i */ } This operation may not be semantically clean, but it would be enormously valuable at quickly removing the many articles that I do not want to read in high-volume newsgroups. It would let me see a listing of articles (with =), scan though those that I do not want to read, and kill many entire threads with one command. (A true thread-based reader would be a better solution, but I'm trying to make a small, practical step here.) I'm aware that a naive implementation of m-nk might try to kill a single subject several times -- once for each appearance in the range m-n. I'm fully prepared to pay the nominal machine overhead for this because I believe it will save me a lot of my own time. Jonathan Eunice jonathan@unix.cis.pitt.edu 412-682-1368
Linus@Lysator.liu.se (Linus Tolke) (02/13/90)
In article <22162@unix.cis.pitt.edu> in news.misc Jonathan Eunice writes: >I would find it enormously valuable to be able to issue an m-nk command >in rn. While rn will let me do an m-nj, it does not accept k after a >range. Would someone familiar with rn internals suggest what I would >have to change in the rn source to fix this? References to specific >source files and lines particularly appreciated. In article <22181@unix.cis.pitt.edu> in news.misc Jonathan Eunice continues: >I think of k as applying to the current article, not to a regular >expression. m-nk would then be: > > for (i = m; i <= n; i++) /* loop from m to n inclusive */ > { > i k /* junk all articles with the same > subject as article i */ > } >... >I'm aware that a naive implementation of m-nk might try to kill a >single subject several times -- once for each appearance in the range >m-n. I'm fully prepared to pay the nominal machine overhead for this >because I believe it will save me a lot of my own time. Why not write a macro to do this. Well after a few tries I understand you. The required syntax for this macro is a little bit backwards and I hope you really mean what you say in your last paragraph. Syntax for this macro is: kill900-910 <- ended with return Definition is: kill %`set \`(IFS=- read x y;echo $x $y)\`;n=$1;while test $n -le $2;do echo -n m${n}\^Mk;n=\`expr $n + 1\`;done` The ^M should be a return, change it when you do the definition. This works at om my machine. Sun UNIX 4.2 Release 3.5EXPORT and rn is the 4.3.2.2 This could cause unwanted things to happen if you are not in the right mode i.e. article selection level. The indata tests of the script are also very bad. kill900-862 should not do anything and kill900-, kill-900, kill900 causes the test to exit with error. -- /Linus Linus@Lysator.liu.se