unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Looking for generic text transformation utility library
@ 2018-07-02 12:56 Phil Eaton
  0 siblings, 0 replies; 2+ messages in thread
From: Phil Eaton @ 2018-07-02 12:56 UTC (permalink / raw)
  To: help-gnu-emacs

I can't seem to find a way to do simple programmatic transformations
without writing a good portion of code (that I imagine must have been
written before). I want to be able to make a text selection and run
`(map-selection #'prettify)` and have my `prettify` function called with
the selection and the result of `prettify` written back in place of the
selection.

Same thing goes for a hypothetical `map-buffer`, `map-line`, etc.

Is this a (builtin) thing? Or does every package re-implement this
functionality manually? Is there a library that provides these basic
transformation utilities?

Thank you!

-- 
Phil Eaton


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

* Re: Looking for generic text transformation utility library
       [not found] <mailman.2919.1530543434.1292.help-gnu-emacs@gnu.org>
@ 2018-07-02 18:26 ` Emanuel Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Emanuel Berg @ 2018-07-02 18:26 UTC (permalink / raw)
  To: help-gnu-emacs

Phil Eaton wrote:

> I can't seem to find a way to do simple
> programmatic transformations without writing
> a good portion of code

"generic text transformation utility", you mean
like the Unix tool sed(1), the "stream editor
for filtering and transforming text", or tr(1),
to "translate or delete characters"?

Can you provide me/us with an example of
a text, as well as the end result you want it
to be translated into?

-- 
underground experts united
http://user.it.uu.se/~embe8573


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

end of thread, other threads:[~2018-07-02 18:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-02 12:56 Looking for generic text transformation utility library Phil Eaton
     [not found] <mailman.2919.1530543434.1292.help-gnu-emacs@gnu.org>
2018-07-02 18:26 ` Emanuel Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).