Giter VIP home page Giter VIP logo

Comments (7)

jcs090218 avatar jcs090218 commented on June 2, 2024

Here are few points that you can check to see if this plugin is working.

  1. Make sure flymake-mode is enabled.
  2. Ensure you called flymake-grammarly-load somewhere after buffer is loaded.

If you still having issue. Try setting flymake-grammarly--show-debug-message to t and see what the debug message says!

Thanks! 😄

from flymake-grammarly.

tmalsburg avatar tmalsburg commented on June 2, 2024

I have tried it the way you describe it, but it still didn't work. When I enable debug messages, I get

Flymake mode enabled in current buffer
[INFO] Reset grammarly requests!
[INFO] Start connecting to Grammarly API...
[INFO] Receiving data from grammarly, level (0) : {"sid":1,"isEnterprise":false,"defaultDocumentContext":{"domain":"general","goals":[],"audience":"knowledgeable","style":"neutral","emotions":[],"dialect":"american"},"userMutedCategories":[],"action":"start","id":0}
[INFO] Receiving data from grammarly, level (0) : {"rev":0,"action":"submit_ot","id":0}
[INFO] Receiving data from grammarly, level (0) : {"point":"WPCArticle","transforms":["\u003cspan class\u003d\u0027gr_grammar_ins\u0027\u003ea\u003c/span\u003e dummy"],"title":"Incorrect article use","minicardTitle":"Correct article usage","result":"","details":"\u003cp\u003eAn article is a short word like \u003ci\u003ea\u003c/i\u003e or \u003ci\u003ethe\u003c/i\u003e that goes before a noun to make it clear what the noun refers to. You should use an article with a singular countable noun like \u003ci\u003eperson, house, apple,\u003c/i\u003e or \u003ci\u003ebook\u003c/i\u003e. Articles are sometimes (but not always) needed before plural nouns, proper nouns, or uncountable nouns.\n","explanation":"\u003cp\u003eIt seems that article use may be incorrect here.\n","examples":"\u003cp\u003e\u003cspan class\u003d\"red\"\u003eIncorrect: Sam fixed \u003cb\u003eproblem\u003c/b\u003e.\u003c/span\u003e\u003cbr/\u003e\u003cspan class\u003d\"green\"\u003eCorrect: Sam fixed \u003cb\u003ethe problem\u003c/b\u003e.\u003c/span\u003e\u003cbr/\u003e\u003cp\u003e\u003cspan class\u003d\"red\"\u003eIncorrect: This is \u003cb\u003ewaste\u003c/b\u003e of time!\u003c/span\u003e\u003cbr/\u003e\u003cspan class\u003d\"green\"\u003eCorrect: This is \u003cb\u003ea waste\u003c/b\u003e of time!\u003c/span\u003e\u003cbr/\u003e","todo":"correct article usage","handbookLink":"","sentence_no":0,"free":true,"category":"Determiners","pid":983117,"rid":983117,"sid":2161727,"begin":24,"end":24,"text":"","group":"Grammar","pname":"Grammar/Determiners/WPCArticle/WPCMissingArticle","phash":"ECEC71A29988D70A2489BB7A0A9B1ADE","pversion":"1.0.9965","rev":0,"highlightBegin":24,"highlightEnd":29,"highlightText":"dummy","replacements":["a "],"transformJson":{"context":{"s":14,"e":37},"highlights":[{"s":10,"e":15}],"alternatives":[{"ops":[{"retain":10},{"insert":"a","attributes":{"type":"main"}},{"insert":" "},{"retain":5,"attributes":{"type":"important"}}]}]},"impact":"critical","extra_properties":{"priority":"2","j":"0.5729191984851768"},"cardLayout":{"category":"General","group":"Grammar","groupDescription":"Corrects grammatical errors","rank":20,"outcome":"Correctness","outcomeDescription":"Corrects misspellings, grammatical errors, missing and misused punctuation. Checks for natural phrasing and good word choice.","outcomeRank":10,"bundle":"Fix spelling and grammar","bundleRank":10},"categoryHuman":"Determiner use (a/an/the/this, etc.)","cost":1,"view":"priority","inline":"inline","action":"alert","id":4}
[INFO] Receiving data from grammarly, level (1) : {"point":"ComplexSent","transforms":["1500s\u003cspan class\u003d\u0027gr_grammar_del\u0027\u003e,\u003c/span\u003e"],"title":"Unnecessary comma in complex sentence","minicardTitle":"Remove the comma","result":"","details":"\u003cp\u003eA complex sentence includes one independent clause and at least one dependent clause. When the dependent clause comes first, it is an introductory clause followed by a comma. When it follows the independent clause, no comma is needed. A dependent clause often begins with a dependent marker word, such as \u003ci\u003eafter\u003c/i\u003e, \u003ci\u003eas if\u003c/i\u003e, \u003ci\u003ebecause\u003c/i\u003e, \u003ci\u003eeven though\u003c/i\u003e, \u003ci\u003esince\u003c/i\u003e, \u003ci\u003eunless\u003c/i\u003e, or \u003ci\u003ewhen\u003c/i\u003e.\n","explanation":"\u003cp\u003eIt appears that you have an unnecessary comma before the dependent clause marker \u003cb\u003ewhen\u003c/b\u003e. Consider removing the comma.\n","examples":"\u003cp\u003e\u003cspan class\u003d\"grey\"\u003eThe dependent clause is in bold in the following complex sentences. No comma is required for the construction independent clause + dependent clause.\u003c/span\u003e\u003cbr/\u003e\u003cspan class\u003d\"green\"\u003eCorrect: He was late for work \u003cb\u003ebecause he had a flat tire\u003c/b\u003e.\u003c/span\u003e\u003cbr/\u003e\u003cspan class\u003d\"green\"\u003eCorrect: Tim’s heart raced \u003cb\u003ewhenever she was near\u003c/b\u003e.\u003c/span\u003e\u003cbr/\u003e\u003cspan class\u003d\"green\"\u003eCorrect: The manager offered a discount \u003cb\u003eafter I complained about the service\u003c/b\u003e.\u003c/span\u003e\u003cbr/\u003e","todo":"remove the comma","handbookLink":"","sentence_no":0,"free":true,"category":"CompPunct","pid":1084543,"rid":1084543,"sid":2161727,"begin":153,"end":154,"text":",","group":"Punctuation","pname":"Punctuation/CompPunct/ComplexSent/Case1","phash":"10FB10FACF2545709A2C63F04F3290C5","pversion":"1.0.9972","rev":0,"highlightBegin":148,"highlightEnd":154,"highlightText":"1500s,","replacements":[""],"transformJson":{"context":{"s":138,"e":162},"highlights":[{"s":10,"e":16}],"alternatives":[{"ops":[{"retain":10},{"retain":5,"attributes":{"type":"important"}},{"delete":1,"attributes":{"type":"main"}}]}]},"impact":"critical","extra_properties":{"priority":"2","j":"0.3301163109555432"},"cardLayout":{"category":"General","group":"Punctuation","groupDescription":"Corrects missing and misused punctuation","rank":30,"outcome":"Correctness","outcomeDescription":"Corrects misspellings, grammatical errors, missing and misused punctuation. Checks for natural phrasing and good word choice.","outcomeRank":10,"bundle":"Fix spelling and grammar","bundleRank":10},"categoryHuman":"Punctuation in compound/complex sentences","cost":1,"view":"priority","inline":"inline","action":"alert","id":5}
[INFO] Receiving data from grammarly, level (2) : {"emotions":[{"emoji":"🤷","emojiId":"1f937","name":"uncertain","confidence":0.999999463558197},{"emoji":"👔","emojiId":"1f454","name":"formal","confidence":0.8599994778633118}],"hidden":false,"correlationId":"318e3677-15c0-40e8-ad20-f873d594ac98","action":"emotions"}
[INFO] Receiving data from grammarly, level (2) : {"sid":1,"rev":0,"score":56,"outcomeScores":{"Engagement":1.0,"GeneralScore":0.94,"Correctness":0.95,"Tone":1.0,"Clarity":1.0},"generalScore":94,"removed":[],"dialect":"american","foreign":false,"action":"finished"}
[INFO] Reset grammarly requests!

