[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
strange behavior of TAB when whitespace-mode activated
From: |
Frédéric Baldit |
Subject: |
strange behavior of TAB when whitespace-mode activated |
Date: |
Fri, 12 Feb 2021 00:41:53 +0100 |
Hi guys,
I'm experiencing something I don't understand (I came to this while
reading emacs manual): when in Text-mode, using TAB key doesn't lead to
the same result when whitespace-mode is or not activated. Here is my
minimal example:
1) open emacs on Text mode (file named e.g. test.txt)
2) type the following text ( «.» characters hereunder are used for
spaces, «$» for newline):
....First.line.of.text.in.emacs$
....Second one
3) delete some or all of the four spaces at beginning of line number 2
and put point at beginning of line 2:
....First.line.of.text.in.emacs$
..Second one
4) then, as it should be, typing on TAB key many times
moves automatically the text on line 2 to the beginning of the words of
line 1. For example after hitting four times on TAB we have:
....First.line.of.text.in.emacs$
..................Second one
(here on second line there may be some TABs inserted)
5) Now, if I proceed strictly identically from step 3), but with
whitespace-mode activated, I have the following strange result after
hitting TAB four times:
....First.line.of.text.in.emacs$
..........................Second one
(here also, on second line there may be some TABs inserted)
I found this both on emacs version 26.1 (old version installed from
debian 10 stable, which is the OS I currently use) and on 27.1.91
(compiled from git sources).
It seems to me it could be a bug, but I'm probably missing something
here, as I'm not an «emacs expert». Any help to explain this thing to
me would be greatly appreciated! (or confirmation that there may be a
bug)
--
Frédéric Baldit
- strange behavior of TAB when whitespace-mode activated,
Frédéric Baldit <=