Subject: bug#42621: 26.3; Scheme mode: Wrong indentation (no indentation) when pressing tab

From: Kjetil Matheussen <[email-masked]>
Date: Thu, 6 Aug 2020 10:32:30 +0200

On Wed, Aug 5, 2020 at 8:33 PM Kjetil Matheussen
<[email-masked]> wrote:
>
> On Wed, Aug 5, 2020 at 8:30 PM Kjetil Matheussen
> <[email-masked]> wrote:
> >
> > On Wed, Aug 5, 2020 at 8:06 PM Simen Heggestøyl <[email-masked]> wrote:
> > >
> > > I can't reproduce the bug in Emacs 26.3 (nor in the Emacs 27.1 RC) by
> > > following the recipe from 'emacs -Q'.
> > >
> > > Kjetil Matheussen <[email-masked]> writes:
> > >
> > > > 8. The line is wrongly indented (no indentation).
> > >
> > > Assuming you mean you expect it to keep its indentation at column 2, but
> > > instead see it deindented to column 0 (which is wrong)?
> > >
> >
> > Yes, it's deindented to column 0.
> >
> > I couldn't reproduce it with "emacs -Q" either, but I minimized my
> > .emacs file down to the lines below to reproduce it. Can you reproduce
> > it now?
> >
>
> Actually, it's enough just to maximize the window:
>
> 1. emacs -Q
> 2. maximize emacs window
> 3.(same procedure)

Hmm, might have to load the file before maximizing the window. Full recipe:

1. wget http://users.notam02.no/~kjetism/emacsindentationbug.scm
2. emacs -Q emacsindentationbug.scm
3. maximize emacs window
4. Press Ctrl + S, search for "define column-widths"
5. The cursor should now be placed at line 2790
6. Press down-arrow so that that cursor is placed at line 2791
7. Press up -arrow so that the cursor is placed at line 2790 again.
8. Press TAB.
9. The line is wrongly indented (no indentation).

(again, it's important that the recipe is followed exactly, the bug
happens very often, but it was hard to find a way to reproduce it)

Regarding emacs versions, the same bug is present in 26.2 as well, but
the above recipe didn't work to reproduce it. I've been using emacs 25
for a few days now, and the bug seems to be gone in that version.