all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#16990: 24.3.50; Return a useful value for motion functions
@ 2014-03-11 20:03 Drew Adams
  2016-04-29 18:00 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Drew Adams @ 2014-03-11 20:03 UTC (permalink / raw)
  To: 16990

Enhancement request: Return a useful value for motion functions, when
possible.

The set of candidate functions for enhancement are motion functions.
Yes, each needs to be checked in detail, and handled appropriately.
One size does not fit all.  A return value choice should be based on
what is generally most useful in the context of using the function.

This is the promised followup from the discussion for bug #15117.  See
that thread for more information (relevant functions, possible return
values, etc.)

In GNU Emacs 24.3.50.1 (i686-pc-mingw32) of 2014-03-04 on ODIEONE Bzr
 revision: 116662 kbrown@cornell.edu-20140304190249-6s13s5bwn3un3hfe
 Windowing system distributor `Microsoft Corp.', version 6.1.7601
 Configured using: `configure --prefix=/c/Devel/emacs/binary
 --enable-checking=yes,glyphs 'CFLAGS=-O0 -g3' 'CPPFLAGS=-DGC_MCHECK=1
 -Ic:/Devel/emacs/include' LDFLAGS=-Lc:/Devel/emacs/lib'





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

* bug#16990: 24.3.50; Return a useful value for motion functions
  2014-03-11 20:03 bug#16990: 24.3.50; Return a useful value for motion functions Drew Adams
@ 2016-04-29 18:00 ` Lars Ingebrigtsen
  2016-04-29 18:55   ` Drew Adams
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Ingebrigtsen @ 2016-04-29 18:00 UTC (permalink / raw)
  To: Drew Adams; +Cc: 16990

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

> Enhancement request: Return a useful value for motion functions, when
> possible.
>
> The set of candidate functions for enhancement are motion functions.
> Yes, each needs to be checked in detail, and handled appropriately.
> One size does not fit all.  A return value choice should be based on
> what is generally most useful in the context of using the function.
>
> This is the promised followup from the discussion for bug #15117.  See
> that thread for more information (relevant functions, possible return
> values, etc.)

I seem to recall that this was about you wanting side-effect-only
functions to return values?  The rest of us were against it, I think.
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#16990: 24.3.50; Return a useful value for motion functions
  2016-04-29 18:00 ` Lars Ingebrigtsen
@ 2016-04-29 18:55   ` Drew Adams
  0 siblings, 0 replies; 3+ messages in thread
From: Drew Adams @ 2016-04-29 18:55 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 16990

> > Enhancement request: Return a useful value for motion functions,
> > when possible.
> >
> > The set of candidate functions for enhancement are motion functions.
> > Yes, each needs to be checked in detail, and handled appropriately.
> > One size does not fit all.  A return value choice should be based on
> > what is generally most useful in the context of using the function.
> >
> > This is the promised followup from the discussion for bug #15117.  See
> > that thread for more information (relevant functions, possible return
> > values, etc.)
> 
> I seem to recall that this was about you wanting side-effect-only
> functions to return values?  The rest of us were against it, I think.
> Closing.

You seem to recall wrong.  There was no "rest of us were against
it" - at all.  And no, it was not as superficial and general as
my "wanting side-effect-only functions to return [useful] values".

Please read the Subject line.  This is about motion functions -
at least some of them, and to be examined on a case-by-case basis.

Here's Eli, saying the same thing (in the referenced bug thread)
I say in my 2nd sentence of this thread: one size does not fit all,
and suggesting reasonable (better) values for two such functions:

  Why point?  E.g., forward-to-indentation could returns the
  column where it ended up, forward-same-syntax could return
  the syntax class, forward-visible-line could return the
  number of screen lines traversed, etc.

  Once again, the potentially useful value might well be
  different for each function, and needs to be considered
  separately for each.  There's no "one fits all" here.

He clearly was thinking about the question, not just
applying a knee-jerk reaction that any suggestion of
having a side-effect function return a useful value is
silly.  He was carefully thinking about what the best
value might be for each of the functions he considered.

Yes, nil could be a reasonable return value for some such
functions.  But sometimes a better value is available.  This
bug is about finding such values and making the functions
return them.






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

end of thread, other threads:[~2016-04-29 18:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-11 20:03 bug#16990: 24.3.50; Return a useful value for motion functions Drew Adams
2016-04-29 18:00 ` Lars Ingebrigtsen
2016-04-29 18:55   ` Drew Adams

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.