[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "Staying in the same place"
From: |
Stefan Monnier |
Subject: |
Re: "Staying in the same place" |
Date: |
Mon, 04 Apr 2016 08:51:47 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
> There's a lot of modes in Emacs that don't reflect a physical file, but
> has only generated content (for some values of "generated"). Many of
> these implement a version of "revert", usually bound to the `g' key,
> which basically do an `erase-buffer' and then generate the buffer anew.
I think it'd good to think of such solutions in the context of bookmarks
as well.
IOW, I think ideally, there should be a special-mode-revert-buffer
function (which special-mode sets as the default value of
revert-buffer-function), which basically just does a "get bookmark data,
then go back to that bookmark".
I don't think it can be done with the current bookmark data, tho.
IIRC there were 2 main reasons:
- You need to be able to distinguish the case "go back to bookmark in
a new buffer" and "go back to bookmark in the current buffer".
- You probably want to distinguish between the case where you want to
revert/refresh, and the case where it's OK to just jump to some
spot in some existing buffer.
Last time I looked at it, I also figured that it'd be nice if the
help-xref-* could use the same infrastructure.
> And then you have to implement some way of "staying in the same place".
Bookmarks do that part acceptably, I think.
> (The reason I'm thinking about this is that I was thinking about what
> would be necessary to make `g' in compilation buffers remain in "the
> same place". Which is useful when you're trying to weed out compilation
> warnings.)
Oohh.. that's yet another step up in complexity since in that case you
can't "go back" right away, you first have to wait for the process to
send enough data.
But yes, that would be great (I'd particularly appreciate it in
*vc-diff*).
Stefan
- "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 <=
- 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, 2016/04/04
- 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