πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
35 messages
35 total messages Started by houghi Sat, 07 Aug 2010 15:02
Quotelength with slrn and vim
#241988
Author: houghi
Date: Sat, 07 Aug 2010 15:02
29 lines
2315 bytes
Not strictly a newsreader issue, but perhaps people here will have more
experience with this issue.

When I do a reply I do a cmplete reply as it is. However when doing a
reply to people who have not formatted their length correctly, or if
there are many quotes, the line length can become too long.

e.g.
>>>>> lorem ipsum dolor sit amet consetetur sadipscing elitr sed diam nonumy

instead of

>>>>> lorem ipsum dolor sit amet consetetur sadipscing elitr sed diam
>>>>> nonumy

I am able to do it by hand, but I am unable to do it automagically when
the quote opens. I have two questions:
1) Perhaps most importand, is it wanted to restrict the width in the
quoted text. If not, then all is well.
2) If wanted, how dod I do this? I have looked at several web pages and
I know it has something to do with ftplugin, but somehow I can not get
it to work.

houghi
-- 
This is written under the inluence of the following:
>   Artist : Athur Prysock
>     Song : Eleven Years
>    Album : This is my beloved
Re: Quotelength with slrn and vim
#242006
Author: Steve Ackman
Date: Sat, 07 Aug 2010 16:23
49 lines
3279 bytes
In <slrni5qtcf.d1a.houghi@penne.houghi>, on Sat, 7 Aug 2010 17:02:39 
+0200, houghi, houghi@houghi.org.invalid wrote:
> Not strictly a newsreader issue, but perhaps people here will have more 
> experience with this issue.
>
> When I do a reply I do a cmplete reply as it is. However when doing a 
> reply to people who have not formatted their length correctly, or if 
> there are many quotes, the line length can become too long.
>
> e.g.
>>>>>> lorem ipsum dolor sit amet consetetur sadipscing elitr sed diam nonumy
>
> instead of
>
>>>>>> lorem ipsum dolor sit amet consetetur sadipscing elitr sed diam
>>>>>> nonumy
>
> I am able to do it by hand, but I am unable to do it automagically when
> the quote opens. I have two questions:
> 1) Perhaps most importand, is it wanted to restrict the width in the
> quoted text. If not, then all is well.

  Actually, most important is, "What editor are you
using?"  This is far more important than the slrn 
usage.
  Reformatting to length is desirable, in my world 
anyway.

> 2) If wanted, how dod I do this?

  If you use pico/nano as your editor.  Then, ^J
No way to know how to do it in your editor until you
let us in on the secret.

> I have looked at several web pages and
> I know it has something to do with ftplugin, but somehow I can not get
> it to work.

  No idea what that would have to do with slrn...  
<scroogle, scroogle>  Oh!  Vim.  Secret revealed 
after all.  In that case, I have no idea about 
reformatting.  

  Now that we have that all sorted, I suppose I should
just delete this and forget about posting it.

-- 
☯☯ 
Steve "but I won't" Ackman
Re: Quotelength with slrn and vim
#242072
Author: houghi
Date: Sat, 07 Aug 2010 16:33
23 lines
2309 bytes
Steve Ackman wrote:
>> I have looked at several web pages and
>> I know it has something to do with ftplugin, but somehow I can not get
>> it to work.
>
>   No idea what that would have to do with slrn...  
> <scroogle, scroogle>  Oh!  Vim.  Secret revealed 
> after all.  In that case, I have no idea about 
> reformatting.  
>
>   Now that we have that all sorted, I suppose I should
> just delete this and forget about posting it.

Sorry about only putting it in the Subject. You rightfully point
sacastically out that it should have been in the text as well. My
appologies.

houghi
-- 
Listen do you hear them drawing near in their search for the sinners?
Feeding on the power of our fear and the evil within us.
Incarnation of Satan's creation of all that we dread.
When the demons arrive those alive would be better off dead!
Re: Quotelength with slrn and vim
#242001
Author: Mike Yetto
Date: Sat, 07 Aug 2010 16:59
43 lines
3089 bytes
houghi <houghi@houghi.org.invalid> writes and having writ moves on.
> Not strictly a newsreader issue, but perhaps people here will have more
> experience with this issue.
>
> When I do a reply I do a cmplete reply as it is. However when doing a
> reply to people who have not formatted their length correctly, or if
> there are many quotes, the line length can become too long.
>
> e.g.
>>>>>> lorem ipsum dolor sit amet consetetur sadipscing elitr sed diam nonumy
>
> instead of
>
>>>>>> lorem ipsum dolor sit amet consetetur sadipscing elitr sed diam
>>>>>> nonumy
>
> I am able to do it by hand, but I am unable to do it automagically when
> the quote opens. I have two questions:
> 1) Perhaps most importand, is it wanted to restrict the width in the
> quoted text. If not, then all is well.
> 2) If wanted, how dod I do this? I have looked at several web pages and
> I know it has something to do with ftplugin, but somehow I can not get
> it to work.
>

