Skip to main content
added 1543 characters in body
Source Link
Drew
  • 80.9k
  • 10
  • 125
  • 265

It's not enough to test for properties beginning-op, end-op, bounds-of-thing-at-point, and thing-at-point. A thing can instead be defined by property forward-op or by a forward- THING function. (And some uses of things require the existence of a forward-op or a forward- THING function.)

Library thing-cmds.elthing-cmds.el (code) defines these functions:

It's not enough to test for properties beginning-op, end-op, bounds-of-thing-at-point, and thing-at-point. A thing can instead be defined by property forward-op or by a forward- THING function.

Library thing-cmds.el (code) defines these functions:

It's not enough to test for properties beginning-op, end-op, bounds-of-thing-at-point, and thing-at-point. A thing can instead be defined by property forward-op or by a forward- THING function. (And some uses of things require the existence of a forward-op or a forward- THING function.)

Library thing-cmds.el (code) defines these functions:

added 1543 characters in body
Source Link
Drew
  • 80.9k
  • 10
  • 125
  • 265

It's not enough to test for properties beginning-op, end-op, bounds-of-thing-at-point, and thing-at-point. A thing can instead be defined by property forward-op or by a forward- THING function.

Each is a string that names a type of text entity for which there is a either a corresponding ‘forward-’forward- thing operation, or corresponding beginning-of- thing and end-of- thing operations. The list includes the names of the symbols that satisfy thgcmd-defined-thing-p, but with these excluded: thing, buffer, point.

It's not enough to test for properties beginning-op, end-op, bounds-of-thing-at-point, and thing-at-point.

Each is a string that names a type of text entity for which there is a either a corresponding ‘forward-’ thing operation, or corresponding beginning-of- thing and end-of- thing operations. The list includes the names of the symbols that satisfy thgcmd-defined-thing-p, but with these excluded: thing, buffer, point.

It's not enough to test for properties beginning-op, end-op, bounds-of-thing-at-point, and thing-at-point. A thing can instead be defined by property forward-op or by a forward- THING function.

Each is a string that names a type of text entity for which there is a either a corresponding forward- thing operation, or corresponding beginning-of- thing and end-of- thing operations. The list includes the names of the symbols that satisfy thgcmd-defined-thing-p, but with these excluded: thing, buffer, point.

added 1543 characters in body
Source Link
Drew
  • 80.9k
  • 10
  • 125
  • 265

There is also user option thing-types:

thing-types is a variable defined in thing-cmds.el.

Its value is

("sexp" "button" "char" "char-same-line" "color" "comment" "decimal-number" "defun" "email" "filename" "hex-number" "line" "list" "list-contents" "non-nil-symbol-name" "number" "overlay" "page" "paragraph" "region-or-word" "sentence" "string" "string-contents" "symbol" "symbol-name" "unquoted-list" "url" "whitespace" "whitespace-&-newlines" "word")

Documentation:

List of thing types.

Each is a string that names a type of text entity for which there is a either a corresponding forward-thing operation, or corresponding beginning-of-thing and end-of-thing operations.

The default value includes the names of most symbols that satisfy thgcmd-defined-thing-p at the time the defcustom is evaluated. These types are excluded: thing, buffer, point.

M-@ cycles through this list, in order.

You can customize this variable.

The actual default value depends on your setup. This is the sexp that is evaluated at defcustom time to produce the default value:

(let ((types ())) (mapatoms (lambda (tt) (when (thgcmd-defined-thing-p tt) (push (symbol-name tt) types)))) (setq types (sort types #'string-lessp)) ;; Remove types that do not make sense. (dolist (typ '("sexp" "thing" "buffer" "point")) (setq types (delete typ types))) (setq types (cons "sexp" types))) ; Put `sexp' first. 

The option is used in command cycle-select-something, and it could also be useful in other contexts:

cycle-select-something is an interactive compiled Lisp function in thing-cmds.el.

It is bound to M-@.

(cycle-select-something)

Select something at or near point. Successively select different things.

The default thing type is the first element of option thing-types.

In Transient Mark mode, you can follow this with C-M-SPC to select successive things of the same type, but to do that you must first use C-x C-x: M-@ C-x C-x C-M-SPC.

If option thgcmd-use-nearest-thing-flag and non-nil then use a thing that is near, not necessarily at, point.


There is also user option thing-types:

thing-types is a variable defined in thing-cmds.el.

Its value is

("sexp" "button" "char" "char-same-line" "color" "comment" "decimal-number" "defun" "email" "filename" "hex-number" "line" "list" "list-contents" "non-nil-symbol-name" "number" "overlay" "page" "paragraph" "region-or-word" "sentence" "string" "string-contents" "symbol" "symbol-name" "unquoted-list" "url" "whitespace" "whitespace-&-newlines" "word")

Documentation:

List of thing types.

Each is a string that names a type of text entity for which there is a either a corresponding forward-thing operation, or corresponding beginning-of-thing and end-of-thing operations.

The default value includes the names of most symbols that satisfy thgcmd-defined-thing-p at the time the defcustom is evaluated. These types are excluded: thing, buffer, point.

M-@ cycles through this list, in order.

You can customize this variable.

The actual default value depends on your setup. This is the sexp that is evaluated at defcustom time to produce the default value:

(let ((types ())) (mapatoms (lambda (tt) (when (thgcmd-defined-thing-p tt) (push (symbol-name tt) types)))) (setq types (sort types #'string-lessp)) ;; Remove types that do not make sense. (dolist (typ '("sexp" "thing" "buffer" "point")) (setq types (delete typ types))) (setq types (cons "sexp" types))) ; Put `sexp' first. 

The option is used in command cycle-select-something, and it could also be useful in other contexts:

cycle-select-something is an interactive compiled Lisp function in thing-cmds.el.

It is bound to M-@.

(cycle-select-something)

Select something at or near point. Successively select different things.

The default thing type is the first element of option thing-types.

In Transient Mark mode, you can follow this with C-M-SPC to select successive things of the same type, but to do that you must first use C-x C-x: M-@ C-x C-x C-M-SPC.

If option thgcmd-use-nearest-thing-flag and non-nil then use a thing that is near, not necessarily at, point.

Source Link
Drew
  • 80.9k
  • 10
  • 125
  • 265
Loading