Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add natural languages layer #5996

Open
JAremko opened this issue May 6, 2016 · 38 comments
Open

Add natural languages layer #5996

JAremko opened this issue May 6, 2016 · 38 comments
Labels
- Mailling list - Fixed in develop stale marked as a stale issue/pr (usually by a bot) Syntax-checking

Comments

@JAremko
Copy link
Collaborator

JAremko commented May 6, 2016

I think Spacemacs can benefit from a prose layer

It should Include something like spell check (we have it), grammar check, punctuation, sentence navigation/manipulation, translation, synonyms search etc. Looks like Emacs has it all [1], [2], [3], [4], [5].
We can organize the packages in one clear layer. But how to manage it? It's not like it should be enabled each time someone views txt, org, md, files. Might be wrap it in a "prose" minor mode?

Any suggestions? What should be in the layer. How to approach it ?

@JAremko JAremko changed the title Prose layer. Add prose layer May 6, 2016
@StreakyCobra
Copy link
Contributor

Somehow related: #5403

@JAremko
Copy link
Collaborator Author

JAremko commented May 6, 2016

@StreakyCobra And somehow I even commented there.

The table layout is broken on GitHub. Probably because it has a gap - | should be --|

Then 👽 come and wiped my mind. 😄

@mkcode
Copy link
Contributor

mkcode commented May 8, 2016

@JAremko - I think we should continue to use this issue as the overall discussion for a prose layer. Any single PR would only be a piece of it.

I left from documentation of current issues with proselint-flycheck here: https://github.com/mkcode/spacemacs/blob/95539151fd5c3f289f47aa94b1ff02c3306df89e/layers/prose/README.org#current-issues.

Any suggestions? What should be in the layer. How to approach it ?

There are so many different ways to go with a general prose mode, like you showed with the 5 links in the top post. We should check out https://github.com/bnbeckwith/writegood-mode and https://github.com/sachac/artbollocks-mode. My choice of what to do next would be to fix the flyicheck-next issue (described in readme) so we run proselint at the same time as other flycheckers and then therefore I can leave it running all the time.

Also, I'm certain that I would like the prose layer to be developed in a way where we could use it in any text or prog modes. Whatever feedback I want for writing, I would like everywhere, including in my long form code comments.

Btw - Most likely I will not be able to contribute the amount of time required to make this really nice so please, anyone else can pick this up.

@JAremko
Copy link
Collaborator Author

JAremko commented May 14, 2016

WIP wishlist. I think we can put most of it behind SPC x (text) and SPC t (toggle)

  • wordsmith-mode highlight nouns, verbs.
  • babel provides an Emacs interface to different translation
    services available on the Internet. - google translate doesn't work sometimes, should be more reliable + more choice.
  • dictcc translation with helm
    interface. I'll compare it with babel and see if it has big decent amount of non-overlapping features.
  • helm-flyspell Helm extension for correcting words with Flyspell.
  • langtool based on http://www.languagetool.org/ - will check it out.
  • synosaurus Synosaurus is a thesaurus fontend for Emacs with pluggable backends.
  • helm-dictionary look up words in local (offline) dictionaries. It also provides short-cuts for various online dictionaries.
  • define-word lets you see the definition of a word or a phrase at point, powered by http://wordnik.com/
  • typo insert typographically useful unicode characters.

Also hookup company-ispell and mb look at ac-ispell

And the layers documentation probably should have references for other really useful stuff that Spacemacs provides like org-mode. avy for buffer and window navigation.

Not sure if all this stuff should go into a single layer.

@mkcode
Copy link
Contributor

mkcode commented May 17, 2016

@JAremko - Great brainstorming! All of this would be awesome.

When I think about how I would want to use it, I think I would prefer turning everything on or off on one toggle and having config variable for the individual components. Almost as if it were a text proofing (vim-ish) mode. I don't think I would want have each piece on an individual key toggle.

Yay? Nay?

@JAremko
Copy link
Collaborator Author

JAremko commented May 17, 2016

