unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#24269: 24.5; Add optional arg to `eval-buffer' and `eval-region' to ignore invisible text
@ 2016-08-19 22:33 Drew Adams
  2019-07-27 14:58 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Drew Adams @ 2016-08-19 22:33 UTC (permalink / raw)
  To: 24269

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.

Or if the arg value is a cons (PROP . VALUE), with car a symbol, ignore
any text with property PROP that has value VALUE.

In GNU Emacs 24.5.1 (i686-pc-mingw32)
 of 2015-04-11 on LEG570
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=/c/usr --host=i686-pc-mingw32'





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#24269: 24.5; Add optional arg to `eval-buffer' and `eval-region' to ignore invisible text
  2016-08-19 22:33 bug#24269: 24.5; Add optional arg to `eval-buffer' and `eval-region' to ignore invisible text Drew Adams
@ 2019-07-27 14:58 ` Lars Ingebrigtsen
  2019-07-27 16:46   ` Drew Adams
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Ingebrigtsen @ 2019-07-27 14:58 UTC (permalink / raw)
  To: Drew Adams; +Cc: 24269

Drew Adams <drew.adams@oracle.com> writes:

> 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.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#24269: 24.5; Add optional arg to `eval-buffer' and `eval-region' to ignore invisible text
  2019-07-27 14:58 ` Lars Ingebrigtsen
@ 2019-07-27 16:46   ` Drew Adams
  0 siblings, 0 replies; 3+ messages in thread
From: Drew Adams @ 2019-07-27 16:46 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 24269

> > 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'?






^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-07-27 16:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-19 22:33 bug#24269: 24.5; Add optional arg to `eval-buffer' and `eval-region' to ignore invisible text Drew Adams
2019-07-27 14:58 ` Lars Ingebrigtsen
2019-07-27 16:46   ` Drew Adams

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).