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

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

Re: Run terminal command with output in current buffer


From: Emanuel Berg
Subject: Re: Run terminal command with output in current buffer
Date: Mon, 19 Jul 2021 22:51:00 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Stefan Monnier via Users list for the GNU Emacs text editor wrote:

> AFAICT in your case you do want the variable(s) to contain
> different values at different times.

You know there is one and only one correct value that you are
supposed to use in the program, only to compute that you use
a loop, so the "you do want the variable(s) to contain
different values at different times" is only true in terms of
the computation of the final value, if you follow. But maybe
that qualifies?

> `setf` and `setq` are basically the same thing here.

I know right?

> BTW, if you really do want to avoid `setq` (and hence `setf`
> as well), you can of course do it, using recursion:

Yes, but maybe you really do want to avoid that even more...

Nah, I think `setq' in loops are the exception that confirms
the other rule, that one should only use it for global vars.

And when should you use global vars?

When they already exist :)

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

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