Yay!
But most of the tools do not need to be toggled on/off.

  • I think wordsmith-mode should be used as a separate "debugging" tool for prose.
  • Looks like dictcc overlaps too much with babel we can go with babel and see if we need something else down the road. Also I'm not sure why we have google-translate in the +distribution @syl20bnr can we remove it in favor of having babel in the natural languages layer? Or might be replace it with babel in +distribution It looks like google-translates.el exploits translate.google.com in the unintended way so it often breaks. If babel works well we will have more back-ends so it should be more reliable in a long run.
  • langtool Haven't tested it yet but looks exciting.
  • synosaurus, typo, helm-dictionary, define-word don't need to be toggled. helm-dictionary and define-word might overlap so we can start with helm-dictionary only.
  • company-ispell and ac-ispell need be toggleable, or at least deasablable in configs. Many people find stuff like this annoying 😄

Btw I think we should take auto-completion layer as a guideline - it's a Spacemacs'es way to hook up stuff to different modes. We can do the same with flycheck-proselint and similar stuff. But it will take some engineering. Relevant discussing. Also need @syl20bnr feedback 😕
Spacemacs has flyspell-correct so helm-flyspell isn't needed.

@JAremko JAremko changed the title Add prose layer Add natural languages layer May 17, 2016
@mkcode
Copy link
Contributor

mkcode commented May 18, 2016

But most of the tools do not need to be toggled on/off.

Sweet! Even better

google-translate in the +distribution

Great idea with moving that. I'm sure our wonderful overlord @syl20bnr will appreciate that organization.

Btw I think we should take auto-completion layer as a guideline

Good call. 👍

@syl20bnr
Copy link
Owner

syl20bnr commented May 18, 2016

I'm all for a prose layer which will replace the spacemacs-language layer included in the distribution.
Mmmmmh looks to me that we can consider prose to be like a programming language, so:

  • company-ispell is enabled by adding the auto-completion layer.
  • flycheck-proselint is enabled by adding the syntax-checking layer.

@JAremko
Copy link
Collaborator Author

JAremko commented May 18, 2016

@syl20bnr Thanks! Should we keep Natural languages name or rename it back to prose ? I'm thinking, what if we'll want to add something to write poems about Spacemacs ? 😄

@TheBB
Copy link
Collaborator

TheBB commented May 18, 2016

The typography layer packages can also be considered for moving to this one.

@JAremko
Copy link
Collaborator Author

JAremko commented May 18, 2016

@TheBB Thanks! Didn't know we have that and that it has typo

@JAremko
Copy link
Collaborator Author

JAremko commented May 18, 2016

Let's brainstorm TODO:

  • Merge typography layer to Natural languages layer.
  • Add new tools to it and merge stuff from spacemacs-language.
  • Add company-ispell to the layer (and ac-ispell ?) and turn it on if auto-completion layer is used and remove ac-ispell from auto-completion layer
  • Add flycheck-proselint to the layer and use it if syntax-checking layer if used.
  • ...
  • Kudos!

@JAremko
Copy link
Collaborator Author

JAremko commented May 18, 2016

updated TODO draft.

@syl20bnr
Copy link
Owner

@JAremko I like prose because it is short and only one word.

@JAremko
Copy link
Collaborator Author

JAremko commented May 18, 2016

Ok I'll rename it and do some of the stuff in the list 2day.

@syl20bnr
Copy link
Owner

... task done !

@JAremko
Copy link
Collaborator Author

JAremko commented May 18, 2016

@mkcode I was thinking how to better organize the layer so it will be maximally extensible.
What do you think about this ? JAremko@8abdda3
Removed typographic layer and moved its packages to the layer JAremko@027fff5 Will need to work on documentation.
Added new packages (WIP) JAremko@4b65fd4 spacemacs-language layer has define-word(will be easy to move) and google-translate (we probably can drop it in favor of babel) also it's a lot of code to be moved/removed.

Haven't tested it yet. But should work, in theory. Also not sure what modes should have individual toggles. And if they don't need them we probably should remove their lighters.

@JAremko
Copy link
Collaborator Author

JAremko commented Sep 17, 2016

also https://www.emacswiki.org/emacs/BookmarkPlus might be really nice to integrate with all of this. At least mention it in the documentation.

@deb0ch
Copy link
Contributor

deb0ch commented Sep 19, 2016

I don't understand why Bookmarks+ should be part of this layer ?

Maybe I'm not understanding well the purpose of Bookmarks+ or the purpose of this layer, but I don't see the relation.

