GNU bug report logs - #18441
whitespace-mode sometimes adds column to tab character

Previous Next

Package: emacs;

Reported by: Mario Valencia <mariovalspi <at> gmail.com>

Date: Wed, 10 Sep 2014 06:56:02 UTC

Severity: normal

Tags: confirmed

Merged with 18548, 46590

Found in version 27.1.91

To reply to this bug, email your comments to 18441 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#18441; Package emacs. (Wed, 10 Sep 2014 06:56:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mario Valencia <mariovalspi <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 10 Sep 2014 06:56:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Mario Valencia <mariovalspi <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: tab bug
Date: Wed, 10 Sep 2014 01:55:42 -0500
[Message part 1 (text/plain, inline)]
In a buffer, set tab-width to 6. then insert 5 characters, then a literal
tab character (C-q TAB). Now you have a 7 column tab.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18441; Package emacs. (Wed, 10 Sep 2014 07:13:02 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Mario Valencia <mariovalspi <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: tab bug
Date: Wed, 10 Sep 2014 02:12:47 -0500
[Message part 1 (text/plain, inline)]
sorry, this happens in a text-mode buffer with whitespace-mode on. without
whitespace mode it only occupies one column.

2014-09-10 1:55 GMT-05:00 Mario Valencia <mariovalspi <at> gmail.com>:

> In a buffer, set tab-width to 6. then insert 5 characters, then a literal
> tab character (C-q TAB). Now you have a 7 column tab.
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18441; Package emacs. (Wed, 10 Sep 2014 07:44:02 GMT) Full text and rfc822 format available.

Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Mario Valencia <mariovalspi <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: tab bug
Date: Wed, 10 Sep 2014 02:42:50 -0500
[Message part 1 (text/plain, inline)]
well it appears to be a known problem, as commented in the source of
whitespace-mode.

2014-09-10 2:12 GMT-05:00 Mario Valencia <mariovalspi <at> gmail.com>:

> sorry, this happens in a text-mode buffer with whitespace-mode on. without
> whitespace mode it only occupies one column.
>
> 2014-09-10 1:55 GMT-05:00 Mario Valencia <mariovalspi <at> gmail.com>:
>
>> In a buffer, set tab-width to 6. then insert 5 characters, then a literal
>> tab character (C-q TAB). Now you have a 7 column tab.
>>
>
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18441; Package emacs. (Thu, 18 Feb 2016 08:54:02 GMT) Full text and rfc822 format available.

Message #14 received at 18441 <at> debbugs.gnu.org (full text, mbox):

From: Marcin Borkowski <mbork <at> mbork.pl>
To: Mario Valencia <mariovalspi <at> gmail.com>
Cc: 18441 <at> debbugs.gnu.org
Subject: Re: bug#18441: tab bug
Date: Thu, 18 Feb 2016 09:53:13 +0100
On 2014-09-10, at 03:42, Mario Valencia <mariovalspi <at> gmail.com> wrote:

> well it appears to be a known problem, as commented in the source of whitespace-mode. 

To be more precise, the comment Mario meant is probably this part of
definition of `whitespace-display-mappings':

--8<---------------cut here---------------start------------->8---
    ;; WARNING: the mapping below has a problem.
    ;; When a TAB occupies exactly one column, it will display the
    ;; character ?\xBB at that column followed by a TAB which goes to
    ;; the next TAB column.
    ;; If this is a problem for you, please, comment the line below.
    (tab-mark     ?\t    [?» ?\t] [?\\ ?\t])	; tab - right guillemet
--8<---------------cut here---------------end--------------->8---

Does anyone know why the workaround given there is not turned on by
default?  Or maybe it should be made a user option?

Best,

--
mbork


> 2014-09-10 2:12 GMT-05:00 Mario Valencia <mariovalspi <at> gmail.com>:
>
>
>  sorry, this happens in a text-mode buffer with whitespace-mode on. without whitespace mode it only occupies one column.
>
>  2014-09-10 1:55 GMT-05:00 Mario Valencia <mariovalspi <at> gmail.com>:
>
>
>  In a buffer, set tab-width to 6. then insert 5 characters, then a literal tab character (C-q TAB). Now you have a 7 column tab.




Changed bug title to 'whitespace-mode sometimes adds column to tab character' from 'tab bug' Request was from Noam Postavsky <npostavs <at> users.sourceforge.net> to control <at> debbugs.gnu.org. (Mon, 06 Jun 2016 03:08:02 GMT) Full text and rfc822 format available.

Severity set to 'minor' from 'normal' Request was from Noam Postavsky <npostavs <at> users.sourceforge.net> to control <at> debbugs.gnu.org. (Mon, 06 Jun 2016 03:08:02 GMT) Full text and rfc822 format available.

Added tag(s) confirmed. Request was from Noam Postavsky <npostavs <at> users.sourceforge.net> to control <at> debbugs.gnu.org. (Mon, 06 Jun 2016 03:08:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18441; Package emacs. (Sat, 04 Sep 2021 07:58:01 GMT) Full text and rfc822 format available.

Message #23 received at 18441 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Marcin Borkowski <mbork <at> mbork.pl>
Cc: 18441 <at> debbugs.gnu.org, Mario Valencia <mariovalspi <at> gmail.com>
Subject: Re: bug#18441: whitespace-mode sometimes adds column to tab character
Date: Sat, 04 Sep 2021 09:57:33 +0200
Marcin Borkowski <mbork <at> mbork.pl> writes:

>> well it appears to be a known problem, as commented in the source of
>> whitespace-mode.

I can confirm that this bug is still present in Emacs 28.

> To be more precise, the comment Mario meant is probably this part of
> definition of `whitespace-display-mappings':
>
>     ;; WARNING: the mapping below has a problem.
>     ;; When a TAB occupies exactly one column, it will display the
>     ;; character ?\xBB at that column followed by a TAB which goes to
>     ;; the next TAB column.
>     ;; If this is a problem for you, please, comment the line below.
>     (tab-mark     ?\t    [?» ?\t] [?\\ ?\t])	; tab - right guillemet
>
> Does anyone know why the workaround given there is not turned on by
> default?  Or maybe it should be made a user option?

If that mark is removed, then tabs won't be marked specially at all --
only with a background colour, which is presumably not what people want
here...

Looking at the whitespace code, I don't really see any easy way to fix
this -- the buffer display table and tab actions don't match?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18441; Package emacs. (Mon, 02 May 2022 09:49:01 GMT) Full text and rfc822 format available.

Message #26 received at 18441 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Marcin Borkowski <mbork <at> mbork.pl>
Cc: Mario Valencia <mariovalspi <at> gmail.com>, 18441 <at> debbugs.gnu.org
Subject: Re: bug#18441: whitespace-mode sometimes adds column to tab character
Date: Mon, 02 May 2022 11:48:46 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

>> To be more precise, the comment Mario meant is probably this part of
>> definition of `whitespace-display-mappings':

This looks like a duplicate of 18548, so I've now merged the two bug
reports.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Forcibly Merged 18441 18548. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 02 May 2022 09:49:02 GMT) Full text and rfc822 format available.

Forcibly Merged 18441 18548 46590. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 17 Jun 2022 15:38:02 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 360 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.