robertklep / quotefixformac

QuoteFix for Apple Mail —
https://github.com/robertklep/quotefixformac/releases/latest
191 stars 15 forks source link

Deletes quoted text #58

Open Jmuccigr opened 8 years ago

Jmuccigr commented 8 years ago

Just realized by hitting cmd-Z (undo) that QuoteFix is sometimes deleting text in a reply. Here's an example. Before QuoteFix does its thing:


On 4 Jan 2016, at 11:11 , Interlibrary Loan Department <ill@someplace.edu> wrote:

Dear John,
This message is in regards to the following item you requested through ILL:
-----------------------------------------------------------
Item Title: Pagani e cristiani. 7
Pub. Date: 2008
Journal Volume:    Issue:    Pages: 
Article/Chapter Title:
Author: Corti, Carla
ILL Transaction Number: 53753
-----------------------------------------------------------

Unfortunately,the only library that I found that has this volume is in Germany, and they have no policies listed as to whether or not they loan internationally.  I can try to contact them, but I'm sure there would be a hefty charge if in fact they are willing to send.

Let us know how you would wish to continue.

-----------------------------------------------------------
Contact ILL
-----------------------------------------------------------
If you have any questions about this or any other request, please email us at ill@someplace.edu or call us at. Please include Transaction Number 53753 in your communication with us.

Thank you for using  ILL.

John

where all the text starting from "Dear John" down to "Let us know..." is quoted by Mail.app.

Here's what results after QuoteFix:

On 4 Jan 2016, at 11:11 , Interlibrary Loan Department <ill@someplace.edu> wrote:

Dear John Muccigrosso,
This message is in regards to the following item you requested through ILL:

John

Where the text quoted by Mail.app is reduced to just the first two lines.

The options I have checked for QuoteFix are:

Always remove trailing whitespace, Keep whitespace..., and Remove attachment placeholders. Unchecking them makes no difference. If I check the Remove last occurrence, I get all the text down to the Contact ILL. Checking Don't remove sender's signature solves the problem. This makes me think that QuoteFix is thinking that the line of hyphens indicates the start of the sender's sig.

I'm not sure there's an easy way around this.

robertklep commented 8 years ago

The default setting of QF will regard any line with (at least) two hyphens as a signature separator, which—as you already found—may be a bit too liberal for some e-mails.

In the Advanced settings, you can enter a custom regular expression to override the default. Try and see if the following works better for you:

(?i)^\s*--(?:&nbsp;|\s+|\xa0)?$
alvarnell commented 8 years ago

My impression has always been that signature separators were supposed to be two hyphens followed by a space.

-Al-

Al Varnell Mountain View, CA

On Mon, Jan 04, 2016 at 11:41 AM, Robert Klep wrote:

The default setting of QF will regard any line with (at least) two hyphens as a signature separator, which—as you already found—may be a bit too liberal for some e-mails.

In the Advanced settings, you can enter a custom regular expression to override the default. Try and see if the following works better for you:

(?i)^\s*--(?: |\s+|\xa0)?$

robertklep commented 8 years ago

@alvarnell you're quite right.

However, the number of people that actually know (and therefore use) that construct is, sadly, pretty small.