On Wed, 11 Mar 2015, richard terry wrote:
> Personally I like top-posting, some lists I"m on use it. I find it
> easier to find out the last thing said rather than having to scroll down
> to the bottom of a long post. If the mail headers are up in the top
> pain, and the text in the bottom pain its easy to just scroll down the
> mail without having to constantly jump to the bottom pane to go down to
> the bottom.
>
I'm astonished how I can't relate at all. There is clearly no use trying
to settle this debate. So, for those who have a scriptable MUA and like
bottom-posting better, I attach a super-quick hack which tries to convert
top-posting mails to bottom ones, just to suggest that everyone may fix
their mail locally. In mutt, display_filter is the relevant setting (for
display only).
Also attached are a screenshot of a mail where it works and one where it
doesn't completely. There are uncountably many variations in the way
citations are introduced, and, in turn, as many spacing violations of
them, so it will never relly work. (I guess at this point, it will
completely mess up inline replies... It also can't correct top-posting
in citations.)
Regards,
Tobi
--
"There's an old saying: Don't change anything... ever!" -- Mr. Monk
#!/usr/bin/gbs3
Private Enum Header, Body, Signature
Private $iPart As Integer
Private $aHeader As New String[]
Private $aBody As New String[]
Private $aSig As New String[]
Public Sub Main()
$iPart = Header
' Process input in Application_Read()
While Not Eof(File.In)
Wait 0.1
Wend
Top2Bottom()
Print Trim$($aHeader.Join("\n"))
Print
Print Trim$($aBody.Join("\n"))
Print
Print Trim$($aSig.Join("\n"))
Quit
End
Public Sub Application_Read()
Dim sLine As String
Line Input sLine
Select Case $iPart
Case Header
If Not sLine Then $iPart = Body
$aHeader.Add(sLine)
Case Body
If sLine = "--" Or If sLine = "-- " Then
$iPart = Signature
$aSig.Add(sLine)
Else
$aBody.Add(sLine)
Endif
Case Signature
$aSig.Add(sLine)
End Select
End
Private Sub Top2Bottom()
Dim aReply, aCitation As New String[]
Dim iInd As Integer
For iInd = 0 To $aBody.Max
' Gambas has no support for "If p Or If (q And If r) Then"
If $aBody[iInd] Begins ">" Then
aCitation.Add($aBody[iInd])
Else If iInd < $aBody.Max And If $aBody[iInd + 1] Begins ">" Then
aCitation.Add($aBody[iInd])
Else
aReply.Add($aBody[iInd])
Endif
Next
$aBody = aCitation.Insert(["\n"]).Insert(aReply)
End
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user