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

symbol-highlight not working on words terminating with an apostrophe #3528

Closed
PierreR opened this issue Oct 23, 2015 · 9 comments
Closed

symbol-highlight not working on words terminating with an apostrophe #3528

PierreR opened this issue Oct 23, 2015 · 9 comments
Labels
Bug :-( stale marked as a stale issue/pr (usually by a bot)

Comments

@PierreR
Copy link
Contributor

PierreR commented Oct 23, 2015

symbol-highlight does not seem to work on words terminating with a ' (like foo').

How to reproduce it:

On a scratch buffer (or anywhere else):

  • enable automatic-symbol-highlight (SPC tha)
  • copy twice the word foo',
  • press * on one of them => symbol-highlight has zero match.
System Info
- OS: gnu/linux
- Emacs: 24.5.1
- Spacemacs: 0.105.0
- Spacemacs branch: haskell-indentation (rev. 94af1e2)
- Distribution: spacemacs
- Layers:
```elisp
(asciidoc auto-completion emacs-lisp erc dash dockerfile emacs-lisp extra-langs git markdown
          (haskell :variables haskell-enable-ghci-ng-support t haskell-enable-ghc-mod-support t)
          org
          (shell :variables shell-default-term-shell "/bin/zsh" shell-default-height 30 shell-default-position 'bottom)
          salt syntax-checking spell-checking puppet python version-control yaml)

Could be related with #2706

@StreakyCobra
Copy link
Contributor

Reproduced here. It's a bug because either:

  • Symbols don't contain ' and then the symbol is foo and it should recognize the other foo
  • Symbols contain ' and then the symbol is foo' and it should recognize the other foo'

@jb55
Copy link
Contributor

jb55 commented Feb 18, 2016

👋 codetriage time

Is this still an issue? If so how should we proceed?

@syl20bnr
Copy link
Owner

Well I suppose that's a bug to fix in the ahs package which is quite an old package, not sure there is a maintainer for it.
Or maybe that's not a bug in ahs and this is the major mode which does not define symbols correctly ?

@syl20bnr
Copy link
Owner

I suppose we are talking about Haskell here ?

@PierreR
Copy link
Contributor Author

PierreR commented Feb 20, 2016

The original bug is not Haskell related. As I mentioned it even happens in a scratch buffer when automatic-symbol-highlight is enabled. That said, the annoyance might be higher in Haskell as it is common to use ' at the end of names.

I could try again and see if it is still an issue with the latest version.

@gracjan
Copy link

gracjan commented Aug 7, 2016

Note that in haskell-mode we try really hard to put symbol constituent property on apostrophes that are symbol constituent, so inside or at the end of an identifier. What regexp does ahs use to find symbols?

@TheBB
Copy link
Contributor

TheBB commented Aug 7, 2016

(defconst ahs-default-symbol-regexp "^[0-9A-Za-z/_.,:;*+=&%|$#@!^?-]+$"
  "Default symbol regular expression.")

I'm not sure why this doesn't use \_<, \s_ and \_>

@gracjan
Copy link

gracjan commented Aug 7, 2016

So if there is somebody willing to customize ahs for Haskell all the info needed is in haskell-lexeme.el.

@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug :-( stale marked as a stale issue/pr (usually by a bot)
Projects
None yet
Development

No branches or pull requests

6 participants