https://github.com/phillord/m-buffer-el.git
git clone 'git://github.com/phillord/m-buffer-el.git'
[](https://travis-ci.org/phillord/m-buffer-el)
This package provides a set of list-orientated functions for operating over the contents of Emacs buffers. Functions are generally purish: i.e. they may change the state of one buffer by side-effect, but should not affect point, current buffer, match data or so forth. Generally, markers are preferred over point locations so that it is possible, for example, to search for regexp matches and then replace them all without the early replacement invalidating the location of the later ones.
m-buffer is now documented with Lentic Server.
The code is now in active use. APIs are open to change, but I am not intending to.
Contributions are welcome. However, I would like to keep the option of hosting m-buffer.el on ELPA, therefore, contributors should have Copyright Assignment papers with the FSF.
This release mostly includes considerably improved documentation.
There is one change which is half-way between a breaking change and a bug fix. Previously, in the m-buffer-match-* functions “match” arguments could take any keyword argument and these would over-ride any arguments already set. This means that a call such as:
(m-buffer-match-page (current-buffer) :regexp "this")
would behave the same as:
(m-buffer-match (current-buffer) :regexp "this")
rather than matching pages. Alternatively, this call:
(m-buffer-match-line
(current-buffer)
:post-match (lambda () t))
never terminates. Both of these now throw an error instead.
m-buffer-point' renamed to
m-buffer-at-point'm-buffer-match-subtract
and m-buffer-match-exact-subtract
m-buffer-with-markers
is a let*
like macro which autonils markers after
use.m-buffer-with-current-location
is like with-current-buffer
but also
takes a location.m-buffer-with-current-marker
is like with-current-buffer
but takes a
marker.m-buffer-match-string
and m-buffer-match-substring
for extracting
match-strings.m-buffer-matches-data
has become m-buffer-match-data
.beginning
have been changed to begin
– it is shorter and
matches end
m-buffer-match-data
for which it makes no sense to
pass in match-data). This allows easy chaining of methods.m-buffer-match-data-visible-window
access this feature
directly.