In vim place the pointer somewhere in the paragraph you want to
reformat and press _<esc>gqap_ which will handle the quote marks
quite nicely.  You might want to add a blank line where you want
the paragraph to end as it might get carried away.

For what it's worth I start the editor with this line from
slrn.rc.

#v+
set editor_command "gvim -f '+set tw=65' '%s' 2>>$HOME/.xsession-errors"
#v-

The "+set tw=65" is for the line width.

Mike "no specific reason for the *g*vim" Yetto
-- 
In theory, theory and practice are the same.
In practice they are not.
Re: Quotelength with slrn and vim
#242003
Author: houghi
Date: Sat, 07 Aug 2010 17:35
25 lines
2508 bytes
Mike Yetto wrote:
>> I am able to do it by hand, but I am unable to do it automagically when
>> the quote opens. I have two questions:
>> 1) Perhaps most importand, is it wanted to restrict the width in the
>> quoted text. If not, then all is well.
>> 2) If wanted, how dod I do this? I have looked at several web pages and
>> I know it has something to do with ftplugin, but somehow I can not get
>> it to work.
>>
>
> In vim place the pointer somewhere in the paragraph you want to
> reformat and press _<esc>gqap_ which will handle the quote marks
> quite nicely.  You might want to add a blank line where you want
> the paragraph to end as it might get carried away.

Sorry, "By hand" I mean I can do it that way with gqap. What I am
looking for is that _all_ of the quoted text on a reply is already
correctely cropped.

houghi
-- 
> This is written under the influence of tv channel
> Discovery Channel (as there was nothing else on).

> I am now watching : Wreckreation nation: Figure eight
Re: Quotelength with slrn and vim
#242009
Author: Mike Yetto
Date: Sat, 07 Aug 2010 18:53
29 lines
2957 bytes
houghi <houghi@houghi.org.invalid> writes and having writ moves on.
> Mike Yetto wrote:
>>> I am able to do it by hand, but I am unable to do it automagically when
>>> the quote opens. I have two questions:
>>> 1) Perhaps most importand, is it wanted to restrict the width in the
>>> quoted text. If not, then all is well.
>>> 2) If wanted, how dod I do this? I have looked at several web pages and
>>> I know it has something to do with ftplugin, but somehow I can not get
>>> it to work.
>>>
>>
>> In vim place the pointer somewhere in the paragraph you want to
>> reformat and press _<esc>gqap_ which will handle the quote marks
>> quite nicely.  You might want to add a blank line where you want
>> the paragraph to end as it might get carried away.
>
> Sorry, "By hand" I mean I can do it that way with gqap. What I am
> looking for is that _all_ of the quoted text on a reply is already
> correctely cropped.
>

I was a little surprised that I might be the one showing you
that.  As for having it done on loading of the file, well, if
someone else knows, pass it on.

Mike "how about a macro to get me a beer?" Yetto
-- 
In theory, theory and practice are the same.
In practice they are not.
Re: Quotelength with slrn and vim
#242010
Author: Bastian Erdnuess
Date: Sat, 07 Aug 2010 21:17
33 lines
2643 bytes
Mike Yetto wrote:

> houghi <houghi@houghi.org.invalid> writes and having writ moves on.
>> Mike Yetto wrote:
>>>> I am able to do it by hand, but I am unable to do it automagically when
>>>> the quote opens. I have two questions:
>>>> 1) Perhaps most importand, is it wanted to restrict the width in the
>>>> quoted text. If not, then all is well.
>>>> 2) If wanted, how dod I do this? I have looked at several web pages and
>>>> I know it has something to do with ftplugin, but somehow I can not get
>>>> it to work.
>>>
>>> In vim place the pointer somewhere in the paragraph you want to
>>> reformat and press _<esc>gqap_ which will handle the quote marks
>>> quite nicely.  You might want to add a blank line where you want
>>> the paragraph to end as it might get carried away.
>>
>> Sorry, "By hand" I mean I can do it that way with gqap. What I am
>> looking for is that _all_ of the quoted text on a reply is already
>> correctely cropped.
>
> I was a little surprised that I might be the one showing you that.  As
> for having it done on loading of the file, well, if someone else
> knows, pass it on.

I didn't give it a test, but something like

  set editor "vim '%s' +':norm Ggqap' +%c"

in slrnrc could help.

