[ESS-bugs] ess-mode 18.10.3snapshot [<unknown>]; Indenting in stata mode seems to call ess-indent-line in an infinite loop
Martin Maechler
m@ech|er @end|ng |rom @t@t@m@th@ethz@ch
Thu Mar 14 17:08:58 CET 2019
>>>>> Alex Branham
>>>>> on Thu, 14 Mar 2019 10:53:15 -0500 writes:
> On Thu 14 Mar 2019 at 10:48, Brendan Halpin <brendan.halpin using ul.ie> wrote:
>> On Thu, Mar 14 2019, Alex Branham wrote:
>>
>>> Now the question becomes: Do we want to "fix" this? It seems a little
>>> crazy to me that stata-mode relies on R's indentation engine. We could
>>> just let stata-mode use Emacs's default indent-line-function (which is
>>> indent-relative) and add a note about this in the NEWS.
>>
>> I would prefer something that indents appropriately within loops, and
>> after line continuation markers:
>>
>> forvalues i = 1/5 {
>> di "`i'"
>> }
>>
>> line y x, lc(red) ///
>> yscale(log)
>>
>> I may be getting it wrong, but I don't think indent-relative will do this.
> You're right. I should've been clearer. A proper indentation engine for
> stata-mode would obviously be better. However, no one is actively
> working on stata-mode, so it's mostly in maintenance-only mode. Assuming
> no one steps forward and contributes a proper indentation engine for
> stata-mode, our options are either continue to rely on R's indentation
> (which, again, seems crazy to me) or rely on Emacs's defaults.
> Alex
If R's indentation is closer to what stata users expect,
*and* given the fact that this seems to have been the default
now for many years in ESS stata-mode, I strongly believe we
should continue to do so.
We could possibly "wrap" this by defining "ess-stata-indent"
(paraphrasing the true names)
and then define -- for the time being "ess-stata-indent" to call "ess-r-indent"
Martin
More information about the ESS-bugs
mailing list