From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#48058: tab-width's docstring Date: Tue, 27 Apr 2021 16:53:22 +0300 Message-ID: <83eeevj0kt.fsf@gnu.org> References: <87a6pj50u6.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18485"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 48058@debbugs.gnu.org To: Gustavo Barros Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Apr 27 15:54:13 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lbOAH-0004gD-Fe for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 27 Apr 2021 15:54:13 +0200 Original-Received: from localhost ([::1]:45736 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lbOAG-0004Dg-HO for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 27 Apr 2021 09:54:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60010) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lbOA6-0004DJ-F6 for bug-gnu-emacs@gnu.org; Tue, 27 Apr 2021 09:54:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36805) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lbOA6-0007un-86 for bug-gnu-emacs@gnu.org; Tue, 27 Apr 2021 09:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lbOA6-0006q4-5q for bug-gnu-emacs@gnu.org; Tue, 27 Apr 2021 09:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 27 Apr 2021 13:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48058 X-GNU-PR-Package: emacs Original-Received: via spool by 48058-submit@debbugs.gnu.org id=B48058.161953162526251 (code B ref 48058); Tue, 27 Apr 2021 13:54:02 +0000 Original-Received: (at 48058) by debbugs.gnu.org; 27 Apr 2021 13:53:45 +0000 Original-Received: from localhost ([127.0.0.1]:48351 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lbO9p-0006pJ-0R for submit@debbugs.gnu.org; Tue, 27 Apr 2021 09:53:45 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:51630) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lbO9n-0006p4-4m for 48058@debbugs.gnu.org; Tue, 27 Apr 2021 09:53:43 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:50646) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lbO9h-0007hN-T8; Tue, 27 Apr 2021 09:53:37 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3490 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lbO9h-0007Bj-66; Tue, 27 Apr 2021 09:53:37 -0400 In-Reply-To: <87a6pj50u6.fsf@gmail.com> (message from Gustavo Barros on Tue, 27 Apr 2021 10:11:30 -0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:205018 Archived-At: > From: Gustavo Barros > Date: Tue, 27 Apr 2021 10:11:30 -0300 > > In Emacs 27.2 the docstring for `tab-width' reads: > > "Distance between tab stops (for display of tab characters), in columns. > NOTE: This controls the display width of a TAB character, and not the > size of an indentation step." > > But this seems to contradict to the ubiquitous role in actual > indentation the option currently plays. It is used by `insert-tab' > directly. `tab-to-tab-stop' uses it if `tab-stop-list' is nil, as it is > by default. `indent-relative' may use `tab-to-tab-stop'. And, through > `indent-relative' and `insert-tab', `tab-width' also affects > `indent-for-tab-command'. Can you explain where you see the contradiction, exactly? If the indentation command (which is subject to major-mode differences, btw) actually inserts one or more TAB characters, then those TABs will look on display according to tab-width, of course, and that's not in any contradiction to what the doc string says. The doc string says something different: that an indentation step is not necessarily the number of columns that tab-width says, because a major mode can decide that it indents with spaces instead, for example (texinfo-mode, for example, does precisely that).