Module Ecaml.Thing_at_point

Support for detecting something at point---a filename, URL, what-have-you.

type t =
| Defun
| Email
| Filename
| Line
| List
| Number
| Page
| Sentence
| Sexp

(** Any string containing only characters in chars, which is a regexp character alternative (i.e. a string that would go between square brackets in a regexp). *)

| String_of of {
chars : string;
}
| Symbol
| Url
| Whitespace
| Word
include sig ... end
val sexp_of_t : t ‑> Base.Sexp.t
val find : ?⁠text_properties:bool ‑> t ‑> Text.t option

Find the given kind of thing at point, if any. If text_properties is false (which is the default), text properties are stripped from the returned string.

(describe-function 'thing-at-point)

val forward : ?⁠n:int ‑> t ‑> unit

(describe-function 'forward-thing)

val bounds : t ‑> (Position.t * Position.t) option

(describe-function 'bounds-of-thing-at-point)

val beginning : t ‑> unit

(describe-function 'beginning-of-thing)

val end_ : t ‑> unit

(describe-function 'end-of-thing)