help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to return to the position from where I did tags-query-replace?


From: aklaing
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)
User-agent: G2/1.0

Yes.  It (tags-query-replace) throws exceptions whether it completes 
successfully or not.  It does not work because the (apply fun args) is in the 
middle of other code.  So the part of the calling code which follows the (apply 
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:
> 
> > Thanks Emanuel for taking a look at this.
> > [...]
> 
> NP, but are you saying, your function throws an
> error when it *does* work, and this make the
> advice not work?
> 
> If so, IMO it'll just be too confusion to try
> to write a framework around that.
> 
> The docstring for `error' doesn't say anything
> about aborting normal execution, but maybe it
> does, I don't know:
> 
>     (error STRING &rest ARGS)
> 
>     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.
> 
> -- 
> underground experts united
> http://user.it.uu.se/~embe8573



reply via email to

[Prev in Thread] Current Thread [Next in Thread]