Cheers
Bastian
Re: Quotelength with slrn and vim
#242011
Author: Indi
Date: Sat, 07 Aug 2010 22:37
32 lines
1935 bytes
On 2010-08-07, houghi <houghi@houghi.org.invalid> wrote:
> Not strictly a newsreader issue, but perhaps people here will have more
> experience with this issue.
>
> When I do a reply I do a cmplete reply as it is. However when doing a
> reply to people who have not formatted their length correctly, or if
> there are many quotes, the line length can become too long.
>
> e.g.
>>>>>> lorem ipsum dolor sit amet consetetur sadipscing elitr sed diam nonumy
>
> instead of
>
>>>>>> lorem ipsum dolor sit amet consetetur sadipscing elitr sed diam
>>>>>> nonumy
>
> I am able to do it by hand, but I am unable to do it automagically when
> the quote opens. I have two questions:
> 1) Perhaps most importand, is it wanted to restrict the width in the
> quoted text. If not, then all is well.
> 2) If wanted, how dod I do this? I have looked at several web pages and
> I know it has something to do with ftplugin, but somehow I can not get
> it to work.
>
> houghi

I use fmt in vim, it's cumbersome but it works.

-- 
Caveat utilitor,
indi
Re: Quotelength with slrn and vim
#242013
Author: houghi
Date: Sat, 07 Aug 2010 23:47
20 lines
2222 bytes
Bastian Erdnuess wrote:
> I didn't give it a test, but something like
>
>   set editor "vim '%s' +':norm Ggqap' +%c"
>
> in slrnrc could help.

This might be a step in the right direction, as it something to my sig.
(I can remove the > there. I just added them because of colouring)
However it did nothing for the original quoted text.

The script is a piped file and it looks as if that is somehow treaded,
but the original text is not. Mmm.

houghi
-- 
This is written under the inluence of the following:
>   Artist : Santana
>     Song : Persuasion
>    Album : Santana
Re: Quotelength with slrn and vim
#242014
Author: houghi
Date: Sun, 08 Aug 2010 00:02
15 lines
1833 bytes
Indi wrote:
>
> I use fmt in vim, it's cumbersome but it works.

Could you please elaborate. What I tried was googleling 'fmt vim' and
came up with :%!fmt which messes up everything, including the headers.

