[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "Staying in the same place"
From: |
Lars Magne Ingebrigtsen |
Subject: |
Re: "Staying in the same place" |
Date: |
Mon, 04 Apr 2016 21:43:19 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
Karl Fogel <address@hidden> writes:
> And Stefan has pointed out that what you're proposing is essentially
> what bookmark already does. Maybe that idea of recording a position
> fuzzily should be abstracted out, and then bookmark would use the new
> abstraction too, or maybe this new function should just use bookmark's
> existing code (which, in turn, already hooks into mode-specific code
> in some cases, and could do more of that).
Ah, I didn't know that about bookmarks. Sounds like all the mechanisms
we need are in place, so we just need to start using them throughout the
various modes. But perhaps provide easier-to-understand interfaces
like:
> In any case, though, should the new thing be defined as a macro? That
> seems like the more natural way, at least IMHO. Something like:
>
> (defmacro fuzzy-save-excursion (&rest body)
> record-the-position-fuzzily-using-mode-specific-code
> run-the-body
> restore-the-fuzzily-recorded-position
> )
Yes, I think having a macro for this would be very handy and encourage
usage of this stuff. However, the restore-the-fuzzily-recorded-position
thing should also be available in a handy fashion for when we're doing
asynchronous fuzzy point restoration (with diff mode and compilation
mode, for instance).
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
- "Staying in the same place", Lars Magne Ingebrigtsen, 2016/04/04
- Re: "Staying in the same place", Lars Magne Ingebrigtsen, 2016/04/04
- Re: "Staying in the same place", Stefan Monnier, 2016/04/04
- Re: "Staying in the same place", Lars Magne Ingebrigtsen, 2016/04/04
- Re: "Staying in the same place", Stefan Monnier, 2016/04/04
- Re: "Staying in the same place", Lars Magne Ingebrigtsen, 2016/04/04
- Re: "Staying in the same place", Karl Fogel, 2016/04/04
- Re: "Staying in the same place",
Lars Magne Ingebrigtsen <=
- Re: "Staying in the same place", Karl Fogel, 2016/04/04
- Re: "Staying in the same place", Lars Magne Ingebrigtsen, 2016/04/04
- Re: "Staying in the same place", John Wiegley, 2016/04/04
- RE: "Staying in the same place", Drew Adams, 2016/04/04