emacs-devel
[Top][All Lists]
Advanced

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

RE: widen-one-level [was: Emacs's handling of line numbers]


From: Drew Adams
Subject: RE: widen-one-level [was: Emacs's handling of line numbers]
Date: Mon, 19 Apr 2010 15:56:52 -0700

> My original idea was to implement some sort of undo for 
> narrowing using a ring structure and have narrow-to-region
> record that info for me. Because of this (which I think is ugly)
> I abandoned the plan.
> 
> In the end I implemented something that needs a user to explicitly
> record the state (bound to C-x n r).
> 
> The use case for me is this: suppose I am writing an around 50 page
> article in LaTeX and I don't feel like splitting it into 
> multiple files.
> But during writing I only want to focus on a portion of the article (a
> section for example), I can narrow to that section and record that
> state so that C-x n w will not expose me to the entire file.
> 
> I posted my code here http://paste.lisp.org/display/97993.

I think the code I posted does what you describe above for your use case, and
you can use it with regular narrowing and widening. Each buffer has its own ring
of restrictions.

Also, if you use bookmark+.el then you can also bookmark regions, IOW, have
persistence. Dunno, but it sounds like that too could be helpful for your use
case.





reply via email to

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