help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: How to test if the current line contains only white-spache?


From: Rolf Ade
Subject: Re: How to test if the current line contains only white-spache?
Date: Thu, 19 Nov 2015 14:54:31 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Emanuel Berg <embe8573@student.uu.se> writes:
> Rolf Ade <rolf@pointsman.de> writes:
>
>> Lesser moving the point around may help in finding
>> a better solution.
>
> Intuitively, it feels good not moving the point around
> too much from Elisp.

Yes, this is, what my instinct also telling me. But this instinct was
trained by other programming languages and environments. I'm aware, that
it may be not applicable to emacs lisp / emacs.

> Because, moving point around emulates how a human
> would solve the problem interactively (i.e., with the
> keyboard) contrary to how a computer could just access
> the data exactly where it is without any detour.

It's not so much the "moving point around emulates how a human would
solve the problem interactively" aspect, that feels suspicious to
me. It's more the "doing things by banking on side effects of function
calls" aspect (the "side effect" I'm talking about is moving the point
around).

For example within the emacs lisp code, I'm working atm I've a defun,
that moves point, then remembers the current point position, then calls
another defun, that further moves the point around and then back again
in my first defun I'm working on the so defind region.

Discussing programming concepts at such 'meta level' is difficult. But
maybe some may express their thinking about this. Is this 'moving point
around' in emacs lisp programming code the "right thing" to do (just
wrap it into a save-excursion and you're fine) or is it a signal, that I
haven't found the "right" way to takle the problem at hand with emacs
lisp?



reply via email to

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