🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nn
Article #410

patch to kill old followups and make auto auto-selection

#410
From: Keld J|rn Simonsen
Date: Tue, 22 Dec 1992 22:06
434 lines
14570 bytes
         UNOFFICIAL PATCH NUMBER 19
             PRIORITY: LOW
         --------------------------

This is a patch that does not remedy old errors, but introduces
new features.

The features introduced include a possibility to not see the
subject lines of subjects, that you have earlier chosen not
to read, plus the ability to automatically auto-select the subject
of all articles you read or post. The features are activated by
setting in $HOME/.nn/init the following variables:

	set ignore-re
        set auto-select-rw

Enjoy!

Keld Simonsen

---------------------
diff -i -c pl18/ChangeLog pl19/ChangeLog
*** pl18/ChangeLog	Tue Sep 15 10:48:46 1992
--- pl19/ChangeLog	Tue Dec 22 22:02:26 1992
***************
*** 24,26 ****
--- 24,52 ----
  
  	- unable to de-select an auto-selected subject when using
  	  consolidated-menu mode.
+ 
+ Unofficial Patch #19    (Keld.Simonsen@dkuug.dk; December 1992)
+ 
+ It has been an old desire (viz. the FAQ) to be able to skip followups
+ to subjects, one did not care to read. The following
+ two variables implement a way to omit these followups, plus a way
+ to auto-select the articles that you are most likely to
+ be interested in, namely followups to articles that you have
+ already read, or followups to articles you have posted yourself.
+ 
+ The killing of uninteresting followups is done without entries
+ in the kill file. The thread is killed if the root article of the
+ thread is a followup itself, and the subject is not selected.
+ 
+ The default of this patch to nn is no changed behaviour.
+ 
+ Two new variables are introduced, can be set in the .nn/init file:
+ 
+ ignore-re  (boolean, default false)
+ If set, articles with subjects already seen in a previous
+ invocation of nn or another newsreader - and not auto-selected -
+ are automatically killed.
+ 
+ auto-select-rw (boolean, default false)
+ If set, a subject of an article read or posted is automatically 
+ used for subsequent auto-selecting (if not already selected).
diff -i -c pl18/answer.c pl19/answer.c
*** pl18/answer.c	Tue Apr 23 11:02:37 1991
--- pl19/answer.c	Tue Dec 22 19:28:05 1992
***************
*** 60,65 ****
--- 60,66 ----
  export char included_mark[INCL_MARK_SIZE + 1] = ">";
  
  import char delayed_msg[];
+ import int auto_select_rw;
  
  static int ed_line;
  
***************
*** 922,927 ****
--- 923,929 ----
      char brk_chars[4];
      extern key_type help_key;
      char *str, *tail;
+     group_header gh;
      char group_name[FILENAME], subject[FILENAME],
  	 distribution[FILENAME], keywords[FILENAME], summary[FILENAME];
      extern group_completion();
***************
*** 1054,1059 ****
--- 1056,1069 ----
  	fputc(NL, t);
  
      fclose(t);