@JAremko
Copy link
Collaborator Author

JAremko commented Sep 19, 2016

@deb0ch I think the ability to mark your text, visualize and manage marks is a pretty useful feature for a writer.

But It might be not a part of this layer but at least mentioned in the workflow section (We need it for this layer I think)

@deb0ch
Copy link
Contributor

deb0ch commented Sep 19, 2016

Isn't it also for regular code ?

@JAremko
Copy link
Collaborator Author

JAremko commented Sep 21, 2016

Isn't it also for regular code ?

For now I'm pretty much throwing all the potentially related stuff here then (We kinda waiting for flycheck/flycheck#939 I think) we can decide what goes where 😄

Btw https://www.gnu.org/software/emacs-muse/ and https://github.com/rnkn/fountain-mode/

@JAremko
Copy link
Collaborator Author

JAremko commented Sep 21, 2016

Anyway it will be really hard to organize all this. Simply thinking about it makes me procrastinate...

@jdriordan
Copy link

Seeing as the flycheck PR for proselint has been open for about a year, maybe in the interim that checker could just be enabled manually?

@andrewSteer
Copy link

I see nothing in Spacemacs that I want more than this layer. One question and one suggestion.

Suggestion first: if this layer ever happens to be born, consider this package: http://oremacs.com/2015/05/22/define-word/

Question: is it currently possible to at least use proselint with current version of Spacemacs (for latex files)?

@brorbw
Copy link

brorbw commented Sep 13, 2018

This would be awesome!

@viccuad
Copy link
Contributor

viccuad commented Sep 13, 2018

The proselint flycheck was accepted in flycheck in sept 2017, if one wants to have proselint on some mode on spacemacs, it's just a matter of enabling in whatever modes you want:

;; enable proselint in textual modes:
(add-hook 'markdown-mode-hook #'flycheck-mode)
(add-hook 'text-mode-hook #'flycheck-mode)
(add-hook 'message-mode-hook #'flycheck-mode)

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label Feb 29, 2020
@treymerkley
Copy link
Contributor

Hey first time I've done something good by necroing. Before I used Spacemacs I loved using Textlint to hammer down ideal text. I would love this or a similar feature.

@JAremko
Copy link
Collaborator Author

JAremko commented Mar 3, 2020

@travisbhartwell there is https://www.macs.hw.ac.uk/~rs46/posts/2018-12-29-textlint-flycheck.html 🤔

@nixmaniack
Copy link
Contributor

This is in top 10 issues with respect to number of 👍. So keep this open!

@duianto duianto removed the stale marked as a stale issue/pr (usually by a bot) label Mar 8, 2020
@duianto
Copy link
Collaborator

duianto commented Mar 8, 2020

Here are at least two related pending PRs:
Add natural layer #6012
Add a layer for LanguageTool support #8899
(they are linked between the previous comments, but this might make them easier to find)

@duianto
Copy link
Collaborator

duianto commented Sep 17, 2020

The following PRs changes have been applied to the develop branch:
Add a layer for LanguageTool support #8899

@hyiltiz
Copy link

hyiltiz commented Sep 20, 2020

Trying to figure out how to use this merged PRs. Anyone got any idea which layers to add and how to configure for which languages, download what dictionary/thesaurus etc.?

@real-or-random
Copy link
Contributor

The layer is called languagetool. Try SPC h l (helm-spacemacs-help-layers).

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label Mar 14, 2022
@real-or-random
Copy link
Contributor

Not sure if this should be closed or not. Languatool is now in but there's more on the wishlist: #5996 (comment)

I'm not implying that the entire wishlist needs to be worked on (and this was 6 years ago). Probably someone would need to create a new wishlist with new packages, and then one could see which ones we want and which ones not.

Or if all this is too vague, we could close the issue. But I think the comment is still true -- spacemacs would profit from more sophisticated natural language tools.

@github-actions github-actions bot removed the stale marked as a stale issue/pr (usually by a bot) label Mar 17, 2022
Copy link

github-actions bot commented May 1, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- Mailling list - Fixed in develop stale marked as a stale issue/pr (usually by a bot) Syntax-checking
Projects
Mailing list
  
Pending merge
Development

No branches or pull requests