[Date Prev][Date Next][Thread Prev][][Date Index][Thread Index]

Remove relationship rule for freshmeat website [PATCH]



In browsing the code, I came across the 'relationship' feature, which
took me a while to understand, so I improved the DOCSTRING.

While I was there, I noticed that one of the rules was for the dis-continued
website "freshmeat.net", so I removed the rule in the patch. Do note,
however, that an archive copy of the "freshmeat.net" website does exist on
sourceforge and possibly elsewhere, so there is a judgment call to be
made about removing the rule.

For your consideration,

-- 
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0
Index: ChangeLog
===================================================================
RCS file: /storage/cvsroot/emacs-w3m/ChangeLog,v
retrieving revision 1.3653
diff -u -r1.3653 ChangeLog
--- ChangeLog	18 Feb 2018 23:38:57 -0000	1.3653
+++ ChangeLog	20 Feb 2018 09:51:59 -0000
@@ -1,3 +1,8 @@
+2018-02-20  Boruch Baum  <boruch_baum@xxxxxxx>
+
+	* w3m.el (w3m-relationship-estimate-rules): Remove rule for
+	discontinued freshmeat.net website. Improve docstring.
+
 2018-02-18  Boruch Baum  <boruch_baum@xxxxxxx>
 
 	* w3m-session.el (w3m-session-select-quit): Remove cruft:
Index: w3m.el
===================================================================
RCS file: /storage/cvsroot/emacs-w3m/w3m.el,v
retrieving revision 1.1702
diff -u -r1.1702 w3m.el
--- w3m.el	18 Feb 2018 23:10:22 -0000	1.1702
+++ w3m.el	20 Feb 2018 09:52:00 -0000
@@ -2033,16 +2033,37 @@
      ,(concat "<a href=" w3m-html-string-regexp ">$B<!$N%Z!<%8(B</a>")
      ,(concat "<a href=" w3m-html-string-regexp ">$BA0$N%Z!<%8(B</a>")
      nil nil)
-    (w3m-relationship-simple-estimate
-     "\\`http://freshmeat\\.net/\\(search\\|browse\\)/"
-     ,(concat "<A HREF=" w3m-html-string-regexp ">\\[&raquo;\\]</A>")
-     ,(concat "<A HREF=" w3m-html-string-regexp ">\\[&laquo;\\]</A>")
-     nil nil)
     (w3m-relationship-oddmuse-estimate)
     (w3m-relationship-magicpoint-estimate)
     (w3m-relationship-slashdot-estimate)
     (w3m-relationship-alc-estimate))
-  "*Rules to estimate relationships between a retrieved page and others."
+  "*Rules to estimate relationships between a retrieved page and others.
+
+This variable supports the emacs-w3m ability to navigate
+structured websites, using shortcut keys, to a current page's
+parent page (`w3m-view-parent-page'), or next / previous
+pages (`w3m-scroll-up-or-next-url', `w3m-scroll-down-or-previous-url').
+
+The variable is a list of RULES. Each RULE is sequence in the
+form FUNCTION URL NEXT PREV START CONTENTS.
+
+FUNCTION is the method to to be used to evaluate the other
+fields. A FUNCTION should set variables `w3m-start-url',
+`w3m-next-url', `w3m-previous-url', `w3m-contents-url'. Emacs-w3m
+provides functions `w3m-relationship-simple-estimate',
+`w3m-relationship-magicpoint-estimate',
+`w3m-relationship-oddmuse-estimate',
+`w3m-relationship-slashdot-estimate',
+`w3m-relationship-alc-estimate', but of course you can add your
+own.
+
+URL is a regex defining the urls for which to use this rule.
+
+NEXT, PREV, START and CONTENTS are regexs of html source code
+from which to extract the values of variables `w3m-next-url',
+`w3m-previous-url', `w3m-start-url', `w3m-contents-url'
+respectively. The url to store should be defined as a regex
+collection group."
   :group 'w3m
   :type '(repeat
 	  (choice