Thread View: news.software.readers
6 messages
6 total messages
Started by SINNER
Tue, 08 Jul 2003 13:09
[slrn] Selecting a followup
Author: SINNER
Date: Tue, 08 Jul 2003 13:09
Date: Tue, 08 Jul 2003 13:09
21 lines
1906 bytes
1906 bytes
If the article is _not_ crossposted, is there anyway, macro or otherwise, to select a followup group without manually typing it in effecting a possible misspelling? For instance, I am in a completely unrelated group and someone posts a question about a newsreader :) so in order to expose the question to those qualified to respond, the article requires a crosspost and a followup. (I guess I snuck in the fact that it would be nice to be able to add to the Newsgroups header also ;) As an added bonus how about a way to add the little header that slrn adds when selecting a followup on a previously crossposted article. Hope that was clear enough. I know its a question prompted by laziness but hey, it's 2003 :P~ -- David Better dead than mellow.
Re: [slrn] Selecting a followup
Author: J.B. Nicholson-Owens
Date: Tue, 08 Jul 2003 18:11
Date: Tue, 08 Jul 2003 18:11
24 lines
2089 bytes
2089 bytes
SINNER wrote: > If the article is _not_ crossposted, is there anyway, macro or > otherwise, to select a followup group without manually typing it in > effecting a possible misspelling? I think one could do this with a macro, and it would be easiest if there were a read_mini()-like function for arbitrary strings. One could somehow obtain a list of all the newsgroups and put them into a variable then allow this read_mini()-like function to do tab expansion with data from the variable. The appropriate structure(s) of the variable is left as an excercise for the reader. But this would require prompting for the followup before or after the article was edited (preferably before). This would not work portably during article editing because articles (including the Followup-To: header) are edited in an editor which slrn does not control. In this respect, this aspect of the problem is just a rehash of the same old arguments of integration versus modularity. > As an added bonus how about a way to add the little header that slrn > adds when selecting a followup on a previously crossposted article. I don't know what header you're referring to here.
Re: [slrn] Selecting a followup
Author: SINNER
Date: Tue, 08 Jul 2003 18:18
Date: Tue, 08 Jul 2003 18:18
15 lines
1706 bytes
1706 bytes
While strolling through news.software.readers, J.B. Nicholson-Owens was overheard plotting: >> As an added bonus how about a way to add the little header that slrn >> adds when selecting a followup on a previously crossposted article. > > I don't know what header you're referring to here. > Not really a header. When you are prompted to select a followup to a crossposted article slrn puts a statement prior to the attribution stating that the followup has been set and to what group. -- David
Re: [slrn] Selecting a followup
Author: Thomas Schultz
Date: Sun, 27 Jul 2003 20:15
Date: Sun, 27 Jul 2003 20:15
123 lines
4378 bytes
4378 bytes
* SINNER [2003-07-08 13:09] :
> If the article is _not_ crossposted, is there anyway, macro or
> otherwise, to select a followup group without manually typing it in
> effecting a possible misspelling? [...]
A convenient way I could think of is a function in your editor that
allows tab completion of newsgroup names. I wrote a macro for the
editor jed that does just that (based on the newsgroups found in the
user's newsrc file).
Here's a first version of it; save it to group-complete.sl, load it in
your .jedrc file and bind complete_newsgroup to some key (e.g. M-TAB).
You can either cycle all groups in your newsrc file or type a part of
the newsgroup name before hitting that key (to limit the number of
possible completions).
If more people think this is useful, I'll play around with it some
more (an obvious enhancement would be a config option to tab-complete
subscribed groups only) and add it to the distribution.
<group-complete.sl>
% Complete newsgroup names based on the newsrc file
% Written by Thomas Schultz <tststs@gmx.de>
%
% This macro is based on tex_complete_symbol from latex.sl
% by Kevin Humphreys / John E. Davis
% If your newsrc file is not ~/.newsrc or ~/.jnewsrc, set it here
variable newsrcfile;
define complete_newsgroup ()
{
variable symbol, completion = "";
variable insertbuf = whatbuf(), searchbuf = "*group-comp*";
!if (bufferp(searchbuf))
{
sw2buf(searchbuf);
% Try to find the newsrc file
if (newsrcfile==NULL)
{
variable home = getenv ("HOME");
if (home == NULL)
error ("$HOME is undefined - could not find newsrc file");
newsrcfile = search_path_for_file (home,".jnewsrc");
if (newsrcfile == NULL)
newsrcfile = search_path_for_file (home,".newsrc");
if (newsrcfile == NULL)
error ("Could not find ~/.jnewsrc or ~/.newsrc");
}
% Insert it into the buffer and remove read article counts
insert_file(newsrcfile); bob();
do
{
bol ();
if (orelse {ffind_char (':')} {ffind_char ('!')})
{
push_mark (); eol ();
del_region();
}
}
while (down (1));
set_buffer_modified_flag(0);
sw2buf(insertbuf);
bury_buffer(searchbuf);
}
push_spot();
push_mark();
if (orelse {bfind_char(',')} {bfind_char(' ')})
() = right(1);
else
bol();
symbol = bufsubstr();
setbuf(searchbuf);
if (strlen(symbol)==0)
{
if (eobp()) bob(); % wrap to start
bol(); push_mark(); eol();
completion = bufsubstr();
() = down (1);
}
else
{
!if (bol_fsearch(symbol)) bob(); % wrap to start
if (bol_fsearch(symbol))
{
go_right(strlen(symbol));
push_mark_eol();
completion = bufsubstr();
}
}
if (strlen(completion)==0)
{
setbuf(insertbuf);
pop_mark_0 ();
pop_spot();
error("No completion found");
}
setbuf(insertbuf);
goto_spot ();
push_mark();
!if (orelse {ffind_char (',')} {ffind_char (' ')}) eol();
del_region();
insert(completion);
pop_spot();
}
<--->
--
Thomas Schultz <tststs@gmx.de> News on slrn: http://slrn.sf.net/news.html
.-----------------------------. [2002-03-13] slrn 0.9.7.4 is out
| Home of the slrn newsreader | [2002-02-03] Screenshot page online
| http://slrn.sourceforge.net | [2002-02-03] "Port" to Mac OS X
Re: [slrn] Selecting a followup
Author: Thomas Schultz
Date: Sun, 27 Jul 2003 20:30
Date: Sun, 27 Jul 2003 20:30
15 lines
1403 bytes
1403 bytes
* Thomas Schultz [2003-07-27 20:15] :
> variable newsrcfile;
Oops - this line should read
custom_variable ("newsrcfile", NULL);
to work properly.
--
Thomas Schultz <tststs@gmx.de> News on slrn: http://slrn.sf.net/news.html
.-----------------------------. [2002-03-13] slrn 0.9.7.4 is out
| Home of the slrn newsreader | [2002-02-03] Screenshot page online
| http://slrn.sourceforge.net | [2002-02-03] "Port" to Mac OS X
Re: [slrn] Selecting a followup
Author: SINNER
Date: Mon, 28 Jul 2003 12:50
Date: Mon, 28 Jul 2003 12:50
28 lines
2631 bytes
2631 bytes
Thomas Schultz Wrote in news.software.readers, on Sun, 27 Jul 2003 20:15:39 +0000 (UTC): > * SINNER [2003-07-08 13:09] : >> If the article is _not_ crossposted, is there anyway, macro or >> otherwise, to select a followup group without manually typing it in >> effecting a possible misspelling? [...] > A convenient way I could think of is a function in your editor that > allows tab completion of newsgroup names. I wrote a macro for the > editor jed that does just that (based on the newsgroups found in the > user's newsrc file). > Here's a first version of it; save it to group-complete.sl, load it in > your .jedrc file and bind complete_newsgroup to some key (e.g. M-TAB). > You can either cycle all groups in your newsrc file or type a part of > the newsgroup name before hitting that key (to limit the number of > possible completions). > If more people think this is useful, I'll play around with it some > more (an obvious enhancement would be a config option to tab-complete > subscribed groups only) and add it to the distribution. Damn! I dont use jed, but this would seem a good reason to try it! Thank you Thomas. -- David
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads