🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #181051

Re: [slrn in VT] reply quoting only selection

#181051
From: paf the dog
Date: Sun, 26 Feb 2006 14:09
116 lines
5561 bytes
paf the dog grumbled:
> and since I miss xnews too, I just finished a plugin that makes quotes
> be replaced by quotation marks -1 + space + [...]

Corrigendum:
quotation marks + space + [...]

We still try to make the possible partial last string selected get into
the buffer -say, if you select like this:
http://algazelle.free.fr/select1.png

but until we make it, it can only be usable in either of these ways:
http://algazelle.free.fr/select2.png
http://algazelle.free.fr/select3.png

you have to be aware that it is BAD and UGLY programming, but it works
like a charm in so far as you DON'T select PARTIALLY the LAST line. It
MUST be a whole line.

Still, I'll have again a look if ever I find a way to get it to work in
any circumstances. It is probably nothing but I am quite an heretic C
programmer so, it can take some time

still, if someone would like to give it a try, here it is
http://algazelle.free.fr/xenor-paste

it simply gives you back the content of the selection buffer so you may
use it with a thingy that quotes it:
http://algazelle.free.fr/xenor-quote

xenor is the friend with whom I made this (actually he made most of it,
I just found out where to get the selection buffer and how to cleanup
stdin, and did a few minor things)

*still*, I would need a new greek letter before alpha, to qualify the
development status so PLEASE be indulgent.

I works good enough to make me use it with no hesitation and it helps
quite a lot sometimes so, if it may be helpful for you...

we will try to complete it and then give the very small piece of code,
promised.

I have a large enough buffer I think, allowing more than 256×96 char
selection

I think it will be enough for many framebuffers, and anyway, the one
that does select such a piece of text to quote it, has nothing to do on
usenet ;D

oh another thing: do NOT use it if you made no selection, since it will
wait for something on it's stdin (though it has quite a funny side
effect: if you made no selection for some time, or you left clicked
making no selection, and the buffer is empty, vim (dunno about other
editors) waits for a line of input and then, inserts it as quoted text.

so, if you want to reply to some crap, for instance, you may just select
nothing and call your editor with the thing in its pipe, you'll then
have to type *blindly* something and it will replace the text you reply
to.

if I post something like

vim is a not so bad editor but notepad is far more featured and powerful
and elegant

and you call the piped editor on it with no selection you may then be
prompted and get into vim with something like

-----------------------------------
[headers]

paf the dog said:
>  bullshit

--<iamnotagoodsigdelimiter>
your sig
----------------------------------­

it is not especially wanted but well it's eventually rather convenient
:)

ok, now, please take a look at my own little plugin file

http://algazelle.free.fr/myslangfun.sl

look at repondrautruc() since it contains the pipe with the two
programs. You may certainly change things in these lines, look at them.

if you used to reply by pressing f it remains the same except that it
makes sure that the post_editor_command is the original one. This is
repondratou()

invoking your editor with only your selection quoted, is made, in this
plugin file, by pressing Esc-f. I like it since in fr-latin9 it is also
done with Alt-f

besides, I have put a test whether slrn is run in a tty or not, and in
case it is in X window, I substitute wxpaste for xenor-paste. It does
the same (a bit better actually) but in X Window, not in a tty.
wxpaste ships with WindowMaker, if ever you don't have it.

besides, you'll find abregeur, a function that makes quoted text be
abbreviated with [...] if you press Esc-c (well with fr-latin9.map Alt-c
*is* actually Esc-c, so, since the two keys are neighbours...).
It needs the recursive function scanneur above so do not delete one and
leave the other.
I may have forgotten to remove variables that are not used, I was tired.
If you find any, don't hesitate. If you know how to make anything more
efficient or beautiful or whatever, please do so

don't forget xenor-paste is not really finished

-- 
paf the dog
remove primate to reply
Technical Details
Message-ID: <slrne03dl5.4mh.pafbaboonlechien@jeannot.frigo.gla>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!solnet.ch!solnet.ch!proxad.net!u-picardie.fr!gegeweb.org!not-for-mail
References: <slrndvs4mt.6cp.pafbaboonlechien@jeannot.frigo.gla> <d192d3x2it.ln2@news.gates-of-hell.com> <slrndvsvfo.906.pafbaboonlechien@jeannot.frigo.gla>

Show Full Headers
Complete Article Headers
Message-ID: <slrne03dl5.4mh.pafbaboonlechien@jeannot.frigo.gla>
Subject: Re: [slrn in VT] reply quoting only selection
Date: Sun, 26 Feb 2006 14:09:42 +0000
From: paf the dog <pafbaboonlechien@neuf.fr>
References: <slrndvs4mt.6cp.pafbaboonlechien@jeannot.frigo.gla> <d192d3x2it.ln2@news.gates-of-hell.com> <slrndvsvfo.906.pafbaboonlechien@jeannot.frigo.gla>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!solnet.ch!solnet.ch!proxad.net!u-picardie.fr!gegeweb.org!not-for-mail
Newsgroups: news.software.readers
Organization: Crashed Dogs
Lines: 116
NNTP-Posting-Host: 102.110.119-80.rev.gaoland.net
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: freebee.gegeweb.org 1140962982 53020 80.119.110.102 (26 Feb 2006
X-Complaints-To: abuse@gegeweb.org
NNTP-Posting-Date: Sun, 26 Feb 2006 14:09:42 +0000 (UTC)
X-No-Archive: yes
User-Agent: slrn/0.9.8.1/rt (Linux)