J.B. Nicholson-Owens | 10 May 04:53 2014

Getting quote regular expressions from ignore_quotes via S-Lang?

How does one get the regular expression(s) used with ignore_quotes in an 
S-Lang slrn macro?

I can't use get_variable_value() because that function only works with 
slrn variables that are set with "set".

I'd like to read these strings for a macro I'm writing where I'd like to 
avoid giving the regular expressions more than once -- once with 
ignore_quotes and another time for the macro to use.

Thanks.

------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce

J.B. Nicholson-Owens | 17 Feb 02:52 2014

has_parent() oddity

has_parent() is a bit confusing to me. If one looks at the following two 
articles in news.software.readers with slrn v1.0.1:

<2424ed2d74d5139e22d17f1a40a5f1b0 <at> hoi-polloi.org>
<2424ed2d74d5139e22d17f1a40a5f1b0 <at> msgid.frell.theremailer.net>

they get threaded together. Neither article has a References: header.

Yet has_parent() returns 0 for the former article and has_parent() 
returns 1 for the latter article.

call("get_parent_header") on the latter article raises an exception -- 
"Article has no parent reference." -- which makes sense from the lack of 
a References: header but it remains unobvious why has_parent() ought to 
return 1 for 
<2424ed2d74d5139e22d17f1a40a5f1b0 <at> msgid.frell.theremailer.net> (I'm 
talking about the intention behind has_parent() not necessarily its 
current implementation).

It seems to me that if has_parent() returns non-zero, one ought to be 
able to identify the article that is that article's parent, even if that 
article is not present on the server.

I'm not sure if I'm seeing a bug in the has_parent() implementation, a 
bug in the has_parent() documentation (maybe more explanation about how 
has_parent() can return 1 even if the parent is due to slrn grouping 
articles into threads by sorting?), or if I'm misunderstanding something 
about proper use of has_parent().

------------------------------------------------------------------------------
(Continue reading)

J.B. Nicholson-Owens | 16 Feb 19:00 2014

Get thread info slrn has in article mode?

In article mode, slrn can show the user a thread tree: a clear 
indication of which article is an article's parent, and which articles 
are that article's children (if any). I'd like to get at this thread 
information in an S-Lang macro for slrn.

I'd like to get at this information without:

- adding articles to the thread that aren't already in the visible 
thread tree. I don't want to reconstruct the whole thread nor do I want 
to add any articles to the thread display I'm not already seeing.

- requesting anything from the news server 
(http://slrn.sourceforge.net/docs/slrn-manual-7.html#akey_get_parent_header 
says that get_parent_header will download data from the server if 
necessary).

- rebuilding thread information by reading References: header data 
because slrn has apparently already done that plus constructed threads 
from articles where References: header data is missing. We see the fruit 
of this work when slrn shows the user the thread tree.

Is there S-Lang API for slrn to let an S-Lang macro read this thread 
data? It would be okay if this were read-only data for the macro.

I need this information to show the relationships between articles in 
the same thread in a different way than slrn currently does this and I'd 
like to avoid rewriting code that already does this job.

Thanks.

(Continue reading)

Martin Trautmann | 23 Oct 10:41 2013
Picon
Picon

false configuration for utf8

Hi all,

is there some kind of mixed setup option for charset definitions?

My setup does create proper

Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

However, I sometimes observe error messages from slrn, telling me:

Can't convert utf8 -> UTF-8

Example:
Mime-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit
Message-ID: <slrnl6ecqe.ecm.als <at> mordor.angband.thangorodrim.de>

The message itself is shown properly.

Personally, I have within my .slrnrc a line
	charset config "utf-8"

and

#if$LANG en_US.UTF-8
% fallback_charset patch from http://www.foory.de/thw/slrn/
set fallback_charset iso-8859-15
(Continue reading)

Preston Boyington | 15 Oct 18:43 2013
Picon

slrn directory trouble

Due to space issues I'm trying to get slrn to use a different drive for the "News" folder.

In my .slrnrc file I have the following:

set "/media/94bfab3d-134c-554a-a863-f7babe6644aa/slrn/News"

When I run slrn I get an error on the lines with that path.

Could someone please enlighten me on how my pathing should be?

Here's my slrn info:

$ slrn --version
slrn pre1.0.0-18
        * Note: This version is a developer preview.
S-Lang Library Version: 2.2.2
Compiled at: Aug  7 2010 11:37:49
Operating System: Linux

COMPILE TIME OPTIONS:
 Backends: +nntp +slrnpull +spool
 External programs / libs: +canlock +inews +ssl +uudeview +iconv
 Features: +decoding +emphasized_text +end_of_thread +fake_refs +gen_msgid
    -grouplens -msgid_cache +piping +rnlock +spoilers -strict_from
 Using 64 bit integers for article numbers.

DEFAULTS:
 Default server object:     nntp
 Default posting mechanism: nntp

