From: Marcin Borkowski <mbork@mbork.pl>
To: "Søren Pilgård" <fiskomaten@gmail.com>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: How about making `sleep-for' interactive?
Date: Thu, 27 Jun 2019 09:55:06 +0200 [thread overview]
Message-ID: <87k1d7wjhh.fsf@mbork.pl> (raw)
In-Reply-To: <CAGXii2ZUL91LoUJKTJOW41Cwn=0NwPPh34Fdjd5y=rVtBrvOXw@mail.gmail.com>
On 2019-06-27, at 09:46, Søren Pilgård <fiskomaten@gmail.com> wrote:
> On Thu, Jun 27, 2019 at 6:47 AM Marcin Borkowski <mbork@mbork.pl> wrote:
>>
>> Hi all,
>>
>> I noticed today that `sleep-for' is not an (interactive) command. IMHO
>> it should be - at least I can see a need for it. Here is my use case.
>> I recorded a keyboard macro which edits the text in some way. The macro
>> begins with isearching for something (which may be outside the part of
>> the buffer currently seen) and then changing. Having e.g. a 1-second
>> delay between moving to that part and actually changing it would help
>> spot mistakes.
>>
>> Since `sleep-for' is a builtin, I can't prepare a patch (I don't speak
>> C very well), but if I get a hint I can try (just to learn something
>> new).
>>
>> WDYT?
>>
>
> I can't really see the use.
> You could always just do ```M-: (sleep-foor xxx)``` in the macro.
> Being time sensitive and waiting for abortion is a bit too dangerous
> in my taste, either I am sure and do it everywhere or I want to accept
> / decline in cases like that.
>
> What I usually do in cases like that is to make a macro that moves to
> the next occurrence, then does the changes and then moves to just the
> beginning of the next occurrence again.
> That way I can just call the macro repeatedly and it will move forward
> to the next place where a change will happen each time.
> If I decide not to apply the macro I will skip forward, either
> searching manually for the next occurrence or sometimes just moving
> the point forward so the macro will edit the next occurrence instead.
Good points. In addition to that, I discovered that screen is not
updated during macro execution, so my solution would have to involve
updating the display.
Let's forget about this idea.
Thanks,
--
Marcin Borkowski
http://mbork.pl
next prev parent reply other threads:[~2019-06-27 7:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-27 4:43 How about making `sleep-for' interactive? Marcin Borkowski
2019-06-27 7:46 ` Søren Pilgård
2019-06-27 7:55 ` Marcin Borkowski [this message]
2019-06-27 13:19 ` Stefan Monnier
2019-06-27 13:32 ` Søren Pilgård
2019-06-27 19:40 ` Noam Postavsky
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k1d7wjhh.fsf@mbork.pl \
--to=mbork@mbork.pl \
--cc=emacs-devel@gnu.org \
--cc=fiskomaten@gmail.com \
/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.
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.