[Top][All Lists]

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

Re: Automatic narrowing in Emacs?

From: David Kastrup
Subject: Re: Automatic narrowing in Emacs?
Date: Wed, 02 Jan 2019 15:14:29 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

David Sumbler <address@hidden> writes:

> I now realise that in these cases the buffer has been "narrowed".
> This is a useful feature of Emacs that I wasn't even aware of
> previously, and no doubt I shall start to use it intentionally in
> future.
> But I find that a large buffer gets narrowed automatically when I am
> editing, even though I have not given a command for this.  Even if I
> then issue a 'widen' command (Ctrl-x n w) the buffer gets narrowed
> again after short while.

The key sequences for narrowing are _disabled_ by default as narrowing
is confusing.  If you haven't enabled them, this should not be an issue.

Looking at LilyPond-mode, I see a few occurences of narrowing:

$ git grep narrow
lilypond-indent.el:      (narrow-to-region
lilypond-mode.el:      (narrow-to-region start end)
lilypond-song.el:          (narrow-to-region (or (mark) (point)) (point)))

Those are likely for purely programmatic reasons.  If you are plagued
here, you may want to review the respective Elisp passages to see if the
narrow-to-region sequences are reliably reversed (by being encapsulated
in constructs that are guaranteed to restore the state of narrowing even
when exited in error cases).

David Kastrup

reply via email to

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