unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* strange behavior of TAB when whitespace-mode activated
@ 2021-02-11 23:41 Frédéric Baldit
  2021-02-12  0:02 ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-02-12  0:10 ` Óscar Fuentes
  0 siblings, 2 replies; 3+ messages in thread
From: Frédéric Baldit @ 2021-02-11 23:41 UTC (permalink / raw)
  To: help-gnu-emacs


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



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: strange behavior of TAB when whitespace-mode activated
  2021-02-11 23:41 strange behavior of TAB when whitespace-mode activated Frédéric Baldit
@ 2021-02-12  0:02 ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-02-12  0:10 ` Óscar Fuentes
  1 sibling, 0 replies; 3+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-02-12  0:02 UTC (permalink / raw)
  To: help-gnu-emacs

Frédéric Baldit wrote:

> ....First.line.of.text.in.emacs$
> ..................Second one

I get this result for text-mode with and without
whitespace-mode...

GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu,
GTK+ Version 3.24.5, cairo version 1.16.0) of 2020-10-23

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: strange behavior of TAB when whitespace-mode activated
  2021-02-11 23:41 strange behavior of TAB when whitespace-mode activated Frédéric Baldit
  2021-02-12  0:02 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-02-12  0:10 ` Óscar Fuentes
  1 sibling, 0 replies; 3+ messages in thread
From: Óscar Fuentes @ 2021-02-12  0:10 UTC (permalink / raw)
  To: help-gnu-emacs

Frédéric Baldit <frederic.baldit@free.fr> writes:

> 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)

Reproduced in GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, X
toolkit, cairo version 1.16.0) of 2021-02-02 (native-comp).

Furthermore, if I disable/enable whitespace-mode, the view switches
between both results.




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-02-12  0:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-11 23:41 strange behavior of TAB when whitespace-mode activated Frédéric Baldit
2021-02-12  0:02 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-02-12  0:10 ` Óscar Fuentes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).