proselint icon indicating copy to clipboard operation
proselint copied to clipboard

Reply-To: No hyphen is necessary… Actually, it is necessary.

Open kierun opened this issue 7 years ago • 11 comments

Using mutt with edit_headers="yes" and neovim with proselint, I get an error on the Reply-To: line - proselint: garner.phrasal_adjectives.ly No hyphen is necessary in[…].

How can I set up proselint to ignore this error?

kierun avatar Jul 26 '16 10:07 kierun

Try following this guide: https://github.com/amperser/proselint/tree/master/plugins/vim

The rule that you can disable is the garner.phrasal_adjectives.ly rule.

alexyorke avatar Jul 26 '16 13:07 alexyorke

@Decagon I am using proselint via neomake not syntastic so sadly that does not work for me.

kierun avatar Jul 26 '16 13:07 kierun

This is a great example of a false positive. The short-term solution is to add it as an exception to garner.phrasal_adjectives.ly. The long-term solution is automatically detecting that the document has special markup and turning off the irrelevant rules.

suchow avatar Jul 26 '16 20:07 suchow

And when you use it via neomake, do you still have a .proselintrc file? if so, you can add it to there manually by changing misc.phrasal_adjectives : true to misc.phrasal_adjectives: false

Also, could you check to see what version of proselint you are running? Because we deprecated that naming scheme (based on authors names) so that may make the previous advice more confusing if you do have an up-to-date version of proselint (since garner.phrasal_adjectives.ly doesn't exist).

mpacer avatar Jul 27 '16 23:07 mpacer

Also, @kierun, what is the actual test case that raised this error that falsely stated that it was unnecessary? Am i missing something or is that example not here? Is this a syntax specific detail about mutt?

Could you add a test for this case (or one similar to it) so that this is caught in the future? Is it specific to the headers for mutt? In that case it might be worth including in some of the other discussions around format specific rules.

mpacer avatar Jul 27 '16 23:07 mpacer

@michaelpacer In reverse order… When I start an email with mutt (with edit_headers="yes" option), it allows me to edit some of the header information directly. This is what I get in my neovim session for a new email:

From: First Last <[email protected]>
To:
Cc:
Bcc:
Subject:
Reply-To:


--
Signature…

If the message is a reply, the To:, Subject:, and Reply-To: fields are correctly filled in. For example, replying to your previous message via email gives me:

From:  First Last <[email protected]>
To: amperser/proselint <reply+002efd970e6d7cabeae8aea797e49f3c4e69e1f5646eabac92cf0000000113b10c7e92a169ce09fceb30@reply.github.com>
Cc:
Bcc:
Subject: Re: [amperser/proselint] Reply-To: No hyphen is necessary…   Actualy, it is necessary. (#555)
Reply-To:
In-Reply-To: <amperser/proselint/issues/555/[email protected]>

Quoth Michael Pacer on Wed, Jul 27, 2016 at 16:57:50 -0700
  > Also, @kierun, what is the actual test case that raised this error
[…]

Your test case could be just the above texts, although the only relevant bit is Reply-To:.

The version of proselint I use is 0.6.1 and I can confirm that the ~/.proselintrc change does work although it is not ideal since it is turning this off for all files, not just emails.

As a side note, I hate dyslexia! Could someone kindly correct the spelling mistake in the title? Thanks. :facepalm:

kierun avatar Jul 28 '16 06:07 kierun

@michaelpacer Oh, clearly the neovim file type for the files that mutt opens is mail.

kierun avatar Jul 28 '16 06:07 kierun

I don't think this is a issue of detecting markup (although of course detecting markup would fix it). The problem here is that reply isn't an adverb, so it shouldn't be flagged.

assembly-language libraries raises the same flag, and the issue is the same: assembly isn't an adverb.

cpitclaudel avatar Aug 27 '16 23:08 cpitclaudel

linking to issue #603

I would like to see one of my three pull requests commented on or accepted, before I begin working on this :)

j10sanders avatar Nov 15 '16 23:11 j10sanders

Bit of topic: Is it cost efficient for proselint to start detecting all possible markup languages? Ideally, I would want an editor that marks certain parts of the text as prose (such as the topic and body of the email, documentation comments inside code, all of a markdown, etc). And then the editor would only run proselint on those.

viccuad avatar Nov 16 '16 08:11 viccuad

Just hit the very same issue. I think there are actually 3 issues here:

  1. Confusion on how to disable a specific rule
  2. Some parts of a text can be "names"; Reply-To is the name of an email header, but the mentioned rule also triggers for a the simple sentence Please talk to Dr. Milly-Smith.. Such names can pop up in prose, so this is not related to a specific markup. proselint shouldn't mark such names as "wrong".
  3. "Reply" is not an adverb. Neither is "Milly" in the above example :)

Item 1 can be solved by "support" (maybe FAQ?). 2 is a generic issue with proselint, afaics. And 3 is an issue with misc.phrasal_adjectives (or garner.phrasal_adjectives.ly in older versions).

(Sorry, I don't have suggestions on good solutions, just wanted to help clear this up a bit ;)

schumar avatar Jan 17 '23 07:01 schumar