+ 
+     if (auto_select_rw) {
+         tail = strchr(group_name, ',');
+         if (tail) *tail = NUL;
+         gh.group_name = group_name;
+         enter_kill_file(&gh,subject,6,60);
+         if (tail) *tail = ',';
+     }
  
      aux_sh((article_header *)NULL, news_script, "post",
  	   post_no_edit ? "send" : "edit", news_record,
diff -i -c pl18/articles.c pl19/articles.c
*** pl18/articles.c	Tue Apr 23 11:02:37 1991
--- pl19/articles.c	Tue Dec 22 21:32:56 1992
***************
*** 11,17 ****
--- 11,19 ----
  
  export int  seq_cross_filtering = 1;
  export int  select_leave_next = 0; 	/* ask to select left over art. */
+ export int  ignore_re = 0;
  
+ import int killed_articles;
  
  /*
   * memory management
***************
*** 470,475 ****
--- 472,489 ----
  	sort_articles(-1);
      else
  	no_sort_articles();
+ 
+     if (ignore_re) {
+ 	int nexta, roota, killa, newa;
+         for (nexta = killa = newa = 0; nexta < n_articles; nexta++) {
+             ah = articles[nexta];
+             if (ah->flag & A_ROOT_ART) roota = ah->replies & 127 ;
+             if (roota && ah->replies && !auto_select_article(ah,1)) killa++;
+             else articles[newa++] = ah;
+         }
+         n_articles -= killa;  
+         killed_articles += killa;
+     }
  
      return n_articles > 0 ? 1 : 0;
  
diff -i -c pl18/menu.c pl19/menu.c
*** pl18/menu.c	Tue Sep 15 10:48:47 1992
--- pl19/menu.c	Tue Dec 22 22:15:42 1992
***************
*** 33,38 ****
--- 33,39 ----
  
  export int  consolidated_menu = 0; /* show only root articles */
  export int  save_closed_mode = 13; /* ask how to save closed subj, dflt all */
+ export int  auto_select_rw = 0; /* select subject read or written */
  export int  auto_select_closed = 1; /* select all in closed subject */
  export int  menu_spacing = 0;	    /* number of screen lines per menu line */
  export char *counter_delim_left  = "[";
***************
*** 563,568 ****
--- 564,572 ----
  	    ah = articles[cur];
  	    o_attr = ah->attr;
  	    ah->attr = 0;
+ 
+             if (auto_select_rw && !auto_select_article(ah,1))
+ 		enter_kill_file(current_group,ah->subject,6,30);
  
  	    if (new_read_prompt)
  		count_selected_articles();
diff -i -c pl18/patchlevel.h pl19/patchlevel.h
*** pl18/patchlevel.h	Tue Sep 15 10:48:46 1992
--- pl19/patchlevel.h	Tue Dec 22 22:12:48 1992
***************
*** 28,38 ****
   *	1991-04-02: Patch #15 (6.4.15) - LOW
   *	1991-04-18: Patch #16 (6.4.16) - HIGH
   *
!  *	(Kim lost interest/dissapeared)
   *
   *	1991-11-19: Patch #17 (6.4.17) - MEDIUM
   *	1991-12-01: Patch #18 (6.4.18) - MEDIUM
   */
  
! #define PATCHLEVEL 18
! 
--- 28,38 ----
   *	1991-04-02: Patch #15 (6.4.15) - LOW
   *	1991-04-18: Patch #16 (6.4.16) - HIGH
   *
!  *	(Kim got other things to do)
   *
   *	1991-11-19: Patch #17 (6.4.17) - MEDIUM
   *	1991-12-01: Patch #18 (6.4.18) - MEDIUM
+  *	1992-12-22: Patch #19 (6.4.19) - LOW
   */
  
! #define PATCHLEVEL 19
diff -i -c pl18/variable.c pl19/variable.c
*** pl18/variable.c	Tue Apr 23 11:02:45 1991
--- pl19/variable.c	Fri Dec 18 21:19:22 1992
***************
*** 112,117 ****
--- 112,118 ----
      append_sig_mail,
      append_sig_post,
      auto_junk_seen,
+     auto_select_rw,
      auto_select_subject,
      auto_preview_mode,
      case_fold_search,
***************
*** 145,150 ****
--- 146,152 ----
      folder_rewrite_trace,
      guard_double_slash,
      ignore_xon_xoff,
+     ignore_re,
      include_art_id,
      include_full_header,
      include_mark_blanks,
***************
*** 304,309 ****
--- 306,312 ----
      "auto-preview-mode",	BOOL 0,		(char **)&auto_preview_mode,
      "auto-read-mode-limit",	INT 0,		(char **)&auto_read_limit,
      "auto-select-closed",	INT 0,		(char **)&auto_select_closed,
+     "auto-select-rw",		BOOL 0,		(char **)&auto_select_rw,
      "auto-select-subject",	BOOL 0,		(char **)&auto_select_subject,
      "backup",			BOOL 0,		(char **)&keep_rc_backup,
      "backup-folder-path",	STR 4,		(char **)&backup_folder_path,
***************
*** 363,368 ****
--- 366,372 ----
      "guard-double-slash",	BOOL 0,		(char **)&guard_double_slash,
      "header-lines",		STR 0,		(char **)&header_lines,
      "help-key",			KEY 0,		(char **)&help_key,
+     "ignore-re",		BOOL 0,		(char **)&ignore_re,
      "ignore-xon-xoff",		BOOL 0,		(char **)&ignore_xon_xoff,
      "include-art-id",		BOOL 0,		(char **)&include_art_id,
      "include-full-header",	BOOL 0,		(char **)&include_full_header,
*** pl18/ChangeLog	Tue Sep 15 10:48:46 1992
--- pl19/ChangeLog	Tue Dec 22 22:02:26 1992
***************
*** 24,26 ****
--- 24,52 ----
  
  	- unable to de-select an auto-selected subject when using
  	  consolidated-menu mode.
+ 
+ Unofficial Patch #19    (Keld.Simonsen@dkuug.dk; December 1992)
+ 
+ It has been an old desire (viz. the FAQ) to be able to skip followups
+ to subjects, one did not care to read. The following
+ two variables implement a way to omit these followups, plus a way
+ to auto-select the articles that you are most likely to
+ be interested in, namely followups to articles that you have
+ already read, or followups to articles you have posted yourself.
+ 
+ The killing of uninteresting followups is done without entries
+ in the kill file. The thread is killed if the root article of the
+ thread is a followup itself, and the subject is not selected.
+ 
+ The default of this patch to nn is no changed behaviour.
+ 
+ Two new variables are introduced, can be set in the .nn/init file:
+ 
+ ignore-re  (boolean, default false)
+ If set, articles with subjects already seen in a previous
+ invocation of nn or another newsreader - and not auto-selected -
+ are automatically killed.
+ 
+ auto-select-rw (boolean, default false)
+ If set, a subject of an article read or posted is automatically 
+ used for subsequent auto-selecting (if not already selected).
diff -i -c pl18/answer.c pl19/answer.c
*** pl18/answer.c	Tue Apr 23 11:02:37 1991
--- pl19/answer.c	Tue Dec 22 19:28:05 1992
***************
*** 60,65 ****
--- 60,66 ----
  export char included_mark[INCL_MARK_SIZE + 1] = ">";
  
  import char delayed_msg[];
+ import int auto_select_rw;
  
  static int ed_line;
  
***************
*** 922,927 ****
--- 923,929 ----
      char brk_chars[4];
      extern key_type help_key;
      char *str, *tail;
+     group_header gh;
      char group_name[FILENAME], subject[FILENAME],
  	 distribution[FILENAME], keywords[FILENAME], summary[FILENAME];
      extern group_completion();
***************
*** 1054,1059 ****
--- 1056,1069 ----
  	fputc(NL, t);
  
      fclose(t);
+ 
+     if (auto_select_rw) {
+         tail = strchr(group_name, ',');
+         if (tail) *tail = NUL;
+         gh.group_name = group_name;
+         enter_kill_file(&gh,subject,6,60);
+         if (tail) *tail = ',';
+     }
  
      aux_sh((article_header *)NULL, news_script, "post",
  	   post_no_edit ? "send" : "edit", news_record,
diff -i -c pl18/articles.c pl19/articles.c
*** pl18/articles.c	Tue Apr 23 11:02:37 1991
--- pl19/articles.c	Tue Dec 22 21:32:56 1992
***************
*** 11,17 ****
--- 11,19 ----
  
  export int  seq_cross_filtering = 1;
  export int  select_leave_next = 0; 	/* ask to select left over art. */
+ export int  ignore_re = 0;
  
+ import int killed_articles;
  
  /*
   * memory management
***************
*** 470,475 ****
--- 472,489 ----
  	sort_articles(-1);
      else
  	no_sort_articles();
+ 
+     if (ignore_re) {
+ 	int nexta, roota, killa, newa;
+         for (nexta = killa = newa = 0; nexta < n_articles; nexta++) {
+             ah = articles[nexta];
+             if (ah->flag & A_ROOT_ART) roota = ah->replies & 127 ;
+             if (roota && ah->replies && !auto_select_article(ah,1)) killa++;
+             else articles[newa++] = ah;
+         }
+         n_articles -= killa;  
+         killed_articles += killa;
+     }
  
      return n_articles > 0 ? 1 : 0;
  
diff -i -c pl18/menu.c pl19/menu.c
*** pl18/menu.c	Tue Sep 15 10:48:47 1992
--- pl19/menu.c	Tue Dec 22 22:15:42 1992
***************
*** 33,38 ****
--- 33,39 ----
  
  export int  consolidated_menu = 0; /* show only root articles */
  export int  save_closed_mode = 13; /* ask how to save closed subj, dflt all */
+ export int  auto_select_rw = 0; /* select subject read or written */
  export int  auto_select_closed = 1; /* select all in closed subject */
  export int  menu_spacing = 0;	    /* number of screen lines per menu line */
  export char *counter_delim_left  = "[";
***************
*** 563,568 ****
--- 564,572 ----
  	    ah = articles[cur];
  	    o_attr = ah->attr;
  	    ah->attr = 0;
+ 
+             if (auto_select_rw && !auto_select_article(ah,1))
+ 		enter_kill_file(current_group,ah->subject,6,30);
  
  	    if (new_read_prompt)
  		count_selected_articles();
diff -i -c pl18/patchlevel.h pl19/patchlevel.h
*** pl18/patchlevel.h	Tue Sep 15 10:48:46 1992
--- pl19/patchlevel.h	Tue Dec 22 22:12:48 1992
***************
*** 28,38 ****
   *	1991-04-02: Patch #15 (6.4.15) - LOW
   *	1991-04-18: Patch #16 (6.4.16) - HIGH
   *
!  *	(Kim lost interest/dissapeared)
   *
   *	1991-11-19: Patch #17 (6.4.17) - MEDIUM
   *	1991-12-01: Patch #18 (6.4.18) - MEDIUM
   */
  
! #define PATCHLEVEL 18
! 
--- 28,38 ----
   *	1991-04-02: Patch #15 (6.4.15) - LOW
   *	1991-04-18: Patch #16 (6.4.16) - HIGH
   *
!  *	(Kim got other things to do)
   *
   *	1991-11-19: Patch #17 (6.4.17) - MEDIUM
   *	1991-12-01: Patch #18 (6.4.18) - MEDIUM
+  *	1992-12-22: Patch #19 (6.4.19) - LOW
   */
  
! #define PATCHLEVEL 19
diff -i -c pl18/variable.c pl19/variable.c
*** pl18/variable.c	Tue Apr 23 11:02:45 1991
--- pl19/variable.c	Fri Dec 18 21:19:22 1992
***************
*** 112,117 ****
--- 112,118 ----
      append_sig_mail,
      append_sig_post,
      auto_junk_seen,
+     auto_select_rw,
      auto_select_subject,
      auto_preview_mode,
      case_fold_search,
***************
*** 145,150 ****
--- 146,152 ----
      folder_rewrite_trace,
      guard_double_slash,
      ignore_xon_xoff,
+     ignore_re,
      include_art_id,
      include_full_header,
      include_mark_blanks,
***************
*** 304,309 ****
--- 306,312 ----
      "auto-preview-mode",	BOOL 0,		(char **)&auto_preview_mode,
      "auto-read-mode-limit",	INT 0,		(char **)&auto_read_limit,
      "auto-select-closed",	INT 0,		(char **)&auto_select_closed,
+     "auto-select-rw",		BOOL 0,		(char **)&auto_select_rw,
      "auto-select-subject",	BOOL 0,		(char **)&auto_select_subject,
      "backup",			BOOL 0,		(char **)&keep_rc_backup,
      "backup-folder-path",	STR 4,		(char **)&backup_folder_path,
***************
*** 363,368 ****
--- 366,372 ----
      "guard-double-slash",	BOOL 0,		(char **)&guard_double_slash,
      "header-lines",		STR 0,		(char **)&header_lines,
      "help-key",			KEY 0,		(char **)&help_key,
+     "ignore-re",		BOOL 0,		(char **)&ignore_re,
      "ignore-xon-xoff",		BOOL 0,		(char **)&ignore_xon_xoff,
      "include-art-id",		BOOL 0,		(char **)&include_art_id,
      "include-full-header",	BOOL 0,		(char **)&include_full_header,
Technical Details
Message-ID: <keld.725062004@login.dkuug.dk>
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!dkuug!login.dkuug.dk!keld

Show Full Headers
Complete Article Headers
Newsgroups: news.software.nn
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!dkuug!login.dkuug.dk!keld
From: keld@login.dkuug.dk (Keld J|rn Simonsen)
Subject: patch to kill old followups and make auto auto-selection
Message-ID: <keld.725062004@login.dkuug.dk>
Sender: news@dkuug.dk
Nntp-Posting-Host: login.dkuug.dk
Organization: DKnet
Date: Tue, 22 Dec 1992 22:06:44 GMT
Lines: 434