all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: gentsquash <gentsquash@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Continuing after an interactive command?
Date: Mon, 27 May 2013 19:24:54 -0700 (PDT)	[thread overview]
Message-ID: <58d9e5c4-a663-4837-8025-c52a9ef2439c@2g2000yqr.googlegroups.com> (raw)

How can I define a function which contains a command that
I interact with, which then continues?

I seek a function like the following, executed when in a
buffer:

  (defun foo ()
    (ns-narrow-to-region 100 200)
    (goto-char (point-min))
    (dired-jump)
    ;; This next cmd interacts with the user.
    (dired-do-query-replace-regexp FROM TO)
    ;; If the above cmd terminates normally, I'd like these
    ;; to be executed:
    (dired-find-file)
    (ns-widen)
    )

Typically, when the `dired-do-query-replace-regexp' runs,
I'll hit "!" to have it do all the replacements.  I then
would like to end up in the buffer, widened.

However, in the above function, when the
`dired-do-query-replace-regexp' terminates, it seems to
terminate `foo' as well.

                        --Jonathan


             reply	other threads:[~2013-05-28  2:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-28  2:24 gentsquash [this message]
2013-05-28  7:39 ` Continuing after an interactive command? Thien-Thi Nguyen
     [not found] ` <mailman.502.1369726605.22516.help-gnu-emacs@gnu.org>
2013-05-29  2:34   ` gentsquash

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=58d9e5c4-a663-4837-8025-c52a9ef2439c@2g2000yqr.googlegroups.com \
    --to=gentsquash@gmail.com \
    --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.
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.