Discussion:
show-enclosing-scopes
Jefferson Carpenter
2018-05-16 06:41:20 UTC
Permalink
Just wrote a nifty little gadget that shows you the scopes you are
inside of. Eval this buffer:

https://raw.githubusercontent.com/jeffersoncarpenter/emacs.d/master/show-enclosing-scope.el

Then move point around. A map of the scopes you're in appears at the
top of the window. Useful for knowing where you are when you're paging
up and down the file, or searching-forward for a text string, esp. in
code with long functions.

Main problem is that it's very flickery -- not 100% sure why, but I'm
pretty sure the (redisplay) are part of the reason. I had to add those
in order for (scroll-up) and (scroll-down) to interoperate properly with
(goto-char).
Jefferson Carpenter
2018-05-16 06:40:23 UTC
Permalink
Just wrote a nifty little gadget that shows you the scopes you are
inside of. Eval this buffer:

https://raw.githubusercontent.com/jeffersoncarpenter/emacs.d/master/show-enclosing-scope.el

Then move point around. A map of the scopes you're in appears at the
top of the window. Useful for knowing where you are when you're paging
up and down the file, or searching-forward for a text string, esp. in
code with long functions.

Main problem is that it's very flickery -- not 100% sure why, but I'm
pretty sure the (redisplay) are part of the reason. I had to add those
in order for (scroll-up) and (scroll-down) to interoperate properly with
(goto-char).
Eli Zaretskii
2018-05-16 08:03:26 UTC
Permalink
Post by Jefferson Carpenter
Main problem is that it's very flickery -- not 100% sure why, but I'm
pretty sure the (redisplay) are part of the reason. I had to add those
in order for (scroll-up) and (scroll-down) to interoperate properly with
(goto-char).
AFIU, you have there a function on pre-command-hook that
deletes a window and then forces redisplay. So I'd say you get what
you asked for?

I don't think I understand why scroll commands rewuire that.

Loading...