`man fmt` also did not give any clues on how to do it. :-(

houghi
-- 
This is written under the inluence of the following:
>   Artist : Black Sabbath
>     Song : Trashed
>    Album : Born Again
Re: Quotelength with slrn and vim
#242015
Author: Indi
Date: Sun, 08 Aug 2010 00:30
23 lines
1542 bytes
On 2010-08-08, houghi <houghi@houghi.org.invalid> wrote:
> Indi wrote:
>>
>> I use fmt in vim, it's cumbersome but it works.
>
> Could you please elaborate. What I tried was googleling 'fmt vim' and
> came up with :%!fmt which messes up everything, including the headers.
>
> `man fmt` also did not give any clues on how to do it. :-(
>
> houghi

In vim doing this:

:18,77!fmt 80 

will wrap lines 18 through 77 at 80 characters.
 

-- 
Caveat utilitor,
indi
Re: Quotelength with slrn and vim
#242018
Author: Bastian Erdnuess
Date: Sun, 08 Aug 2010 00:55
19 lines
1965 bytes
houghi wrote:

> Bastian Erdnuess wrote:
>> I didn't give it a test, but something like
>>
>>   set editor "vim '%s' +':norm Ggqap' +%c"
>>
>> in slrnrc could help.
>
> This might be a step in the right direction, as it something to my
> sig.  (I can remove the > there. I just added them because of
> colouring) However it did nothing for the original quoted text.

Then try

  set editor "vim '%s' +%c +':norm gqap' +%c"

could work for now, but might break when you change some other settings.
I'd recommend to just do it by hand.
Re: Quotelength with slrn and vim
#242019
Author: chuckcar
Date: Sun, 08 Aug 2010 04:00
20 lines
2026 bytes
houghi <houghi@houghi.org.invalid> wrote in
news:slrni5rt0a.bl5.houghi@penne.houghi: 

> Indi wrote:
>>
>> I use fmt in vim, it's cumbersome but it works.
> 
> Could you please elaborate. What I tried was googleling 'fmt vim' and
> came up with :%!fmt which messes up everything, including the headers.
> 
> `man fmt` also did not give any clues on how to do it. :-(
> 
> houghi

Google doesn't work too well for a lot of *nix software. I use either
gnu.org or freshmeat.net. Try doing a google search for vi for example. 
Context is everything.

-- 
(setq (chuck nil)  car(chuck) )
Re: Quotelength with slrn and vim
#242027
Author: houghi
Date: Sun, 08 Aug 2010 11:26
26 lines
2732 bytes
Bastian Erdnuess wrote:
>> This might be a step in the right direction, as it something to my
>> sig.  (I can remove the > there. I just added them because of
>> colouring) However it did nothing for the original quoted text.
>
> Then try
>
>   set editor "vim '%s' +%c +':norm gqap' +%c"
>
> could work for now, but might break when you change some other
> settings.  I'd recommend to just do it by hand.

Seems to work partially. About one in every 10-20 times it mangels the
signature. It then makes all of the signature into one paragraph without
the CR/LF in it.

As I never had an issue in all the years, perhaps it is easier to do it
by hand as it does not happen that often. Thanks anyway for helping. I
will look into it a bit further.

houghi
-- 
This is written under the inluence of the following:
>   Artist : Jethro Tull
>     Song : Heavy Water
>    Album : Rock Island
Re: Quotelength with slrn and vim
#242028
Author: houghi
Date: Sun, 08 Aug 2010 11:30
19 lines
1971 bytes
Indi wrote:
> In vim doing this:
>
>:18,77!fmt 80 
>
> will wrap lines 18 through 77 at 80 characters.

OK, that would mean that I first have to figure out the first line after
the first empty line, then the beginning of the signature minus one line
and then do everything in between.

I will look into it.

houghi
-- 
This is written under the inluence of the following:
>   Artist : Pink Floyd
>     Song : Lucifer Sam
>    Album : The Piper At The Gates Of Dawn
Re: Quotelength with slrn and vim
#242029
Author: Shmuel Metz
Date: Sun, 08 Aug 2010 12:40
35 lines
2860 bytes
In <slrni5r6b3.d1a.houghi@penne.houghi>, on 08/07/2010
   at 07:35 PM, houghi <houghi@houghi.org.invalid> said:

>Sorry, "By hand" I mean I can do it that way with gqap. What I am
>looking for is that _all_ of the quoted text on a reply is already
>correctely cropped.

Unless you're only responding to one fragment, there's no way to
format properly before you start composing your reply. If you're
responding to "foo, bar and baz", the editor has no way of telling
that you will be responding individually to each.

   >foo,

   foo response

   >bar

   bar response

   >baz

   baz response

The best that the editor can do is to provide an easy way to obtain a
properly quoted and wrapp version of each.

-- 
Shmuel (Seymour J.) Metz, SysProg and JOAT  <http://patriot.net/~shmuel>

Unsolicited bulk E-mail subject to legal action.  I reserve the
right to publicly post or ridicule any abusive E-mail.  Reply to
domain Patriot dot net user shmuel+news to contact me.  Do not
reply to spamtrap@library.lspace.org
Re: Quotelength with slrn and vim
#242032
Author: W. Citoan
Date: Sun, 08 Aug 2010 13:11
40 lines
3153 bytes
houghi wrote:
>  Bastian Erdnuess wrote:
> >> This might be a step in the right direction, as it something to my
> >> sig.  (I can remove the > there. I just added them because of
> >> colouring) However it did nothing for the original quoted text.
> >
> > Then try
> >
> >   set editor "vim '%s' +%c +':norm gqap' +%c"
> >
> > could work for now, but might break when you change some other
> > settings.  I'd recommend to just do it by hand.
> 
>  Seems to work partially. About one in every 10-20 times it mangels
>  the signature. It then makes all of the signature into one paragraph
>  without the CR/LF in it.

Need to limit it to only format from the first blank line to the start
of the signature block.  See below for a command that does that (the F2
mapping). 

>  As I never had an issue in all the years, perhaps it is easier to do
>  it by hand as it does not happen that often. Thanks anyway for
>  helping. I will look into it a bit further.

I have the following two maps defined in my vimrc:

  map <F1> <Esc>gqap                       " reformat paragraph
  map <F2> <Esc>gg/^$<CR>V/^-- $<CR>{gq`^  " reformat message

F1 fixes a single paragraph and F2 everything between the first blank
line and the signature block.  As in editing a message I will sometimes
change the line wraps, I find it easier to just hit a key when I need
to.

- W. Citoan
-- 
The optimist proclaims that we live in the best of all possible worlds; and
the pessimist fears this is true.
-- Branch Cabell
Re: Quotelength with slrn and vim
#242034
Author: houghi
Date: Sun, 08 Aug 2010 14:10
26 lines
2745 bytes
W. Citoan wrote:
>>  As I never had an issue in all the years, perhaps it is easier to do
>>  it by hand as it does not happen that often. Thanks anyway for
>>  helping. I will look into it a bit further.
>
> I have the following two maps defined in my vimrc:
>
>   map <F1> <Esc>gqap                       " reformat paragraph
>   map <F2> <Esc>gg/^$<CR>V/^-- $<CR>{gq`^  " reformat message
>
> F1 fixes a single paragraph and F2 everything between the first blank
> line and the signature block.  As in editing a message I will sometimes
> change the line wraps, I find it easier to just hit a key when I need
> to.


Thanks. That will indeed be the easiest solution. I had the first line,
but I did not have the second one. I guess it will be indeed much easier
to do it that way. Again thanks.

houghi
-- 
This is written under the inluence of the following:
>   Artist : David Bowie
>     Song : Life On Mars?
>    Album : Hunky Dory
Re: Quotelength with slrn and vim
#242033
Author: Whiskers
Date: Sun, 08 Aug 2010 14:15
29 lines
2521 bytes
On 2010-08-08, chuckcar <chuck@nil.car> wrote:
> houghi <houghi@houghi.org.invalid> wrote in
> news:slrni5rt0a.bl5.houghi@penne.houghi: 
>
>> Indi wrote:
>>>
>>> I use fmt in vim, it's cumbersome but it works.
>> 
>> Could you please elaborate. What I tried was googleling 'fmt vim' and
>> came up with :%!fmt which messes up everything, including the headers.
>> 
>> `man fmt` also did not give any clues on how to do it. :-(
>> 
>> houghi
>
> Google doesn't work too well for a lot of *nix software. I use either
> gnu.org or freshmeat.net. Try doing a google search for vi for example. 
> Context is everything.

Try telling Google to use its dedicated Linux search, eg 
<http://www.google.com/linux?hl=en&lr=&q=vi&btnG=Search>.  This facility 
used to be listed under 'more...' from the normal Google search page, 
but seems to have been forgotten in the current list.  It is to be hoped 
the facility itself isn't about to vanish too.

-- 
-- ^^^^^^^^^^
--  Whiskers 
-- ~~~~~~~~~~
Re: Quotelength with slrn and vim
#242035
Author: Whiskers
Date: Sun, 08 Aug 2010 14:25
29 lines
2587 bytes
On 2010-08-07, houghi <houghi@houghi.org.invalid> wrote:
> Steve Ackman wrote:
>>> I have looked at several web pages and I know it has something to do 
>>> with ftplugin, but somehow I can not get it to work.
>>
>>   No idea what that would have to do with slrn...  <scroogle, 
>> scroogle> Oh!  Vim.  Secret revealed after all.  In that case, I have 
>> no idea about reformatting.
>>
>>   Now that we have that all sorted, I suppose I should just delete 
>> this and forget about posting it.
>
> Sorry about only putting it in the Subject. You rightfully point 
> sacastically out that it should have been in the text as well. My 
> appologies.
>
> houghi

I don't want to start another skirmish in the Great Editor War, and as a 
fan of mcedit for many years I'm reluctant to admit it, but Nano 
re-wraps usenet and email quoted text very nicely - just hit ^j and the 
paragraph where the cursor is will re-wrap with the correct number of > 
at the start of the reformatted lines.  It even preserves any paragraph 
indenting.  See the quoted text above, for example  :))

-- 
-- ^^^^^^^^^^
--  Whiskers 
-- ~~~~~~~~~~
Re: Quotelength with slrn and vim
#242036
Author: houghi
Date: Sun, 08 Aug 2010 14:42
17 lines
2306 bytes
Whiskers wrote:
> Try telling Google to use its dedicated Linux search, eg 
> <http://www.google.com/linux?hl=en&lr=&q=vi&btnG=Search>.  This facility 
> used to be listed under 'more...' from the normal Google search page, 
> but seems to have been forgotten in the current list.  It is to be hoped 
> the facility itself isn't about to vanish too.

I used that for a while, but I noticed that I got better results when I
just added 'linux' to the search. Very subjective. It is always good to
have several options.

houghi
-- 
This is written under the inluence of the following:
>   Artist : David Bowie
>     Song : Golden Years
>    Album : Station to Station
Re: Quotelength with slrn and vim
#242040
Author: Bastian Erdnuess
Date: Sun, 08 Aug 2010 18:14
40 lines
2282 bytes
houghi wrote:

> Indi wrote:
>> In vim doing this:
>>
>>:18,77!fmt 80 
>>
>> will wrap lines 18 through 77 at 80 characters.
>
> OK, that would mean that I first have to figure out the first line
> after the first empty line, then the beginning of the signature minus
> one line and then do everything in between.
>
> I will look into it.

I don't think that fmt is the right tool for your needs.

Here is another one:

  set editor "vim '%s' +':norm 1G/^$^MjV/^-- $^Mkgw' +':nohl' +%c"

where the two '^M' behind the dollar signs are keyed in by
'[ctrl]-[v],[return]'.

Works only if you have a sig.

What happens when you just use

  set editor "vim '%s' +%c"

and do 'gwap' right after vim starts?  Do you have a signoff_string set
in slrnrc?  If so, try to start or end it with one or two '\n'.  If not,
try

  set signoff_string "\n\n"

or just one "\n" if your if your sig gets messed up.

Cheers
Bastian
Re: Quotelength with slrn and vim
#242041
Author: Adam Funk
Date: Sun, 08 Aug 2010 20:29
25 lines
2166 bytes
On 2010-08-08, Whiskers wrote:

> I don't want to start another skirmish in the Great Editor War, and as a 

Well, since you've opened that front...

> fan of mcedit for many years I'm reluctant to admit it, but Nano
> re-wraps usenet and email quoted text very nicely - just hit ^j and
> the paragraph where the cursor is will re-wrap with the correct
> number of > at the start of the reformatted lines.  It even
> preserves any paragraph indenting.  See the quoted text above, for
> example :))

If I put the cursor in a section of text with a blank line before and
after it, and press M-q, emacs will reformat ("fill") it and preserve
the number of ">" at the beginning of each line --- which I've just
done to your lines above.  Unfortunately, it doesn't correctly
identify the "paragraph" to reformat if there are non-blank lines
containing only ">" and spaces that make it contiguous with other
paragraphs with different levels of quoting.


-- 
Do you know what they do to book thieves up at Santa Rita?
         http://www.shigabooks.com/indeces/bookhunter.html
Re: Quotelength with slrn and vim
#242039
Author: Troy Piggins
Date: Sun, 08 Aug 2010 21:52
42 lines
2945 bytes
* houghi wrote :
> Not strictly a newsreader issue, but perhaps people here will have more
> experience with this issue.
>
> When I do a reply I do a cmplete reply as it is. However when doing a
> reply to people who have not formatted their length correctly, or if
> there are many quotes, the line length can become too long.
>
> e.g.
>>>>>> lorem ipsum dolor sit amet consetetur sadipscing elitr sed diam nonumy
>
> instead of
>
>>>>>> lorem ipsum dolor sit amet consetetur sadipscing elitr sed diam
>>>>>> nonumy
>
> I am able to do it by hand, but I am unable to do it automagically when
> the quote opens. I have two questions:
> 1) Perhaps most importand, is it wanted to restrict the width in the
> quoted text. If not, then all is well.
> 2) If wanted, how dod I do this? I have looked at several web pages and
> I know it has something to do with ftplugin, but somehow I can not get
> it to work.
>
> houghi

I see you've been using and recommended the "gqap" command.  I
use "gqip" instead.  TBH I've been doing that so long, can't
remember the difference between the 2, but seem to remember it's
better for multiple quotes.  It's trivial to map it to a single
keystroke instead of 4.

Not sure if you've tried there, but some very clever vim users in
the comp.editors group.

Personally I don't like automatically changing the format as I
open the editor, because as you've discovered the results are
sometimes undesirable.  Not sure if it can be undone as easily if
it's executed from the commandline.

-- 
Troy Piggins
Re: Quotelength with slrn and vim
#242047
Author: notbob
Date: Sun, 08 Aug 2010 22:54
10 lines
1536 bytes
On 2010-08-08, Adam Funk <a24061@ducksburg.com> wrote:

> If I put the cursor in a section of text with a blank line before and
> after it, and press M-q, emacs will reformat ("fill") it and preserve
> the number of ">" at the beginning of each line --- 

I learned from JED that jed also does this, now.  Too late.  I changed
to emacs.  ;)

nb
Re: Quotelength with slrn and vim
#242049
Author: Whiskers
Date: Mon, 09 Aug 2010 01:07
20 lines
2294 bytes
On 2010-08-08, notbob <notbob@nothome.com> wrote:
> On 2010-08-08, Adam Funk <a24061@ducksburg.com> wrote:
>
>> If I put the cursor in a section of text with a blank line before and
>> after it, and press M-q, emacs will reformat ("fill") it and preserve
>> the number of ">" at the beginning of each line --- 
>
> I learned from JED that jed also does this, now.  Too late.  I changed
> to emacs.  ;)
>
> nb

