* [Caml-list] merlin and TAB characters
@ 2016-08-29 17:50 Matej Kosik
2016-08-29 20:35 ` Frédéric Bour
0 siblings, 1 reply; 2+ messages in thread
From: Matej Kosik @ 2016-08-29 17:50 UTC (permalink / raw)
To: OCaml Mailing List
Dear all,
I use Merlin for displaying types of terms or for jumping to the definition of various terms/types.
This normally works as long as a given identifier/term is not preceded by TAB characters.
If there are some TAB characters, Merlin's usability is degraded.
As a non-invasive solution, is there a way how I could tell Merlin how my Emacs interprets TAB characters so that it interprets it in a consistent way?
(i.e. it will assume that TAB character moves the cursor by 8, not 1, positions to the right).
Thank you in advance for help.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Caml-list] merlin and TAB characters
2016-08-29 17:50 [Caml-list] merlin and TAB characters Matej Kosik
@ 2016-08-29 20:35 ` Frédéric Bour
0 siblings, 0 replies; 2+ messages in thread
From: Frédéric Bour @ 2016-08-29 20:35 UTC (permalink / raw)
To: Matej Kosik; +Cc: OCaml Mailing List
[-- Attachment #1: Type: text/plain, Size: 1267 bytes --]
Evaluating this (to update the definition that merlin mode uses) should
fix your problem:
(defun merlin/unmake-point (point)
"Destruct POINT to line / col."
(save-excursion
(goto-char point)
(beginning-of-line)
`((assoc . nil) (line . ,(line-number-at-pos nil)) (col . ,(- point
(point))))))
We will ship this fix in the next version.
On Mon, Aug 29, 2016 at 6:50 PM, Matej Kosik
<5764c029b688c1c0d24a2e97cd764f@gmail.com> wrote:
> Dear all,
>
> I use Merlin for displaying types of terms or for jumping to the
> definition of various terms/types.
> This normally works as long as a given identifier/term is not
> preceded by TAB characters.
> If there are some TAB characters, Merlin's usability is degraded.
>
> As a non-invasive solution, is there a way how I could tell Merlin
> how my Emacs interprets TAB characters so that it interprets it in a
> consistent way?
> (i.e. it will assume that TAB character moves the cursor by 8, not 1,
> positions to the right).
>
> Thank you in advance for help.
>
> --
> Caml-list mailing list. Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
[-- Attachment #2: Type: text/html, Size: 2218 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-08-29 20:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-29 17:50 [Caml-list] merlin and TAB characters Matej Kosik
2016-08-29 20:35 ` Frédéric Bour
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox