[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: save-excursion doesn't restore point with json-pretty-print
From: |
Eli Zaretskii |
Subject: |
Re: save-excursion doesn't restore point with json-pretty-print |
Date: |
Fri, 01 Feb 2019 12:11:14 +0200 |
> Date: Fri, 1 Feb 2019 10:55:16 +0100
> From: <tomas@tuxteam.de>
>
> AFAIK the mechanism for save-excursion is to set a special marker
> to return to after the excursion.
>
> Now the pretty print probably replaces the whole region in the
> process: the marker can't be at the same place where it was. If
> you're lucky, it'll be at one of both region's borders.
Yes, erasing the buffer makes all the markers point to BOB, and then
save-excursion won't work as expected.
Perhaps json-pretty-print could use the new replace-buffer-contents
function? Although I'm not sure this will cure the problem, at least
not in all cases.
- save-excursion doesn't restore point with json-pretty-print, Tassilo Horn, 2019/02/01
- Re: save-excursion doesn't restore point with json-pretty-print, tomas, 2019/02/01
- Re: save-excursion doesn't restore point with json-pretty-print,
Eli Zaretskii <=
- Re: save-excursion doesn't restore point with json-pretty-print, Robert Pluim, 2019/02/01
- Re: save-excursion doesn't restore point with json-pretty-print, Eli Zaretskii, 2019/02/01
- Re: save-excursion doesn't restore point with json-pretty-print, Tassilo Horn, 2019/02/01
- Re: save-excursion doesn't restore point with json-pretty-print, Eli Zaretskii, 2019/02/01
- Re: save-excursion doesn't restore point with json-pretty-print, Tassilo Horn, 2019/02/01
- Re: save-excursion doesn't restore point with json-pretty-print, Tassilo Horn, 2019/02/01
- Re: save-excursion doesn't restore point with json-pretty-print, Eli Zaretskii, 2019/02/01
- Re: save-excursion doesn't restore point with json-pretty-print, Tassilo Horn, 2019/02/01