From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: aklaing@gmail.com Newsgroups: gmane.emacs.help Subject: Re: How to return to the position from where I did tags-query-replace? Date: Sun, 4 Feb 2018 12:37:29 -0800 (PST) Message-ID: <745ff567-d90b-4532-9dd3-88c2e5beafaa@googlegroups.com> References: <1189017224.525081.173930@22g2000hsm.googlegroups.com> <2f9fe1c0-f382-47d4-8df2-0b39d3645385@googlegroups.com> <86d11lxwl9.fsf@zoho.com> <86y3k9wf58.fsf@zoho.com> <86mv0pweel.fsf@zoho.com> <34aa48a3-00b7-4adc-a103-474738a6cf57@googlegroups.com> <86inbcv6wz.fsf@zoho.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1517776749 12792 195.159.176.226 (4 Feb 2018 20:39:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 4 Feb 2018 20:39:09 +0000 (UTC) Injection-Date: Sun, 04 Feb 2018 20:37:30 +0000 User-Agent: G2/1.0 To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Feb 04 21:39:05 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eiR3x-0002di-PW for geh-help-gnu-emacs@m.gmane.org; Sun, 04 Feb 2018 21:38:57 +0100 Original-Received: from localhost ([::1]:37043 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eiR5z-00019b-3e for geh-help-gnu-emacs@m.gmane.org; Sun, 04 Feb 2018 15:41:03 -0500 X-Received: by 10.237.36.182 with SMTP id t51mr9803982qtc.12.1517776650140; Sun, 04 Feb 2018 12:37:30 -0800 (PST) X-Received: by 10.31.54.205 with SMTP id d196mr4689245vka.14.1517776649996; Sun, 04 Feb 2018 12:37:29 -0800 (PST) Original-Path: usenet.stanford.edu!s47no7493084qta.0!news-out.google.com!u51ni83qtk.1!nntp.google.com!s47no7493075qta.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: <86inbcv6wz.fsf@zoho.com> Complaints-To: groups-abuse@google.com Original-Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2601:183:c900:9ffa:e48a:7929:2e10:95b0; posting-account=dhIQkAoAAAC3SN9RXz6IZxkZKNcT7tos Original-NNTP-Posting-Host: 2601:183:c900:9ffa:e48a:7929:2e10:95b0 Original-Xref: usenet.stanford.edu gnu.emacs.help:221799 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.help:115915 Archived-At: Yes. It (tags-query-replace) throws exceptions whether it completes succes= sfully or not. It does not work because the (apply fun args) is in the mid= dle of other code. So the part of the calling code which follows the (appl= y fun args) does not execute unless you catch the exception. There is more detailed doc at: https://www.gnu.org/software/emacs/manual/html_node/elisp/Signaling-Errors.= html (first paragraph). Further down the page it talks about user-error. On Sunday, February 4, 2018 at 3:25:36 PM UTC-5, Emanuel Berg wrote: > aklaing wrote: >=20 > > Thanks Emanuel for taking a look at this. > > [...] >=20 > NP, but are you saying, your function throws an > error when it *does* work, and this make the > advice not work? >=20 > If so, IMO it'll just be too confusion to try > to write a framework around that. >=20 > The docstring for `error' doesn't say anything > about aborting normal execution, but maybe it > does, I don't know: >=20 > (error STRING &rest ARGS) >=20 > Signal an error, making error message by > passing all args to `format'. In Emacs, the > convention is that error messages start > with a capital letter but *do not* end with > a period. Please follow this convention for > the sake of consistency. >=20 > --=20 > underground experts united > http://user.it.uu.se/~embe8573