Registered by Andreas Roehler

Development moved to https://github.com/andreas-roehler/thing-at-point-utils
Please follow there

Delivers a set of functions to return, mover over or
manipulate a given THING. THING may be a well known
form as word, paragraph, but also a char class as
`alnum' or a new defined thing.

For example `ar-alnum-atpt' will return all
alpha-numerical chars below and around cursor as a
string. `ar-bounds-of-alnum-atpt' returns the
borders of that string as a list and so on.

Some examples how to set:

(global-set-key [(super \()] 'ar-parentize-region-atpt)
(global-set-key [(super \/)] 'ar-slash-region-atpt)
(global-set-key [(super \<)] 'ar-lesser-angle-region-atpt)
(global-set-key [(super \>)] 'ar-greater-angle-region-atpt)
(global-set-key [(super \[)] 'ar-bracket-region-atpt)
(global-set-key [(super \\)] 'ar-backslash-region-atpt)
(global-set-key [(super \{)] 'ar-brace-region-atpt)

Beside of <super>, the key already tells what to pick.
Quite often used are commands like this:

(global-set-key [(control c)(\")] 'ar-doublequote-or-copy-atpt)
(global-set-key [(control c)(\')] 'ar-singlequote-or-copy-atpt)

A whole bunch of commands are available:

ar-THING-atpt
ar-THING-bounds-atpt
ar-THING-beginning-position-atpt
ar-THING-end-position-atpt
ar-THING-beginning-atpt
ar-THING-end-atpt
ar-THING-length-atpt
ar-THING-copy-atpt
ar-THING-kill-atpt
ar-THING-forward-atpt
ar-THING-backward-atpt
ar-THING-transpose-atpt
ar-THING-sort-atpt
ar-THING-check-atpt

Also a couple of commands, whose use is much less probable:

ar-THING-slash-atpt
ar-THING-double-backslash-atpt
ar-THING-doubleslash-atpt
ar-THING-delete-in-region
ar-blok-THING-atpt
ar-THING-escape-atpt
ar-THING-doublequote-atpt
ar-THING-doubleslash-paren-atpt
ar-THING-slashparen-atpt
ar-THING-dollar-atpt
ar-THING-equalize-atpt
ar-THING-greater-angle-atpt
ar-THING-lesser-angle-atpt
ar-THING-backslash-atpt
ar-THING-brace-atpt
ar-THING-bracket-atpt
ar-comment-THING-atpt
ar-commatize-THING-atpt
ar-quote-THING-atpt
ar-THING-hyphen-atpt
ar-THING-mark-atpt
ar-THING-hide-atpt
ar-THING-show-atpt
ar-THING-hide-show-atpt
ar-THING-left-right-singlequote-atpt
ar-THING-parentize-atpt
ar-THING-separate-atpt
ar-THING-singlequote-atpt
ar-THING-trim-atpt
ar-THING-left-trim-atpt
ar-THING-right-trim-atpt
ar-underscore-THING-atpt
ar-whitespace-THING-atpt

If not delivered, all what's needed is a function, which will determine the beginning resp. the end of the object.

In pseudo-code:

(put 'MY-FORM 'beginning-op-at
           (lambda () MY-FORWARD-MOVE-CODE))

(put 'MY-FORM 'end-op-at
     (lambda () MY-BACKWARD-MOVE-CODE))

When done, it's should be available, i.e. copied and returned like this

(defun MY-FORM-atpt (&optional arg)
  " "
  (interactive "p")
  (ar-th 'MY-FORM arg))

Other Files in this project:

thing-in-thing.el employs a defined THING within the
range of a second THING.

`ar-hide-bracketed-in-line-atpt' for example hides everything
insides brackets within the given line. Resp.
`ar-show-bracketed-in-line-atpt' displays it again,
`ar-hide-show-bracketed-in-line-atpt' toggles this state.

Caveat: thing-in-thing files deliver a large number of commands
resp. symbols, so `apropos'-output might get
cluttered.

Beside of `thing-rest-list-in-region-only.el', which provides
`ar-doubleslash-paren-word-in-region-atpt' and related,
it's not recommended loading them all at the beginning.

Which implementations are to be expected, see the contents of lists at the bottom of
thingatpt-utils-base.el, which are cross-used in general.

For example `M-x ar-doubleslash-paren-graph-in-region-atpt',
which would turn an active region of

foo bar baz

into

\\(foo\\) \\(bar\\) \\(baz\\)

It resides in thing-classes-in-rest-list.el

It's in "ar-atpt-rest-list" were forms employing common items like
`word', `region', `line', `paragraph' are stored.

M-x find . -maxdepth 1 -type f -name "*.el" -print0 | xargs -0 -e grep -nH -e MY_FORMS_WANTED

called from inside thing-in-thing dired-directory should help.

Comment-lor.el: it's suffix `-lor' means
`line-or-region': If no active region exists, line is
commented or uncommented. Thus taking action to mark
a region is no longer needed.

Project information

Maintainer:
Andreas Roehler
Driver:
Andreas Roehler
Licence:
GNU GPL v2, GNU GPL v3

RDF metadata

View full history Series and milestones

trunk series is the current focus of development.

All code Code

Version control system:
Bazaar
Programming languages:
Emacs Lisp, C, python

All questions Latest questions

All bugs Latest bugs reported

All blueprints Latest blueprints

Downloads

Latest version is 1.5
released

All downloads

Announcements