[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#24269: 24.5; Add optional arg to `eval-buffer' and `eval-region' to
From: |
Drew Adams |
Subject: |
bug#24269: 24.5; Add optional arg to `eval-buffer' and `eval-region' to ignore invisible text |
Date: |
Sat, 27 Jul 2019 09:46:19 -0700 (PDT) |
> > Enhancement request. Add an optional argument to `eval-buffer' and
> > `eval-region'. When it is non-nil, ignore text that is invisible.
> >
> > More generally, maybe: if a (non-nil) symbol, interpret the symbol as
> a
> > text property, and ignore any text that has a non-nil value of that
> > property.
>
> I don't think that sounds like a clean interface for these functions.
> If you need stuff like this, it sounds like you should just write
> functions that do this for you. Closing.
It's not about me (or anyone) _needing_ this
behavior. It's about the _use cases_ of these
two commands.
It just _makes sense_ for these existing commands
to let you ignore certain zones of text.
They already do that (naturally) for sexps in
comments. Instead of commenting out a zone to
have it ignored, you could well want to eval
only specific zones of text.
That's in fact the _only_ use case of `eval-region':
it ignores text outside the region. Without this
command you would need to narrow the buffer and then
use `eval-buffer'.
Would you argue, using your same logic, that we
should get rid of `eval-region' because you can
always just narrow and use `eval-buffer'?