help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: bounds-of-thing-at-point for paragraphs


From: Drew Adams
Subject: RE: bounds-of-thing-at-point for paragraphs
Date: Sun, 1 Nov 2020 10:51:57 -0800 (PST)

> > I was asking how bounds-of-thing-at-point does not take paragraph as
> > argument as well, since it does for word, sentence, line. Can
> > paragraph be included as well?
> 
> You could try to define it. There is function org--paragraph-at-point
> that gives information about paragraph at point. Try it out.

No need.

>From the Commentary of file `thingatpt.el':

;; 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 (eg. 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".
;;
;; Reliance on existing operators means that many `things' can be accessed
;; without further code:  eg.
;;     (thing-at-point 'line)
;;     (thing-at-point 'page)

It's enough that there's a function `forward-paragraph'
that moves forward over a paragraph.

`thing-at-point' is designed to be usable out of the
box with LOTS of things.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]