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

evil-bigword is not used anywhere and has no effect on forward-evil-WORD #1450

Open
dieggsy opened this issue Apr 7, 2021 · 1 comment · May be fixed by #1451
Open

evil-bigword is not used anywhere and has no effect on forward-evil-WORD #1450

dieggsy opened this issue Apr 7, 2021 · 1 comment · May be fixed by #1451

Comments

@dieggsy
Copy link
Contributor

dieggsy commented Apr 7, 2021

Issue type

  • Bug report

Environment

Emacs version: 28.0.50
Operating System: Arch Linux
Evil version: 1.14.0
Evil installation type: straight.el (source)
Graphical/Terminal: Both
Tested in a make emacs session (see CONTRIBUTING.md): No

Reproduction steps

  • Start Emacs
  • Load evil
  • change evil-bigword to e.g. "^ \t\r\n()"
  • Try cw with point at the begining of e.g. an-example)

Expected behavior

  • deletes up to ) and enters insert state

Actual behavior

  • deletes up to whitespace and enters insert state

Further notes

In this definition:

(defun forward-evil-WORD (&optional count)
  "Move forward COUNT \"WORDS\".
Moves point COUNT WORDS forward or (- COUNT) WORDS backward if
COUNT is negative. Point is placed after the end of the WORD (if
forward) or at the first character of the WORD (if backward). A
WORD is a sequence of non-whitespace characters
'[^\\n\\r\\t\\f ]', or an empty line matching ^$."
  (evil-forward-nearest count
                        #'(lambda (&optional cnt)
                            (evil-forward-chars "^\n\r\t\f " cnt))
                        #'forward-evil-empty-line))

The string "^\n\r\t\f " should be replaced with the variable evil-bigword (and the default value of that variable set to that string, as it contains one more whitespace character).

dieggsy added a commit to dieggsy/evil that referenced this issue Apr 7, 2021
@dieggsy dieggsy linked a pull request Apr 7, 2021 that will close this issue
@catarinacps
Copy link

Hopefully I'm not necrobumping this issue, but is there any update on it? I tried to find out how the 'evil-word vs 'evil-WORD symbols work with thing-at-point, but I did come short in regards to my elisp-fu. The linked pull request won't fix the issue, I'm afraid, as the mechanism for the forward and backward word vs WORD looks complex to me.

Anyways, it would be pretty cool if the feature had its intended effect though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants