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

Emacs fixes: log arguments in merlin-debug-last-commands, compute line offsets correctly #981

Merged
merged 3 commits into from
Jun 24, 2019

Conversation

let-def
Copy link
Contributor

@let-def let-def commented Jun 24, 2019

The first patch will help debugging emacs related problems.
The second patch fixes #975: (current-column) is a "visual notion" (it depends on the width of tabs), which makes sense only inside emacs, while (- (point) (line-beginning-position)) will compute the offset as a number of character.

Frédéric Bour added 2 commits June 24, 2019 16:31
This reverts commit 8d55864.
The list is encoded this way to allow the 'setcdr' mutation three lines
below:
- the message with a nil field is added to the log buffer
- after getting an answer, this field is mutated to store its content

The benefit is that we still get an entry in the log buffer even if the
mode crashes before getting an answer.
This is ugly, but fit on 3 lines :O.
@let-def
Copy link
Contributor Author

let-def commented Jun 24, 2019

I just realized that it is probably wrong if we have multiple byte characters in the line, for instance in a string or a comment :'(

@let-def
Copy link
Contributor Author

let-def commented Jun 24, 2019

Changing the example to:

let foo = 1
(*おねがいします*)	let baz = foo

broke it again.
The last patch fixes that case.

Copy link
Contributor

@trefis trefis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C'est beau comme du Verlaine.

@let-def let-def merged commit a20a0e5 into master Jun 24, 2019
let-def pushed a commit to let-def/opam-repository that referenced this pull request Jul 9, 2019
CHANGES:

Tue Jul  9 17:34:42 CEST 2019

  + backend
    - `**` globbing in .merlin won't look into hidden directories
      (starting with a '.') (by Daniel Bünzl, ocaml/merlin#990)
    - fallback to "/dev/null" configuration for findlib
    - better 4.08 support:
      + support for letop (let+, and+, ...) (ocaml/merlin#986)
      + fix parsing recovery for 4.08 constructions (ocaml/merlin#987)
      + catch an exception raised by 4.08 Printtyp trying to rename a
        persistent identifier (ocaml/merlin#991)
    - locate: treat local locations differently from external locations (coming
      from a cmi), this fixes "jump to definition" on mutually recursive
      bindings (ocaml/merlin#984)
    - when completing an infix operator in a sub-module, wrap with () (ocaml/merlin#992)
  + editor modes
    - emacs
      + fix position computation in presence of tabs or multi-byte characters (ocaml/merlin#981)
      + log arguments in "merlin-debug-last-commands" (ocaml/merlin#981)
    - vim
      + install reason.vim file (by Hezekiah M. Carty, ocaml/merlin#974)
let-def pushed a commit to let-def/opam-repository that referenced this pull request Jul 15, 2019
CHANGES:

Mon Jul 15 11:10:35 CEST 2019

  + backend
    - `**` globbing in .merlin won't look into hidden directories
      (starting with a '.') (by Daniel Bünzl, ocaml/merlin#990)
    - fallback to "/dev/null" configuration for findlib
    - better 4.08 support:
      + support for letop (let+, and+, ...) (ocaml/merlin#986)
      + fix parsing recovery for 4.08 constructions (ocaml/merlin#987)
      + catch an exception raised by 4.08 Printtyp trying to rename a
        persistent identifier (ocaml/merlin#991)
    - locate: treat local locations differently from external locations (coming
      from a cmi), this fixes "jump to definition" on mutually recursive
      bindings (ocaml/merlin#984)
    - when completing an infix operator in a sub-module, wrap with () (ocaml/merlin#992)
    - disable arity checks on externals (for Bucklescript compatibility)
    - remove parser preprocessing (simplify compilation for OCaml < 4.08) (ocaml/merlin#997)
  + editor modes
    - emacs
      + fix position computation in presence of tabs or multi-byte characters (ocaml/merlin#981)
      + log arguments in "merlin-debug-last-commands" (ocaml/merlin#981)
    - vim
      + install reason.vim file (by Hezekiah M. Carty, ocaml/merlin#974)
let-def pushed a commit to let-def/opam-repository that referenced this pull request Jul 15, 2019
CHANGES:

Mon Jul 15 11:10:35 CEST 2019

  + backend
    - `**` globbing in .merlin won't look into hidden directories
      (starting with a '.') (by Daniel Bünzl, ocaml/merlin#990)
    - fallback to "/dev/null" configuration for findlib
    - better 4.08 support:
      + support for letop (let+, and+, ...) (ocaml/merlin#986)
      + fix parsing recovery for 4.08 constructions (ocaml/merlin#987)
      + catch an exception raised by 4.08 Printtyp trying to rename a
        persistent identifier (ocaml/merlin#991)
    - locate: treat local locations differently from external locations (coming
      from a cmi), this fixes "jump to definition" on mutually recursive
      bindings (ocaml/merlin#984)
    - when completing an infix operator in a sub-module, wrap with () (ocaml/merlin#992)
    - disable arity checks on externals (for Bucklescript compatibility)
    - remove parser preprocessing (simplify compilation for OCaml < 4.08) (ocaml/merlin#997)
  + editor modes
    - emacs
      + fix position computation in presence of tabs or multi-byte characters (ocaml/merlin#981)
      + log arguments in "merlin-debug-last-commands" (ocaml/merlin#981)
    - vim
      + install reason.vim file (by Hezekiah M. Carty, ocaml/merlin#974)
@trefis trefis deleted the emacs-fixes branch July 15, 2019 12:52
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 this pull request may close these issues.

merlin-locate is confused by tabs (not a valid identifier)
2 participants