[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: widen-one-level [was: Emacs's handling of line numbers]
From: |
Leo |
Subject: |
Re: widen-one-level [was: Emacs's handling of line numbers] |
Date: |
Mon, 19 Apr 2010 18:57:18 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
On 2010-04-19 17:31 +0100, Drew Adams wrote:
>> Or something like that. Someone more knowledgable will no
>> doubt enlighten us.
>
> One (ugly) solution is to copy the Lisp source code for `narrow-to-defun' and
> `narrow-to-page' to the same library that advises `narrow-to-region'. That
> way,
> the advised definition is used also for the other two.
Yes. I suspect defadvice will do too.
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.
Leo
- Re: widen-one-level [was: Emacs's handling of line numbers], (continued)
- Re: widen-one-level [was: Emacs's handling of line numbers], Davis Herring, 2010/04/18
- Re: widen-one-level [was: Emacs's handling of line numbers], Richard Stallman, 2010/04/19
- RE: widen-one-level [was: Emacs's handling of line numbers], Drew Adams, 2010/04/19
- Re: widen-one-level [was: Emacs's handling of line numbers], Juri Linkov, 2010/04/19
- Re: widen-one-level [was: Emacs's handling of line numbers], Leo, 2010/04/18
- RE: widen-one-level [was: Emacs's handling of line numbers], Drew Adams, 2010/04/18
- Re: widen-one-level [was: Emacs's handling of line numbers], Leo, 2010/04/19
- RE: widen-one-level [was: Emacs's handling of line numbers], Drew Adams, 2010/04/19
- Re: widen-one-level [was: Emacs's handling of line numbers],
Leo <=
- RE: widen-one-level [was: Emacs's handling of line numbers], Drew Adams, 2010/04/19
- Re: widen-one-level [was: Emacs's handling of line numbers], Leo, 2010/04/22
- Re: Emacs's handling of line numbers [from bug#5042], Eli Zaretskii, 2010/04/17
- Re: Emacs's handling of line numbers [from bug#5042], Juanma Barranquero, 2010/04/17
- Re: Emacs's handling of line numbers [from bug#5042], Juri Linkov, 2010/04/18
- RE: Emacs's handling of line numbers [from bug#5042], Drew Adams, 2010/04/18
- Re: Emacs's handling of line numbers [from bug#5042], Lennart Borgman, 2010/04/18
- RE: Emacs's handling of line numbers [from bug#5042], Drew Adams, 2010/04/18
- Re: Emacs's handling of line numbers [from bug#5042], Juanma Barranquero, 2010/04/18
- Re: Emacs's handling of line numbers [from bug#5042], David Kastrup, 2010/04/18