emacs-devel
[Top][All Lists]
Advanced

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

Re: forward-comment and syntax-ppss


From: Marcin Borkowski
Subject: Re: forward-comment and syntax-ppss
Date: Sat, 17 Dec 2016 08:37:41 +0100
User-agent: mu4e 0.9.17; emacs 26.0.50.1

On 2016-12-17, at 01:18, Dmitry Gutov <address@hidden> wrote:

> On 17.12.2016 01:08, Stefan Monnier wrote:
>
>> While it might be a good direction, it's not as simple as it sounds,
>> since many uses of the C-x n n command looks like "narrow to the region,
>> and then apply <blabla> to the whole buffer": I think it will be tricky
>> to make overlays that mimick this behavior sufficiently well.
>
> I suppose it would break that usage, yes.
>
> mark-whole-buffer should still work, though, as well as command 
> sequences that use it. Or if it doesn't, we could provide a replacement 
> command on that same binding. And some getters, like 
> visible-area-beginning and visible-area-end, for functions that know 
> that they want to act on user-mode narrowing (*).
>
> Someone who actually uses narrowing interactively should weigh in on how 
> costly that transition might be.
>
> (*) Not sure if that leads to the similar problems as we have now, 
> though, like some basic code not knowing whether to use point-min or 
> visible-area-beginning.

I use narrowing interactively /a lot/.  (It's almost one of the Emacs'
killer features.)  Sometimes I just want to perform a query-replace
limited to some region (I know it takes the active region into accout,
I just sometimes like narrowing better - then, I can quit query-replace,
fix something and hit (C-)M-% again.  (I could use recursive edit, but
I seldom remember about it.)

Another use case is plain visibility: sometimes I just don't want to see
anything but the part I'm working on.

Maybe there are other use cases.  I'll try to notice when I use
narrowing and see what they are.

Best,

-- 
Marcin Borkowski



reply via email to

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