So it seems that recommendations from grammerly are being received but not displayed in the mini-buffer for some reason.

from flymake-grammarly.

jcs090218 avatar jcs090218 commented on June 2, 2024

Sorry for the inconvenience! I do notice this issue, and yet this is my very first flymake plugin. My first guess this would be a bug from flymake and not from the package itself. But I could be wrong to this, since I don't know how exactly flymake plugin suppose to be made. 😕

from flymake-grammarly.

jcs090218 avatar jcs090218 commented on June 2, 2024

Oh, wait! Once I called one of these function then the error message appears.

  • flymake-goto-prev-error
  • flymake-goto-next-error

Sorry that I am not very familiar to flymake. 😅

from flymake-grammarly.

tmalsburg avatar tmalsburg commented on June 2, 2024

I don't know why, but it's working now. Great, thanks for sharing this package!

I recently wrote something similar, an Emacs package that uses a remote cloud service to translate text: https://github.com/tmalsburg/txl.el

from flymake-grammarly.

tmalsburg avatar tmalsburg commented on June 2, 2024

Do I understand correctly that the whole buffer content is submitted to grammarly every time I type something? I'm trying it with a larger document and it is really slow. The document also contains programming code (org babel) and that code it probably submitted as well? I wonder whether it could be sped up by just submitting the current paragraph? Not sure whether that is supported by flymake.

from flymake-grammarly.

jcs090218 avatar jcs090218 commented on June 2, 2024

Do I understand correctly that the whole buffer content is submitted to grammarly every time I type something? I'm trying it with a larger document and it is really slow. The document also contains programming code (org babel) and that code it probably submitted as well? I wonder whether it could be sped up by just submitting the current paragraph? Not sure whether that is supported by flymake.

Yeah, you are correct! I think I can make the cache system inside flymake, so I don't need to send the whole buffer through the internet. Can you open another issue so maybe we can discuss over there? And so I can check what are un-done yet. Thanks!

from flymake-grammarly.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.