Thanks all,
Preston
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
Seebs | 20 Sep 03:28 2013
Picon

Rough draft patch: slrnpull configuration to immediately retry posts.

So, I have noticed a strange transient failure with one particular 
Usenet server, which is that after authentication, there is sometimes 
but not always a window during which any post submitted to it will be 
rejected with "441 436 <message-id>" and no other explanation.

Browsing around, I've found one claim that a server exists which does 
this for duplicate posts. In this case, though, it's definitely not 
duplicates, it's brand-new posts with suitably-unique message IDs. It 
may also occasionally show up for other reasons.

Solution: Retry failed posts. So I've produced a patch which will retry 
posts if configured to do so through a line in slrnpull.conf reading 
"nntp-retries 3 10". (3 being the number of retries, 10 being the number 
of seconds to delay before retrying).

This is probably inadequately tested, but it solved my immediate 
problem, so I figured I'd send it out for evaluation, in case it was 
useful to someone else.

-s
commit a55e2fc12301e0694452af46e11f52d590b4ccff
Author: Seebs <seebs <at> seebs.net>
Date:   Thu Sep 19 20:18:44 2013 -0500

    Allow retrying NNTP submissions

    One usenet server I occasionally interact with has the very
    curious trait that an article submission too early in a session
    will almost always result in a "441 436" response. Simply
    retrying once or twice will usually get a successful post.

    This patch adds an optional "nntp-retries" configuration
    hook for slrnpull.conf, which allows the user to request that
    NNTP submissions be retried a couple of times before giving
    up.

    Signed-off-by: Seebs <seebs <at> seebs.net>

diff --git a/src/slrnpull.c b/src/slrnpull.c
index fb40a9a..f2669b8 100644
--- a/src/slrnpull.c
+++ b/src/slrnpull.c
 <at>  <at>  -142,6 +142,7  <at>  <at>  static int Use_Fetch_Score;
 static int Kill_Score;
 static char *Active_Groups_File;
 static time_t Start_Time;
+static int nntp_retries = 0, nntp_retry_interval = 0;

 #define CREATE_OVERVIEW 1

 <at>  <at>  -736,6 +737,14  <at>  <at>  static int read_active_groups (void) /*{{{*/
 	     continue;
 	  }