I see that Jed has a --mail-mode option which presumably incorporates 
the smart reflow of quoted text; time to give Jed another try, perhaps?  
I like the idea of using an editor with the same parentage as slrn  :))

-- 
-- ^^^^^^^^^^
--  Whiskers 
-- ~~~~~~~~~~
Re: Quotelength with slrn and vim
#242048
Author: houghi
Date: Mon, 09 Aug 2010 01:26
38 lines
2580 bytes
Bastian Erdnuess wrote:
> I don't think that fmt is the right tool for your needs.
>
> Here is another one:
>
>   set editor "vim '%s' +':norm 1G/^$^MjV/^-- $^Mkgw' +':nohl' +%c"
>
> where the two '^M' behind the dollar signs are keyed in by
> '[ctrl]-[v],[return]'.
>
> Works only if you have a sig.

That gives an error, saying there is an editor error and I can't edit
anything.

> What happens when you just use
>
>   set editor "vim '%s' +%c"

That also gives the same error.

> and do 'gwap' right after vim starts?  Do you have a signoff_string set
> in slrnrc?  If so, try to start or end it with one or two '\n'.  If not,
> try
>
>   set signoff_string "\n\n"
>
> or just one "\n" if your if your sig gets messed up.

That is 
set signoff_string "\nhoughi"

