From: Marcin Borkowski <mbork@mbork.pl>
To: Help Gnu Emacs mailing list <help-gnu-emacs@gnu.org>
Subject: How to replace format-like codes in a string?
Date: Fri, 11 Nov 2016 09:25:07 +0100 [thread overview]
Message-ID: <87mvh677a4.fsf@mbork.pl> (raw)
Hi list,
I want to write a function like `format', which gets a string with some
codes embedded (like "%a", "%b" etc., and "%%" to get a percentage
sign), and convert them to something (say, "%a" to the value of var-a,
"%b" to var-b etc.). Is there any facility in Elisp to help with that
or do I have to do a search-and-replace manually?
Best,
--
Marcin Borkowski
next reply other threads:[~2016-11-11 8:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-11 8:25 Marcin Borkowski [this message]
2016-11-11 8:48 ` How to replace format-like codes in a string? Joost Kremers
2016-11-11 12:19 ` Marcin Borkowski
2016-11-13 10:29 ` Joost Kremers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mvh677a4.fsf@mbork.pl \
--to=mbork@mbork.pl \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).