From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.emacs.help Subject: Re: Continuing after an interactive command? Date: Tue, 28 May 2013 09:39:09 +0200 Message-ID: <87wqqjtuxu.fsf@zigzag.favinet> References: <58d9e5c4-a663-4837-8025-c52a9ef2439c@2g2000yqr.googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1369726618 12324 80.91.229.3 (28 May 2013 07:36:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 May 2013 07:36:58 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: gentsquash Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue May 28 09:36:56 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UhESk-0005T8-Jw for geh-help-gnu-emacs@m.gmane.org; Tue, 28 May 2013 09:36:54 +0200 Original-Received: from localhost ([::1]:55189 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhESk-0001C1-74 for geh-help-gnu-emacs@m.gmane.org; Tue, 28 May 2013 03:36:54 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:48468) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhESX-0001Bv-Mm for help-gnu-emacs@gnu.org; Tue, 28 May 2013 03:36:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UhESU-0003C1-H7 for help-gnu-emacs@gnu.org; Tue, 28 May 2013 03:36:41 -0400 Original-Received: from smtp206.alice.it ([82.57.200.102]:37925) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhESU-0003Bx-6Y for help-gnu-emacs@gnu.org; Tue, 28 May 2013 03:36:38 -0400 Original-Received: from zigzag.favinet (79.41.65.134) by smtp206.alice.it (8.6.060.15) id 518B5A0103B123A2; Tue, 28 May 2013 09:36:33 +0200 Original-Received: from ttn by zigzag.favinet with local (Exim 4.72) (envelope-from ) id 1UhEV5-0001jf-5O; Tue, 28 May 2013 09:39:19 +0200 In-Reply-To: <58d9e5c4-a663-4837-8025-c52a9ef2439c@2g2000yqr.googlegroups.com> (gentsquash@gmail.com's message of "Mon, 27 May 2013 19:24:54 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 82.57.200.102 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:91096 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable () gentsquash () Mon, 27 May 2013 19:24:54 -0700 (PDT) (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) ) That's like leaving the house and walking around the block (complaining loudly to annoy the neighbors) to get from the kitchen to the bathroom. If you really must, then try: (ignore-errors (save-excursion (dired-do-query-replace-regexp FROM TO))) which catches the throw out of the stateful query-replace loop and furthermore preserves context such that =E2=80=98dired-find-file=E2=80=99 d= oes not complain. That is like remembering to lock the door (to thwart negative neighborly retribution) and bring a key. But i have to wonder... Why do you treat your neighbors so? Is it really their business that your soup is too spicy? =2D-=20 Thien-Thi Nguyen GPG key: 4C807502 --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAlGkXyAACgkQZwMiJEyAdQIqxQCePpCouHdFvwSC5uQANl5Z9Q1J 83QAoLsetWV+nHiIY/Z2WOwrKezvBVyr =Taej -----END PGP SIGNATURE----- --=-=-=--