* How to change a variable amount of characters
@ 2009-07-21 16:21 Decebal
2009-07-21 16:33 ` Teemu Likonen
0 siblings, 1 reply; 2+ messages in thread
From: Decebal @ 2009-07-21 16:21 UTC (permalink / raw)
To: help-gnu-emacs
For example I would like to change all the spaces at the beginnen of a
line to an underscore.
The following three lines:
- first line
- second line
- more indentation
would become:
__- first line
__- second line
____- more indentation
Can this be done?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: How to change a variable amount of characters
2009-07-21 16:21 How to change a variable amount of characters Decebal
@ 2009-07-21 16:33 ` Teemu Likonen
0 siblings, 0 replies; 2+ messages in thread
From: Teemu Likonen @ 2009-07-21 16:33 UTC (permalink / raw)
To: help-gnu-emacs
On 2009-07-21 09:21 (-0700), Decebal wrote:
> For example I would like to change all the spaces at the beginnen of a
> line to an underscore.
> The following three lines:
> - first line
> - second line
> - more indentation
>
> would become:
> __- first line
> __- second line
> ____- more indentation
>
> Can this be done?
Here's one example. C-M-% and replace
^ +
with
\,(make-string (length \&) ?_)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-07-21 16:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-21 16:21 How to change a variable amount of characters Decebal
2009-07-21 16:33 ` Teemu Likonen
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.