Re: Strip greetings when replying

2020-05-11 Thread Marck Pearlstone

On 11 May 2020 at 12:35 Andrew Savchenko wrote and made these points

AS> Monday, May 11, 2020, 8:53:20 PM, you wrote:

>> There  are  2  more  QTs you need to complete the set for this to work
>> properly.

AS> Thanks, done. I wonder how you include it, on folder or account level? I
AS> have tested as the reply template for a folder - works fine now.

Most  of my templates are at Address Book Group level. This has always
proved most effective. Folder level templates have always had unwanted
behaviours  where  the folder focused in the main UI can override that
of  a message open in a browse window for a different folder. Although
that  is  a rare malfunction, it was enough to have me lean toward the
target  address governing the quoting and formatting requirements of a
reply.

AS> Have to check if this handy "styled-with-initials" kind of response is
AS> RFC'd / supported by others.

I've  never  seen  it  in an RFC - certainly not in the original email
related RFCs...

-- 
Cheers -- Marck D Pearlstone -- List moderator and fellow end user
TB! v9.1.18.3 (BETA) on Windows 10.0.18362 

pgp2WN6raN6HL.pgp
Description: PGP signature

Current version is 9.1.18 | 'Using TBUDL' information:
http://www.silverstones.com/thebat/TBUDLInfo.html


Re[2]: Strip greetings when replying

2020-05-11 Thread Andrew Savchenko
Hello Marck,

Monday, May 11, 2020, 8:53:20 PM, you wrote:

> There  are  2  more  QTs you need to complete the set for this to work
> properly.

Thanks, done. I wonder how you include it, on folder or account level? I 
have tested as the reply template for a folder - works fine now.

Have to check if this handy "styled-with-initials" kind of response is 
RFC'd / supported by others.


-- 
Regards,
A



Current version is 9.1.18 | 'Using TBUDL' information:
http://www.silverstones.com/thebat/TBUDLInfo.html


Re: Strip greetings when replying

2020-05-11 Thread Marck Pearlstone

On 11 May 2020 at 12:09 Andrew Savchenko wrote and made these points

AS> Monday, May 11, 2020, 8:08:00 PM, you wrote:

>> ,--/ Initials \--

AS> Getting there! Surprisingly, it returns ">Cfa" for all senders. Is this
AS> a normal PCRE? 

It is.

There  are  2  more  QTs you need to complete the set for this to work
properly.

,--/ Full Name \--
%Capital(%ABofromNAME(%QINCLUDE( "Full Name - No AB Entry")))
`--\ End /--

,--/ Full Name - No AB Entry \--
%SETPATTREGEXP="^(?(?=.*?\@)(.*?)\@|(.*)$)"%-
%REGEXPBLINDMATCH="%OFROMNAME"%-
%SUBPATT(1)%SUBPATT(2)
`--\ End /--

AS> Before I dig into it, is there a syntax highlighting for TB macros
AS> available? VIM, Notepad++, etc...

I've never seen one..

AS> Lastly, from a quick look, \5 group is unnecessary as it matches the
AS> domain name.

Very  likely  -  these are very old macros. They were probably written
around tb v3.

-- 
Cheers -- Marck D Pearlstone -- List moderator and fellow end user
TB! v9.1.18.3 (BETA) on Windows 10.0.18362 

pgp9aIlUlaO5o.pgp
Description: PGP signature

Current version is 9.1.18 | 'Using TBUDL' information:
http://www.silverstones.com/thebat/TBUDLInfo.html


Re[2]: Strip greetings when replying

2020-05-11 Thread Andrew Savchenko
Hello Marck,

Monday, May 11, 2020, 8:08:00 PM, you wrote:

> ,--/ Initials \--

Getting there! Surprisingly, it returns ">Cfa" for all senders. Is this
a normal PCRE? 

Before I dig into it, is there a syntax highlighting for TB macros
available? VIM, Notepad++, etc...

Lastly, from a quick look, \5 group is unnecessary as it matches the
domain name.


-- 
Regards,
A



Current version is 9.1.18 | 'Using TBUDL' information:
http://www.silverstones.com/thebat/TBUDLInfo.html


Re: Strip greetings when replying

2020-05-11 Thread Marck Pearlstone