+        if (0 == strcmp (name, "nntp-retries"))
+	  {
+	     /* repurpose the first two fields */
+	     nntp_retries = max_to_get;
+	     nntp_retry_interval = expire_days;
+	     continue;
+	  }
+
 	if (NULL != find_group_type (name))
 	  {
 	     log_error (_("%s: line %u: group duplicated."),
 <at>  <at>  -1795,21 +1804,12  <at>  <at>  static int pull_news (NNTP_Type *s, int marked_bodies) /*{{{*/

 /*}}}*/

-static int post_file (NNTP_Type *s, char *file) /*{{{*/
+/* a single attempt to post an already-open file over NNTP */
+static int post_file_nntp (NNTP_Type *s, char *file, FILE *fp) /*{{{*/
 {
-   FILE *fp;
    int status;
    char buf[8 * 1024];

-   log_message (_("Attempting to post %s..."), file);
-
-   fp = fopen (file, "r");
-   if (fp == NULL)
-     {
-	log_error (_("Unable to open file %s for posting."), file);
-	return -1;
-     }
-
    status = nntp_post_cmd (s);
    if (status != CONT_POST)
      {
 <at>  <at>  -1840,9 +1840,6  <at>  <at>  static int post_file (NNTP_Type *s, char *file) /*{{{*/
 	     return -1;
 	  }
      }
-
-   fclose (fp);
-
    status = nntp_end_post (s);
    if (status == -1)
      {
 <at>  <at>  -1852,11 +1849,54  <at>  <at>  static int post_file (NNTP_Type *s, char *file) /*{{{*/

    if (status != OK_POSTED)
      {
+	log_error (_("Article %s rejected. status = %d: %s."), file, status, s->rspbuf);
+
+	return -1;
+     }
+
+   return 0;
+}
+/*}}}*/
+
+static int post_file (NNTP_Type *s, char *file) /*{{{*/
+{
+   FILE *fp;
+   int status;
+   int retries = 0;
+
+   log_message (_("Attempting to post %s..."), file);
+
+   fp = fopen (file, "r");
+   if (fp == NULL)
+     {
+	/* this doesn't get a retry */
+	log_error (_("Unable to open file %s for posting."), file);
+	return -1;
+     }
+   /* some news servers will return a 436 if you try to post too soon
+    * after a session has started.
+    */
+   status = post_file_nntp (s, file, fp);
+   while (retries <= nntp_retries && 0 != status)
+     {
+       ++retries;
+
+       /* rewind the file to try again */
+       fseek(fp, 0, SEEK_SET);
+       slrn_sleep(nntp_retry_interval);
+       status = post_file_nntp (s, file, fp);
+     }
+
+   fclose(fp);
+
+   /* if status is -1, the posting failed (possibly multiple times) and
+    * we should move it to the rejects directory, then give up.
+    */
+   if (-1 == status)
+     {
 	char *name;
 	char bad_file [SLRN_MAX_PATH_LEN + 1];

-	log_error (_("Article %s rejected. status = %d: %s."), file, status, s->rspbuf);
-
 	name = slrn_basename (file);
 	if (-1 == slrn_dircat (Outgoing_Bad_Dir, name,
 			       bad_file, sizeof (bad_file)))
------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
Uwe Premer | 1 Jun 23:05 2013
Picon

64-Bit Source Port?

I want to compile slrn to 64-bit-windows7-executable.
Is there any 64-Bit-Source port available?

Or alternatively any good guide to port the 32-bit source compatible for
64-bit-compilation?

Uwe

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2

Daniel | 11 Apr 09:09 2013
Picon

posting to gmane hangs indefinitely until abort & repost

I have some trouble posting to news.gmane.org using slrn. The actualy
posting often hangs and I have to abort and choose Repost at the prompt.
It is then processed quickly, without hanging.

I get the feeling that there is some network connection that has timed
out (while I was writing the article?), and which isn't properly renewed
until the repost (retry) is done. That's a wild guess.

I have never used slrn before, or with another news server. Version is
1.0.1.

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter

Peter J Ross | 27 Mar 01:24 2013
Picon

Translation problem?

Hello, old friends!

------------------------------------------

slrn pre1.0.2-8
	* Note: This version is a developer preview.
S-Lang Library Version: 2.2.4
Compiled on: Mar 27 2013 00:13:10
Operating System: Linux

COMPILE TIME OPTIONS:
  Backends: +nntp -slrnpull -spool
  External programs / libs: -canlock -inews -ssl -uudeview +iconv
  Features: +decoding +emphasized_text +end_of_thread +fake_refs +gen_msgid
     -grouplens -msgid_cache +piping +rnlock +spoilers -strict_from
  Using 64 bit integers for article numbers.

DEFAULTS:
  Default server object:     nntp

----------------------------------------

During "make install" the script seems to be looking for a translation 
that hasn't been created by "make".

make[3]: Entering directory `/home/pjr/slrn/po'
: --update be.po slrn.pot
rm -f be.gmo && : -c --statistics -o be.gmo be.po
mv: cannot stat `t-be.gmo': No such file or directory
make[3]: *** [be.gmo] Error 1
make[3]: Leaving directory `/home/pjr/slrn/po'
make[2]: *** [stamp-po] Error 2
make[2]: Leaving directory `/home/pjr/slrn/po'
make[1]: *** [installlocales] Error 2
make[1]: Leaving directory `/home/pjr/slrn/src'
make: *** [install] Error 2

-------------------------------------------------

The installation seems to be successful, despite the error messages, so 
it's not a huge problem.

ISTM that there's either a new translation that hasn't been completely 
added or an old translation that hasn't been completely removed.

--

-- 
PJR :-)

------------------------------------------------------------------------------
Own the Future-Intel&reg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d

n.radesh | 11 Mar 08:48 2013
Picon

downloading more headers from article mode

hi all,
i'm using "set query_read_group_cutoff -250" so that i don't have to
download a huge batch of headers all at once (which i probably do't
need) but sometimes i have unread articles that are beyond the 250
most recent articles. is it possible (maybe with a script) to download
even more aritcle headers from inside article mode?
thanks.

------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev

Morten Bo Johansen | 7 Mar 14:05 2013
Picon

Segmentation fault with mime.sl

Hi,

I get a segmentation fault when running slrn with the mime.sl
that is included in the slrn archive. This happens with both
1.0.1 and the latest git version. Below is the output from gdb.
Without interpreting mime.sl there is no problem.

  ~/ % gdb slrn                       
  GNU gdb (GDB) 7.4.1-debian
  Copyright (C) 2012 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
  and "show warranty" for details.
  This GDB was configured as "i486-linux-gnu".
  For bug reporting instructions, please see:
  <http://www.gnu.org/software/gdb/bugs/>...
  Reading symbols from /usr/local/bin/slrn...done.
  (gdb) run -n -h news.gmane.org
  Starting program: /usr/local/bin/slrn -n -h news.gmane.org
  slrn pre1.0.2-6

  Loading /usr/local/stow/slrn/share/slrn/slang/slrn.sl
  L├Žser opstartsfil /home/mojo/.slrnrc.
  Loading /usr/local/stow/slrn/share/slrn/slang/mime.sl
  Program received signal SIGSEGV, Segmentation fault.
  0xb7da2b0a in ?? () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
  (gdb) 

Morten

------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev

Gmane