File: thingatpt.el.html

This file provides routines for getting the "thing" at the location of point, whatever that "thing" happens to be. The "thing" is defined by its beginning and end positions in the buffer.

The function bounds-of-thing-at-point finds the beginning and end positions by moving first forward to the end of the "thing", and then backwards to the beginning. By default, it uses the corresponding forward-"thing" operator (e.g. forward-word, forward-line).

Special cases are allowed for using properties associated with the named
"thing":

  forward-op Function to call to skip forward over a "thing" (or
                     with a negative argument, backward).

  beginning-op Function to call to skip to the beginning of a "thing".
  end-op Function to call to skip to the end of a "thing".

For simple things, defined as sequences of specific kinds of characters, use macro define-thing-chars.

Reliance on existing operators means that many things can be accessed
without further code: eg. (thing-at-point 'line) (thing-at-point 'page)

Defined variables (16)

bounds-of-thing-at-point-provider-alistAlist of providers to return the bounds of a "thing" at point.
forward-thing-provider-alistAlist of providers for moving forward to the end of the next "thing".
thing-at-point-beginning-of-url-regexpRegexp matching the beginning of a well-formed URI.
thing-at-point-decimal-regexpA regexp matching a decimal number.
thing-at-point-default-mail-uri-schemeDefault scheme for ill-formed URIs that look like <foo@example.com>.
thing-at-point-email-regexpA regular expression probably matching an email address.
thing-at-point-file-name-charsCharacters allowable in filenames.
thing-at-point-hexadecimal-regexpA regexp matching a hexadecimal number.
thing-at-point-markedup-url-regexpRegexp matching a URL marked up per RFC1738.
thing-at-point-newsgroup-headsUsed by ‘thing-at-point-newsgroup-p’ if gnus is not running.
thing-at-point-newsgroup-regexpRegexp matching a newsgroup name.
thing-at-point-provider-alistAlist of providers for returning a "thing" at point.
thing-at-point-short-url-regexpRegexp matching a URI without a scheme component.
thing-at-point-uri-schemesList of URI schemes recognized by ‘thing-at-point-url-at-point’.
thing-at-point-url-path-regexpRegexp matching the host and filename or e-mail part of a URL.
thing-at-point-uuid-regexpA regular expression matching a UUID.

Defined functions (35)

beginning-of-sexp()
beginning-of-thing(THING)
bounds-of-thing-at-mouse(EVENT THING)
bounds-of-thing-at-point(THING)
bounds-of-thing-at-point-for-char-property(PROPERTY)
define-thing-chars(THING CHARS)
end-of-sexp()
end-of-thing(THING)
form-at-point(&optional THING PRED)
forward-thing(THING &optional N)
forward-thing-for-char-property(PROPERTY &optional BACKWARD)
in-string-p()
list-at-point(&optional IGNORE-COMMENT-OR-STRING)
number-at-point()
read-from-whole-string(ARG1)
sentence-at-point(&optional NO-PROPERTIES)
sexp-at-point()
symbol-at-point()
thing-at-mouse(EVENT THING &optional NO-PROPERTIES)
thing-at-point(THING &optional NO-PROPERTIES)
thing-at-point--beginning-of-sexp()
thing-at-point--beginning-of-symbol()
thing-at-point--bounds-of-well-formed-url(BEG END PT)
thing-at-point--end-of-sexp()
thing-at-point--read-from-whole-string(STR)
thing-at-point-bounds-of-list-at-point()
thing-at-point-bounds-of-string-at-point()
thing-at-point-bounds-of-url-at-point(&optional LAX)
thing-at-point-face-at-point(&optional LAX BOUNDS)
thing-at-point-file-at-point(&optional LAX BOUNDS)
thing-at-point-for-char-property(PROPERTY)
thing-at-point-looking-at(REGEXP &optional DISTANCE)
thing-at-point-newsgroup-p(STRING)
thing-at-point-url-at-point(&optional LAX BOUNDS)
word-at-point(&optional NO-PROPERTIES)

Defined faces (0)