houghi
-- 
This is written under the inluence of the following:
>   Artist : Blue Γ–yster Cult
>     Song : Light Years of Love
>    Album : The Revolution By Night
Re: Quotelength with slrn and vim
#242050
Author: Bastian Erdnuess
Date: Mon, 09 Aug 2010 03:50
40 lines
2286 bytes
houghi wrote:

> Bastian Erdnuess wrote:
>> I don't think that fmt is the right tool for your needs.
>>
>> Here is another one:
>>
>>   set editor "vim '%s' +':norm 1G/^$^MjV/^-- $^Mkgw' +':nohl' +%c"
>>
>> where the two '^M' behind the dollar signs are keyed in by
>> '[ctrl]-[v],[return]'.
>>
>> Works only if you have a sig.
>
> That gives an error, saying there is an editor error and I can't edit
> anything.
>
>> What happens when you just use
>>
>>   set editor "vim '%s' +%c"
>
> That also gives the same error.

Oops, should be %d instead of %c.  (Same above and everywhere.)

I don't understand why

  set editor "vim '%s' +%d +':norm gwap'"

could mess up your sig, when you have this

> set signoff_string "\nhoughi"

signoff string.

If it does, can you try to reproduce the error and post an example where
it does?

Cheers
Bastian
Re: Quotelength with slrn and vim
#242052
Author: houghi
Date: Mon, 09 Aug 2010 08:28
29 lines
2463 bytes
Bastian Erdnuess wrote:
> Oops, should be %d instead of %c.  (Same above and everywhere.)

I have that.

> I don't understand why
>
>   set editor "vim '%s' +%d +':norm gwap'"
>
> could mess up your sig, when you have this
>
>> set signoff_string "\nhoughi"
>
> signoff string.
>
> If it does, can you try to reproduce the error and post an example
> where it does?

Message-ID: <slrni5t3sm.kc.houghi@penne.houghi>

I now just tried again and again and nothing. Before that it was one in
about 10 tries.

houghi
-- 
This is written under the inluence of the following:
>   Artist : Guns N' Roses
>     Song : Anything Goes
>    Album : Appetite For Destruction
Re: Quotelength with slrn and vim
#242051
Author: Bastian Erdnuess
Date: Mon, 09 Aug 2010 08:59
18 lines
2075 bytes
houghi wrote:

> Bastian Erdnuess wrote:
>
>> If it does, can you try to reproduce the error and post an example
>> where it does?
>
> Message-ID: <slrni5t3sm.kc.houghi@penne.houghi>

Doesn't exist.  Neither on my local news server, nor in Google Groups.

> I now just tried again and again and nothing. Before that it was one in
> about 10 tries.

If there is somewhere an empty line between the "Whoever wrote:" line
and the sig, there shouldn't be a problem.

Bastian
Re: Quotelength with slrn and vim
#242053
Author: houghi
Date: Mon, 09 Aug 2010 09:18
21 lines
2639 bytes
Bastian Erdnuess wrote:
>> Message-ID: <slrni5t3sm.kc.houghi@penne.houghi>
>
> Doesn't exist.  Neither on my local news server, nor in Google Groups.

Google-groups is no surprise as I use X-No-Archive.
Local server also not a great surprise as it is be.test group

> If there is somewhere an empty line between the "Whoever wrote:" line
> and the sig, there shouldn't be a problem.

The strange thing was that one in 10 gave a problem and others did not.
This in a reply to the identical same message AND with no changes being
done in between.

houghi
-- 
This is written under the inluence of the following:
>   Artist : Jimi Hendrix
>     Song : One Rainy Wish
>    Album : Astro Man - Studio Outtakes
Re: Quotelength with slrn and vim
#242054
Author: houghi
Date: Mon, 09 Aug 2010 10:33
40 lines
2707 bytes
Shmuel Metz wrote:
> In <slrni5r6b3.d1a.houghi@penne.houghi>, on 08/07/2010
>    at 07:35 PM, houghi <houghi@houghi.org.invalid> said:
>
>>Sorry, "By hand" I mean I can do it that way with gqap. What I am
>>looking for is that _all_ of the quoted text on a reply is already
>>correctely cropped.
>
> Unless you're only responding to one fragment, there's no way to
> format properly before you start composing your reply. If you're
> responding to "foo, bar and baz", the editor has no way of telling
> that you will be responding individually to each.

The editor indeed does not have that knowledge, nor do I expect it to
have that.

>   >foo,
>
>    foo response
>
>   >bar
>
>    bar response
>
>   >baz
>
>    baz response
>
> The best that the editor can do is to provide an easy way to obtain a
> properly quoted and wrapp version of each.

Are you talking about the response as something I see in slrn, or to
somthing I would type myself?

houghi
-- 
This is written under the inluence of the following:
>   Artist : Simon and Garfunkel
>     Song : Bookends Theme
>    Album : Bookends
fill-paragraph in USENET messages (was: Quotelength with slrn and vim)
#242055
Author: Adam Funk
Date: Mon, 09 Aug 2010 19:21
41 lines
2861 bytes
[I'm adding gnu.emacs.help in case this is useful to someone outside
of NSR --- please feel free to prune FUs.]

On 2010-08-08, Adam Funk wrote:

> If I put the cursor in a section of text with a blank line before and
> after it, and press M-q, emacs will reformat ("fill") it and preserve
> the number of ">" at the beginning of each line --- which I've just
> done to your lines above.  Unfortunately, it doesn't correctly
> identify the "paragraph" to reformat if there are non-blank lines
> containing only ">" and spaces that make it contiguous with other
> paragraphs with different levels of quoting.


Well, I just found the following in my ~/.emacs file 

#v+
;; Message-ID: <mailman.1142.1174348863.7795.help-gnu-emacs@gnu.org>
;; From: Matthew Flaschen <matthew.flaschen@gatech.edu>
;; gnu.emacs.help  2007-03-19
;; Subject: Re: Configuring fill-paragraph not to mash the subversion delimiter?
(setq paragraph-start (concat paragraph-start "\\|--This line, and those below, will be ignored--"))
(setq paragraph-separate (concat paragraph-separate "\\|--This line, and those below, will be ignored--"))
#v-

and thought I might be able to string something together to deal with
adjacent quoted text in news posts.

#v+
(setq paragraph-start (concat paragraph-start "\\|[> \t]*\\(-- *\\)?$"))
(setq paragraph-separate (concat paragraph-start "\\|[> \t]*\\(-- *\\)?$"))
#v-

That seems to do what I want, but I welcome improvements.


-- 
The three-martini lunch is the epitome of American efficiency.
Where else can you get an earful, a bellyful and a snootful at
the same time?                             [Gerald Ford, 1978]
Re: Quotelength with slrn and vim
#242058
Author: Adam Funk
Date: Mon, 09 Aug 2010 19:56
17 lines
1777 bytes
On 2010-08-08, notbob wrote:

> On 2010-08-08, Adam Funk <a24061@ducksburg.com> wrote:
>
>> If I put the cursor in a section of text with a blank line before and
>> after it, and press M-q, emacs will reformat ("fill") it and preserve
>> the number of ">" at the beginning of each line --- 
>
> I learned from JED that jed also does this, now.  Too late.  I changed
> to emacs.  ;)

Well, it won't do you any harm.  ;-)


-- 
Some say the world will end in fire; some say in segfaults.
                                                 [XKCD 312]
Re: Quotelength with slrn and vim
#242176
Author: Shmuel Metz
Date: Sun, 15 Aug 2010 04:40
27 lines
3053 bytes
In <slrni5vmc3.au2.houghi@penne.houghi>, on 08/09/2010
   at 12:33 PM, houghi <houghi@houghi.org.invalid> said:

>Are you talking about the response as something I see in slrn, or to
>somthing I would type myself?

If you're the one responding to the article, then the response to each
fragment is something that you type in. Ideally I would want my news
reader to support both of the following:

 1. Maintain a split window for original and reply, with keyboard
    mappings for copy and paste quote. The paste quote function
    should do a smart reflow of the quoted text.

 2. Reflow a highlight block of text as a quote.

My news client has the paste as quote, but not the smart reflow. I'm
not sure what SLRN has.

-- 
Shmuel (Seymour J.) Metz, SysProg and JOAT  <http://patriot.net/~shmuel>

Unsolicited bulk E-mail subject to legal action.  I reserve the
right to publicly post or ridicule any abusive E-mail.  Reply to
domain Patriot dot net user shmuel+news to contact me.  Do not
reply to spamtrap@library.lspace.org
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