On 11 May 2020 at 11:26 Andrew Savchenko wrote and made these points


AS> Not bad! Unfortunately does not work on HTML

I only use HTML in extremis - if I need to embed a pic or need tighter
formatting than plaintext can give me.

Any industrious soul fancy enhancing the macro for HTML?

AS> and returns
AS> ```
AS> Cannot find a quick template "Initials"
AS> ```

,--/ Initials \--
%SETPATTREGEXP="(?is)(\w).*?([-_=@\.\s]+(\w).*?)?([-_=@\.\s]+(\w).*?)?$"%-
%REGEXPBLINDMATCH="%QINCLUDE('Full Name')"%-
%SUBPATT(1)%-
%SUBPATT(3)%-
%SUBPATT(5)%-
`--\ End /--

AS> P.S. After using this Macro, TheBat! decided to re-download all mail. 
AS> Bizarre.

How peculiar.

-- 
Cheers -- Marck D Pearlstone -- List moderator and fellow end user
TB! v9.1.18.3 (BETA) on Windows 10.0.18362 

pgpfF5nakVqJI.pgp
Description: PGP signature

Current version is 9.1.18 | 'Using TBUDL' information:
http://www.silverstones.com/thebat/TBUDLInfo.html


Re[2]: Strip greetings when replying

2020-05-11 Thread Andrew Savchenko
Hello Marck,

Monday, May 11, 2020, 7:47:40 PM, you wrote:

> ,--/ I use this very mature example \--

Not bad! Unfortunately does not work on HTML and returns
```
Cannot find a quick template "Initials"
```

P.S. After using this Macro, TheBat! decided to re-download all mail. 
Bizarre.


-- 
Regards,
A



Current version is 9.1.18 | 'Using TBUDL' information:
http://www.silverstones.com/thebat/TBUDLInfo.html


Re: Strip greetings when replying

2020-05-11 Thread Marck Pearlstone

On 11 May 2020 at 11:08 Andrew Savchenko wrote and made these points

AS> How do *you* automatically detect and remove "greetings line" when 
AS> replying to a message?

,--/ I use this very mature example \--
%_inits="%Qinclude(Initials)"%-
%IF:"%QINCLUDE(ISBAT)"="":%-
"%QUOTESTYLE('=')":"%QUOTESTYLE('=%_inits')"
%cursor%-
%QUOTES='%SETPATTREGEXP="(?is)%-
((\s*)?\n?-BEGIN PGP SIGNED.*?\n(Hash:.*?\n)?\s*)?%-
(\s*)?%-
((Dear|Hi|Hello|Hey|Greetings|Howdy).{0,20}\n+)?%-
(-+[\S ]+\n+)?%-
%-
%-
(.*)\n+%-
%-
%-
^(%-
- --\s*\n|%-
--\s*\n|%-
_{40,}\s*\n|%-
Yahoo! Groups Links\n|%-
[\s\*]*EDIT YOUR POSTINGS[!\*\s]+\n|%-
-+ Yahoo! Groups Sponsor -+~-->\n|%-
\s*Kind regards,?\n|%-
\s*Love,?\n|%-
\s*Regards,?\n|%-
\s*Cheers,?\n|%-
-BEGIN PGP SIGNATURE.*s?\n|%-
Your use of|%-
Get your FREE download|%-
---\nOutgoing mail is certified Virus Free.|%-
\z)?"%-
%REGEXPBLINDMATCH(%TEXT)%-
%SUBPATT(8)'%-
`--\ End /--

-- 
Cheers -- Marck D Pearlstone -- List moderator and fellow end user
TB! v9.1.18.3 (BETA) on Windows 10.0.18362 

pgpW0J0ECl2Q8.pgp
Description: PGP signature

Current version is 9.1.18 | 'Using TBUDL' information:
http://www.silverstones.com/thebat/TBUDLInfo.html


Strip greetings when replying

2020-05-11 Thread Andrew Savchenko
Hello,

How do *you* automatically detect and remove "greetings line" when 
replying to a message?

I would think of %SETPATTREGEXP manipulation, but surely there are some
ready-made recipes out there.


-- 
Cheers,
A



Current version is 9.1.18 | 'Using TBUDL' information:
http://www.silverstones.com/thebat/TBUDLInfo.html