all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* vtable's beginning/end-of-table functions broken/fix
@ 2023-09-28 13:08 marty hiatt
  2023-09-28 13:21 ` marty hiatt
  0 siblings, 1 reply; 3+ messages in thread
From: marty hiatt @ 2023-09-28 13:08 UTC (permalink / raw)
  To: emacs-devel

vtable.el's functions `vtable-beginning-of-table` and `vtable-end-of-table` seem broken to me. when i try to use `vtable-revert-command` on a table in a buffer that contains other text, reverting or re-sorting it removes everything in the buffer apart from the table.

to fix it, it looks like the call to `text-property-search-backward` for the former or `text-property-search-forward` for the latter requires a third argument (PREDICATE) of `t` rather than nil.

from the docstring:
"Two special values of PREDICATE can also be used:
If PREDICATE is t, that means the value of PROPERTY must `equal' VALUE
to be considered a match.
If PREDICATE is nil (which is the default), the value of PROPERTY will
match if it is not `equal' to VALUE."

with PREDICATE set to nil, the beginning/end-of-table functions use `point-min` and `point-max instead.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-09-28 22:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-28 13:08 vtable's beginning/end-of-table functions broken/fix marty hiatt
2023-09-28 13:21 ` marty hiatt
2023-09-28 22:18   ` Stefan Kangas

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.