From unknown Sat Jun 21 10:15:42 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#48058 <48058@debbugs.gnu.org> To: bug#48058 <48058@debbugs.gnu.org> Subject: Status: tab-width's docstring Reply-To: bug#48058 <48058@debbugs.gnu.org> Date: Sat, 21 Jun 2025 17:15:42 +0000 retitle 48058 tab-width's docstring reassign 48058 emacs submitter 48058 Gustavo Barros severity 48058 minor tag 48058 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 27 09:11:42 2021 Received: (at submit) by debbugs.gnu.org; 27 Apr 2021 13:11:42 +0000 Received: from localhost ([127.0.0.1]:48273 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lbNV8-0003WW-EM for submit@debbugs.gnu.org; Tue, 27 Apr 2021 09:11:42 -0400 Received: from lists.gnu.org ([209.51.188.17]:60712) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lbNV5-0003WN-G9 for submit@debbugs.gnu.org; Tue, 27 Apr 2021 09:11:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47746) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lbNV5-0001Rt-9A for bug-gnu-emacs@gnu.org; Tue, 27 Apr 2021 09:11:39 -0400 Received: from mail-qv1-xf2e.google.com ([2607:f8b0:4864:20::f2e]:37734) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lbNV2-0008DC-A4 for bug-gnu-emacs@gnu.org; Tue, 27 Apr 2021 09:11:39 -0400 Received: by mail-qv1-xf2e.google.com with SMTP id h15so19100181qvu.4 for ; Tue, 27 Apr 2021 06:11:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:user-agent:from:to:subject:message-id:date:mime-version; bh=6wiHPA78/93oBs2EBIQQSqOE70rTLpfO4jONP+PBcAw=; b=bqKCTxMviGo4An07HKYPLo8l1ct0Kp0kkry/0WMTNCIIbaFK+orjJrjiFEisb4f5Qn Q81i+uo0h2mzuw/v5Wzc3uTGPn1iMbhm6IzdY/WtGzmS+0Fpx/PNSavyoAw2K5CfYwfU 9+6yZslFcw/0xkVilPmvLmkW3a+gn/iozqVek8wThjcxxCIytRfqbrpo/xv0IXsbQMOf c2UI4M6RNHqfFNfiL75ts5RCvy4MLtwsFFWvoHoZmi09vzmarYfFgBInnbHl08RL2pVT Sfk0p2QjHzVV+UpT3vnD0QWOvMUtXOeN76cxXKrZcnhMoWtoHzbVsn4tw0lFEEC7gDua 0psw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:user-agent:from:to:subject:message-id :date:mime-version; bh=6wiHPA78/93oBs2EBIQQSqOE70rTLpfO4jONP+PBcAw=; b=ADMKu4EZSi4TTaxlWHi0vABgODMtT0umJFeEIw8O1gyfPb2ic7vkl3Ssw4ClpfsER1 WkhoJEoG6BoxYedEUwTQ9Ieb2N4iIjJB7gPU4ggNuch1739+EpT3lpPjk5WtWeGo3omI nzMdfQa3bgdwG9HAhwK5fvizVMzJ7NKUwks9JcfQ8WQqO3IIBbGlnCz+CGcEPyNr1K/E 7EoyHzD4gJpR3qNdTovJDJu3SUJCfglkz2hXwTksA43BPWDTEKsxWA4nGe+bkhb9CT1j dSkjLAR9tMv23MkcVt1oeqyW+Bm1AL+/hp9NlutFCiLdgTvSIWcM5uYz3030B5MIoFPe mRNQ== X-Gm-Message-State: AOAM533NwncLCb8gMD/wrcQq+TcSbu6BRPKGvAZlDyLD/KX89wI9PDvF QTEBEST7hJYSgtCqrScBlq9+85yaspRVvQ== X-Google-Smtp-Source: ABdhPJxhKqzgKYF1MNQIxkJq8fkuZQ2cFbRnXzSwYjPNfccj5U/S+QbcbGkO8zGQAT1ijlXns7LlLw== X-Received: by 2002:ad4:55d3:: with SMTP id bt19mr23521030qvb.11.1619529094689; Tue, 27 Apr 2021 06:11:34 -0700 (PDT) Received: from gusbrs-laptop ([212.102.61.109]) by smtp.gmail.com with ESMTPSA id f22sm13994155qtg.77.2021.04.27.06.11.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Apr 2021 06:11:34 -0700 (PDT) User-agent: mu4e 1.4.15; emacs 27.2 From: Gustavo Barros To: bug-gnu-emacs@gnu.org Subject: tab-width's docstring Message-ID: <87a6pj50u6.fsf@gmail.com> Date: Tue, 27 Apr 2021 10:11:30 -0300 MIME-Version: 1.0 Content-Type: text/plain; format=flowed Received-SPF: pass client-ip=2607:f8b0:4864:20::f2e; envelope-from=gusbrs.2016@gmail.com; helo=mail-qv1-xf2e.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) Hi All, 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'. Am I missing something? Or is this docstring the remnant of a previous change which was left behind? Best regards, Gustavo. From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 27 09:53:45 2021 Received: (at 48058) by debbugs.gnu.org; 27 Apr 2021 13:53:45 +0000 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 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 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 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 Date: Tue, 27 Apr 2021 16:53:22 +0300 Message-Id: <83eeevj0kt.fsf@gnu.org> From: Eli Zaretskii To: Gustavo Barros In-Reply-To: <87a6pj50u6.fsf@gmail.com> (message from Gustavo Barros on Tue, 27 Apr 2021 10:11:30 -0300) Subject: Re: bug#48058: tab-width's docstring References: <87a6pj50u6.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 48058 Cc: 48058@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > 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). From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 27 10:40:30 2021 Received: (at 48058) by debbugs.gnu.org; 27 Apr 2021 14:40:30 +0000 Received: from localhost ([127.0.0.1]:50478 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lbOt3-0002IR-Sx for submit@debbugs.gnu.org; Tue, 27 Apr 2021 10:40:30 -0400 Received: from mail-qk1-f169.google.com ([209.85.222.169]:40863) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lbOt2-0002IE-LN for 48058@debbugs.gnu.org; Tue, 27 Apr 2021 10:40:29 -0400 Received: by mail-qk1-f169.google.com with SMTP id q136so39202364qka.7 for <48058@debbugs.gnu.org>; Tue, 27 Apr 2021 07:40:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:references:user-agent:from:to:cc:subject:in-reply-to :message-id:date:mime-version; bh=d+QZM1v+psn9OyJ/kufnVZBqoROtu9TjyGJIj/2kLcc=; b=D6HyXAZ8kocFNNVEKez097FgkM0EsZUy6RPqZtQKPCih8jeSHf1JDjlLUE56uUJIQc NUbsYElhKJDgJX/PRJWgt3IEsdHxOuc7JbwR6WYYsgFhYMT6e6/VenxMQhW3OVKbN6hI wK4LSsBiwkLzlvxyRqyTs238b0Ccy6xscuX6RMKy0Z5xFr4i7WvUfFDyPEw37b7UggNi mEQjzJVANDEQ/23DtvcwgSUAfbQPwESjqIsKmtJEFuAdb94U7xLUaMJ/BLF55KBykRrN rEBlV4osG+4sSp0bd7A0s7uPLlGL3hcE26YG5v1uLel2g8gs+txPzEn5rdinAx48npcF 61fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:references:user-agent:from:to:cc:subject :in-reply-to:message-id:date:mime-version; bh=d+QZM1v+psn9OyJ/kufnVZBqoROtu9TjyGJIj/2kLcc=; b=An1a0C0u8kYAsbGfnnKl7CJxuNWVipuZ1Hsl5AkAs8B8z1KiWFG+SMU2TowB+IJtxU wj73f80xTMUuwwLUPxUKt2sXMyGYTsOJOZN6B8AEoVVP1ma6ymaYMJHRqu0fGF94LLe4 WSpdRnHLDlPSLMEQHNMRwSc8OYEsbYrIElKSzvTNh9axJy6DhIRxoOZgoll1uqEm1R8j +xJ9ba8Wnq4vmzacikfmffqqeLqYCt0Ui6weCMSgnF1vrufdi9SaIvTEBCJ+kJILSZjY k3oiE/eMeoXOS8P9Es55dRjhj+IOV3pz8spZdBixRsKfzHhD9r8r9YNOmrSVn/KPlVXQ C/Tw== X-Gm-Message-State: AOAM532bXKVjRPoSlwrZq7P7Pr1Ua2QWEvzkMMIYFdTl/7627qgjBqvK cHhgVwd3GSOnGmhuJLV55vH4dQJTUfGxaw== X-Google-Smtp-Source: ABdhPJxxO1Y8TbGyyztUOJipx/CMmTjcpRYw2+dn5TQ7uJkfJbaJmambyf+ynOytkk5/PWR3+5KdAQ== X-Received: by 2002:a37:46d5:: with SMTP id t204mr22716500qka.211.1619534422745; Tue, 27 Apr 2021 07:40:22 -0700 (PDT) Received: from gusbrs-laptop ([212.102.61.109]) by smtp.gmail.com with ESMTPSA id c2sm3029519qkk.2.2021.04.27.07.40.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Apr 2021 07:40:22 -0700 (PDT) References: <87a6pj50u6.fsf@gmail.com> <83eeevj0kt.fsf@gnu.org> User-agent: mu4e 1.4.15; emacs 27.2 From: Gustavo Barros To: Eli Zaretskii Subject: Re: bug#48058: tab-width's docstring In-reply-to: <83eeevj0kt.fsf@gnu.org> Message-ID: <87wnsnkcz1.fsf@gmail.com> Date: Tue, 27 Apr 2021 11:40:18 -0300 MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 48058 Cc: 48058@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) Hi Eli, On Tue, 27 Apr 2021 at 10:53, Eli Zaretskii wrote: >> 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). So indeed, I might be missing something. But I really cannot combine what the docstring says and what the option actually does, so I'll try to explain why I think that's the case. And I'll either learn something or, if my confusion may potentially affect other people, leave the docstring clearer somehow. The docstring explicitly says `tab-width' "controls the display width of a TAB character, and not the size of an indentation step". And btw, I know the actual behavior of indentation is subject to major-mode differences. And also of some user options. Let's say `emacs-lisp-mode', and let's say I've `indent-tabs-mode' set to nil. Calling `tab-to-tab-stop' will actually insert 8 spaces in my buffer, as per the default `tab-width'. If `tab-always-indent' is nil, this also extends to `indent-for-tab-command'. There is no "TAB character" involved, and also no issue about what is its "display width". As far as I understand it, what `tab-width' is determining is precisely the "indentation step". Or am I getting this wrong? As far as I get, what `tab-width' is doing it is being used as the default width of an indentation step regardless of whether this indentation is done with a TAB character or with spaces. And, of course, this also matches the display width of the TAB character. But the docstring reads to me as explicitly denying the first role. Does this make sense? Or, at least, could I convey why I am confused by the docstring? Best regards, Gustavo. From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 27 11:02:32 2021 Received: (at 48058) by debbugs.gnu.org; 27 Apr 2021 15:02:32 +0000 Received: from localhost ([127.0.0.1]:50519 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lbPEO-0004va-17 for submit@debbugs.gnu.org; Tue, 27 Apr 2021 11:02:32 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44232) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lbPEL-0004qK-TT for 48058@debbugs.gnu.org; Tue, 27 Apr 2021 11:02:30 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51926) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lbPEG-0006qh-LN; Tue, 27 Apr 2021 11:02:24 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3938 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lbPEC-0006CT-FC; Tue, 27 Apr 2021 11:02:21 -0400 Date: Tue, 27 Apr 2021 18:02:05 +0300 Message-Id: <8335vbixea.fsf@gnu.org> From: Eli Zaretskii To: Gustavo Barros In-Reply-To: <87wnsnkcz1.fsf@gmail.com> (message from Gustavo Barros on Tue, 27 Apr 2021 11:40:18 -0300) Subject: Re: bug#48058: tab-width's docstring References: <87a6pj50u6.fsf@gmail.com> <83eeevj0kt.fsf@gnu.org> <87wnsnkcz1.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 48058 Cc: 48058@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Gustavo Barros > Cc: 48058@debbugs.gnu.org > Date: Tue, 27 Apr 2021 11:40:18 -0300 > > Let's say `emacs-lisp-mode', and let's say I've `indent-tabs-mode' set > to nil. Calling `tab-to-tab-stop' will actually insert 8 spaces in my > buffer, as per the default `tab-width'. If `tab-always-indent' is nil, > this also extends to `indent-for-tab-command'. There is no "TAB > character" involved, and also no issue about what is its "display > width". As far as I understand it, what `tab-width' is determining is > precisely the "indentation step". Or am I getting this wrong? This is major mode dependent. Try the same in C mode, for example, and you will see the difference. The function that indents the line is specific to the major mode. If you want to understand why you see what you see in emacs-lisp-mode, look at lisp-indent-line. But even in emacs-lisp-mode, what did you expect to happen instead? (indent-tabs-mode, btw, just uses spaces instead of TABs, but it still inserts the amount of spaces equivalent to a TAB where otherwise a TAB would have been inserted.) From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 27 11:15:02 2021 Received: (at 48058) by debbugs.gnu.org; 27 Apr 2021 15:15:03 +0000 Received: from localhost ([127.0.0.1]:50548 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lbPQU-0005L8-9f for submit@debbugs.gnu.org; Tue, 27 Apr 2021 11:15:02 -0400 Received: from mail-qv1-f51.google.com ([209.85.219.51]:35708) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lbPQR-0005Kc-Li for 48058@debbugs.gnu.org; Tue, 27 Apr 2021 11:15:00 -0400 Received: by mail-qv1-f51.google.com with SMTP id x27so29173949qvd.2 for <48058@debbugs.gnu.org>; Tue, 27 Apr 2021 08:14:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:references:user-agent:from:to:cc:subject:in-reply-to :message-id:date:mime-version; bh=DD3OrSVxb85s0orJtqZxZGJn5oEkdFYJ2+X8ki/1Mxo=; b=RN9K3vxIt61epKj8l7xJSaQbmrAx8VIhJPn7f86RqDcGvw83wSyrNJFsIBPCoKC/X9 rx5RCeqDfoqczyXGG+0iWHC0IS6aMyL18XVQn2r5YxVUQAD66lCPEws/o7nS8m6jb2MT Bea3osJd6SWdNDznAdPt5RbytZlDbeDnCEgz+JoxPVpB6vYz0k8gyaHHMimyBE/nSce+ 4pjZv7CGWvF+UBGFaIBCP3bl2BThv6BMvFi75EoJHuDtuiZk3gT1uHNfZ0EejIkkWIKU JpV+irVgA7iBl7BuQ9vWu7sdoFjOkuX8GI+WMmG06YXLQubluVxHkqnt1dO83WL5qgzQ onrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:references:user-agent:from:to:cc:subject :in-reply-to:message-id:date:mime-version; bh=DD3OrSVxb85s0orJtqZxZGJn5oEkdFYJ2+X8ki/1Mxo=; b=SM+1BgdmwRIOLtE2yqKRotgvY/Das1TCJTnQVLnZZBVkFmKVkDzB02E1gZEuMq9vp1 MaZmYUJMzvTABZ4qcvuyE6iwTLlaMgboCGo1EW9RKTu2fSHctCvRu44kvGM3aqSl9a98 vRr0L047/i2g9JhmSgpIqUV59MPhIX+nymTG3psXg4fIOGwuV5YrEg20nG6JKzBWgVZY q6y8Pqd156eszTxnC9TNqMPbBG5dTqc+5iFz7Tdg0gBNEtMzBmch177QMAemhylsPQw+ zrqdLGA2okVlvYQ+B8FwdrdNL/EyDZw9IGm0VLspofrL05qKqjft6M+7YghH1ZbhQTYN zbnA== X-Gm-Message-State: AOAM533zf2Sdd/4fsaQe6PUlLPDSEBvTXQoMqPU0ZmJBVgkiVui4xegA dy15IbOWJDzvlawNgAIdArfD1YqXVAjKaw== X-Google-Smtp-Source: ABdhPJxBfAinEpZB4FfLUkjB9TKJ8AOFEqm3lHzdPuSz+wK8glsvUY6xax7a1Cc+x3rDUuhvLiwkFQ== X-Received: by 2002:ad4:4523:: with SMTP id l3mr8442395qvu.57.1619536493905; Tue, 27 Apr 2021 08:14:53 -0700 (PDT) Received: from gusbrs-laptop ([212.102.61.109]) by smtp.gmail.com with ESMTPSA id 1sm2922877qka.52.2021.04.27.08.14.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Apr 2021 08:14:53 -0700 (PDT) References: <87a6pj50u6.fsf@gmail.com> <83eeevj0kt.fsf@gnu.org> <87wnsnkcz1.fsf@gmail.com> <8335vbixea.fsf@gnu.org> User-agent: mu4e 1.4.15; emacs 27.2 From: Gustavo Barros To: Eli Zaretskii Subject: Re: bug#48058: tab-width's docstring In-reply-to: <8335vbixea.fsf@gnu.org> Message-ID: <87tunrkbdi.fsf@gmail.com> Date: Tue, 27 Apr 2021 12:14:50 -0300 MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 48058 Cc: 48058@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) On Tue, 27 Apr 2021 at 12:02, Eli Zaretskii wrote: >> From: Gustavo Barros >> Cc: 48058@debbugs.gnu.org >> Date: Tue, 27 Apr 2021 11:40:18 -0300 >> >> Let's say `emacs-lisp-mode', and let's say I've `indent-tabs-mode' >> set >> to nil. Calling `tab-to-tab-stop' will actually insert 8 spaces in >> my >> buffer, as per the default `tab-width'. If `tab-always-indent' is >> nil, >> this also extends to `indent-for-tab-command'. There is no "TAB >> character" involved, and also no issue about what is its "display >> width". As far as I understand it, what `tab-width' is determining >> is >> precisely the "indentation step". Or am I getting this wrong? > > This is major mode dependent. Try the same in C mode, for example, > and you will see the difference. The function that indents the line > is specific to the major mode. If you want to understand why you see > what you see in emacs-lisp-mode, look at lisp-indent-line. > > But even in emacs-lisp-mode, what did you expect to happen instead? > (indent-tabs-mode, btw, just uses spaces instead of TABs, but it still > inserts the amount of spaces equivalent to a TAB where otherwise a TAB > would have been inserted.) I didn't expect anything different to happen. It is just that `tab-width' is determining more than just the "display width of the TAB character": if you (or the major-mode for you) are indenting with spaces the content of the buffer is different according to `tab-width', it not just a matter of "display". But I see your point, and perhaps the docstring is clearer to someone more seasoned than myself, and avoids other pitfalls along the way which I do not even see. Hopefully, it will feel just as clear to me someday. ;-) Thanks for answering, and feel free to close. Best regards, Gustavo. From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 27 11:32:46 2021 Received: (at 48058) by debbugs.gnu.org; 27 Apr 2021 15:32:46 +0000 Received: from localhost ([127.0.0.1]:50604 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lbPhe-0005rT-6V for submit@debbugs.gnu.org; Tue, 27 Apr 2021 11:32:46 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58258) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lbPhb-0005rF-Ca for 48058@debbugs.gnu.org; Tue, 27 Apr 2021 11:32:45 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:52669) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lbPhW-0002cC-4q; Tue, 27 Apr 2021 11:32:38 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1808 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lbPhR-0001nt-NZ; Tue, 27 Apr 2021 11:32:34 -0400 Date: Tue, 27 Apr 2021 18:32:21 +0300 Message-Id: <83y2d3hhfe.fsf@gnu.org> From: Eli Zaretskii To: Gustavo Barros In-Reply-To: <87tunrkbdi.fsf@gmail.com> (message from Gustavo Barros on Tue, 27 Apr 2021 12:14:50 -0300) Subject: Re: bug#48058: tab-width's docstring References: <87a6pj50u6.fsf@gmail.com> <83eeevj0kt.fsf@gnu.org> <87wnsnkcz1.fsf@gmail.com> <8335vbixea.fsf@gnu.org> <87tunrkbdi.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 48058 Cc: 48058@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Gustavo Barros > Cc: 48058@debbugs.gnu.org > Date: Tue, 27 Apr 2021 12:14:50 -0300 > > I didn't expect anything different to happen. It is just that > `tab-width' is determining more than just the "display width of the TAB > character": if you (or the major-mode for you) are indenting with spaces > the content of the buffer is different according to `tab-width', it not > just a matter of "display". > > But I see your point, and perhaps the docstring is clearer to someone > more seasoned than myself, and avoids other pitfalls along the way which > I do not even see. Hopefully, it will feel just as clear to me someday. > ;-) Fair enough, let's see if there are other opinions about this. From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 29 13:05:48 2021 Received: (at 48058) by debbugs.gnu.org; 29 Apr 2021 17:05:48 +0000 Received: from localhost ([127.0.0.1]:56719 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lcA6l-0003q8-PG for submit@debbugs.gnu.org; Thu, 29 Apr 2021 13:05:47 -0400 Received: from mail-pj1-f44.google.com ([209.85.216.44]:47038) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lcA6k-0003pv-0k for 48058@debbugs.gnu.org; Thu, 29 Apr 2021 13:05:46 -0400 Received: by mail-pj1-f44.google.com with SMTP id u14-20020a17090a1f0eb029014e38011b09so212579pja.5 for <48058@debbugs.gnu.org>; Thu, 29 Apr 2021 10:05:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc; bh=q38HVrIIC9y0AUK8wSPQl7WA6ccm2jfv/vJj5H+IB/I=; b=X+gU+pqhmyOIHcZZRapeKB18Um1P7wwwjDtb9HPh9Weu+b3GNmDfxAT7VsnBIlqsrF P3dbJCh7tI0j49tRCIRdpvsp7m9VjUAKCvfFz0DLZyiXQOJ2qj6FzDQLsUF9SezD16b1 hW3hnEyrDDoq3ms+7llGU/va9+fzcrXTS0XRaR2PnJ3B1onLf6dV0Ymb6Qou3ls5A8t1 Ty1XM21O+mZP19H5m5mOjv5/cJdyFbMa5rdqJ3eOnvnrXsz9HB4TQkfL0keB671eZMSE yBaC8nN40BAzAQkqzxALCiqDPfeKBojxbNfpjekdjtGbKWmmJNhNDIp53L/qeTGNIWLm itKg== X-Gm-Message-State: AOAM531hNwDipBslUzztxl5y7dJ3edbrz2wWW2Tgj9t7JMknjvd+lv0L dx8Y1p98rY6c5qncBU8fqOOjpYcdcstOYDaieqU= X-Google-Smtp-Source: ABdhPJzCjHM1+z8GCW3DG965KhRLvysnoTQ/nje9Wwu5ElJx/iRNJKJk6yfwlii3aDGk2poJHbwY++/MRAMaQhjXPpI= X-Received: by 2002:a17:90b:350:: with SMTP id fh16mr888452pjb.104.1619715940253; Thu, 29 Apr 2021 10:05:40 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 29 Apr 2021 12:05:39 -0500 From: Stefan Kangas In-Reply-To: <83y2d3hhfe.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 27 Apr 2021 18:32:21 +0300") References: <87a6pj50u6.fsf@gmail.com> <83eeevj0kt.fsf@gnu.org> <87wnsnkcz1.fsf@gmail.com> <8335vbixea.fsf@gnu.org> <87tunrkbdi.fsf@gmail.com> <83y2d3hhfe.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Date: Thu, 29 Apr 2021 12:05:39 -0500 Message-ID: Subject: Re: bug#48058: tab-width's docstring To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 48058 Cc: 48058@debbugs.gnu.org, Gustavo Barros X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) Eli Zaretskii writes: >> I didn't expect anything different to happen. It is just that >> `tab-width' is determining more than just the "display width of the TAB >> character": if you (or the major-mode for you) are indenting with spaces >> the content of the buffer is different according to `tab-width', it not >> just a matter of "display". >> >> But I see your point, and perhaps the docstring is clearer to someone >> more seasoned than myself, and avoids other pitfalls along the way which >> I do not even see. Hopefully, it will feel just as clear to me someday. >> ;-) > > Fair enough, let's see if there are other opinions about this. I agree that the docstring is somewhat confusing, as it seems to rule out that this variable is ever used to control indentation. But some major modes do precisely that. Perhaps we could change the docstring note along the lines of: NOTE: Some major modes use this variable to determine an indentation step, but Emacs itself only uses this to display the width of a TAB character. Would something like that make sense? --- Also the last line of the docstring is odd to me: This should be an integer greater than zero. Should the "should" be changed to "must"? From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 29 13:06:00 2021 Received: (at control) by debbugs.gnu.org; 29 Apr 2021 17:06:00 +0000 Received: from localhost ([127.0.0.1]:56722 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lcA6y-0003qX-0r for submit@debbugs.gnu.org; Thu, 29 Apr 2021 13:06:00 -0400 Received: from mail-pg1-f180.google.com ([209.85.215.180]:47068) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lcA6v-0003qL-JZ for control@debbugs.gnu.org; Thu, 29 Apr 2021 13:05:58 -0400 Received: by mail-pg1-f180.google.com with SMTP id j189so581627pgd.13 for ; Thu, 29 Apr 2021 10:05:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:date:message-id:subject:to; bh=STEIIuP7ZgDjg6XZWeT3NG1HXKHnHlW0f7vIqXGfCl0=; b=gyORWsYVKEnnoyu84x8nuBxFwcQknfYgbiZIduyIDJ2py9/dxhA/U88Ea+huQaRPDz Gm+apTxmGblxhMBRFnmvYuGNKgO67OdQZKhMOQv6OMx/08I58c/0cc9oVZMmFRIOm7ZZ vFHOoROoamOsaO1Uf/VULecP5MqM6/yaXNcioagTSN/q45gHPdvevP3rf5FnPaZas6Pn giZ56bz1X/1owLi+liTESBVE7wITl7XsKR++FTofnUMV6DZHxEte/ITQ5YvV456uaflr AI/l67IW4WQ+bXr/b2HRjKlMJhuGYJfdliGNbhxaYzj9goKdDVSuOkfol88MPr1xFH4H vs9Q== X-Gm-Message-State: AOAM532pmP1mJDskxtuf8E3t4yZT8KYrD39YxInx+WqZmpmrwqKQ2rad 2daFSM9uPMTQLdnGeXZr08qO+yUfdbRJXPDZDRBcdMLN X-Google-Smtp-Source: ABdhPJxrOgYKO+v7Zm9x/ZQU9Im4bxk4AOdS3MtL56f89VS42pwqdNXLBVOjQCChmJ7PaQVQTznq61LGZGg/pQ/RXKc= X-Received: by 2002:a05:6a00:238c:b029:274:70be:f085 with SMTP id f12-20020a056a00238cb029027470bef085mr949887pfc.58.1619715951897; Thu, 29 Apr 2021 10:05:51 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 29 Apr 2021 12:05:51 -0500 From: Stefan Kangas MIME-Version: 1.0 Date: Thu, 29 Apr 2021 12:05:51 -0500 Message-ID: Subject: To: control@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 2.5 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: severity 48058 minor thanks Content analysis details: (2.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (stefankangas[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.215.180 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.215.180 listed in wl.mailspike.net] 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 2.0 BLANK_SUBJECT Subject is present but empty 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.5 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: severity 48058 minor thanks Content analysis details: (1.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.215.180 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.215.180 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (stefankangas[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 2.0 BLANK_SUBJECT Subject is present but empty 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager severity 48058 minor thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 29 13:35:35 2021 Received: (at 48058) by debbugs.gnu.org; 29 Apr 2021 17:35:36 +0000 Received: from localhost ([127.0.0.1]:56759 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lcAZb-00089o-7f for submit@debbugs.gnu.org; Thu, 29 Apr 2021 13:35:35 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57328) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lcAZW-00087K-OK for 48058@debbugs.gnu.org; Thu, 29 Apr 2021 13:35:34 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46798) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcAZR-0003iv-Bn; Thu, 29 Apr 2021 13:35:25 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4125 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lcAZQ-0005Jo-1P; Thu, 29 Apr 2021 13:35:24 -0400 Date: Thu, 29 Apr 2021 20:35:13 +0300 Message-Id: <83pmydc7u6.fsf@gnu.org> From: Eli Zaretskii To: Stefan Kangas In-Reply-To: (message from Stefan Kangas on Thu, 29 Apr 2021 12:05:39 -0500) Subject: Re: bug#48058: tab-width's docstring References: <87a6pj50u6.fsf@gmail.com> <83eeevj0kt.fsf@gnu.org> <87wnsnkcz1.fsf@gmail.com> <8335vbixea.fsf@gnu.org> <87tunrkbdi.fsf@gmail.com> <83y2d3hhfe.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 48058 Cc: 48058@debbugs.gnu.org, gusbrs.2016@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stefan Kangas > Date: Thu, 29 Apr 2021 12:05:39 -0500 > Cc: Gustavo Barros , 48058@debbugs.gnu.org > > I agree that the docstring is somewhat confusing, as it seems to rule > out that this variable is ever used to control indentation. But some > major modes do precisely that. > > Perhaps we could change the docstring note along the lines of: > > NOTE: Some major modes use this variable to determine an indentation > step, but Emacs itself only uses this to display the width of a TAB > character. > > Would something like that make sense? Something like that, yes. Perhaps just making the original text less definitive will do as well. > Also the last line of the docstring is odd to me: > > This should be an integer greater than zero. > > Should the "should" be changed to "must"? Those two are equivalent in this context. From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 29 16:15:11 2021 Received: (at 48058) by debbugs.gnu.org; 29 Apr 2021 20:15:12 +0000 Received: from localhost ([127.0.0.1]:56865 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lcD43-0000XA-Ni for submit@debbugs.gnu.org; Thu, 29 Apr 2021 16:15:11 -0400 Received: from mail-qt1-f180.google.com ([209.85.160.180]:45797) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lcD42-0000Wt-CR for 48058@debbugs.gnu.org; Thu, 29 Apr 2021 16:15:10 -0400 Received: by mail-qt1-f180.google.com with SMTP id l1so10327899qtr.12 for <48058@debbugs.gnu.org>; Thu, 29 Apr 2021 13:15:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:references:user-agent:from:to:cc:subject:in-reply-to :message-id:date:mime-version; bh=9FphxOk64xCowQYlmGG9FkiRSudGEIIXByvqCBXImRA=; b=T3RHWDQ6/eyh6u4m5aNF5bidRAPS+YDpFlLMynUbKlqeB0jzD0v2vKdkkO1p18glUc svjqNJeZkg45bhNFCL5YBrY0Uzc8Gdx7Podfkyq4gnSWoLshoLoQZ9BXSeXFDCZnjlTa 01YlJibdBb609u/hqmL6/tCmECIpzZRuT36pnSOcr6gJ0hwV9Ad1WcEmdAGQ5EjEDrxV /M3QhXrRULdLc2HXfXvSfCzrNim8opWG0rpwa6noMNQ1ntcHgbDSbi3TbEznHX4TDNTl IRqYdqUKICQyMEee484A+kKPFZnGFdcArpQxJD+8doBYbHqLQ3uINPvWo+Llp9Dpil4J Z3tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:references:user-agent:from:to:cc:subject :in-reply-to:message-id:date:mime-version; bh=9FphxOk64xCowQYlmGG9FkiRSudGEIIXByvqCBXImRA=; b=eYZ69FfrIc8E3i0IHVTr9yUcf6N2V9+4tQbkKnZQ0TWyoyk7CrUS+I8uQP/3kEjee+ trm3vteO2bzgqF1YwE5Inc0pIPjLmvA55xLbjb9o75kmQYsrQOPyxE1XPBNKKjOCE+PC 9eM0dfzwMOYBbV7kWL0lodtQiExrwK2H1QFms6GUFFOxi9P0Ba88yS6NofwpUKX/OLpU IV8iZ1Z49iUMVJl3RT3fUoEK/WC3ry5HbaEJZnysc5yR769NQHbK0KYIp0R64IaazJnp 63NVGRDMhIadw36pen4d2yBdNcLXmQU5lrdVPQtoqtq/1xt5UmOGOMPd9KP+qzVR9Qou Llkw== X-Gm-Message-State: AOAM531yOY12rPE7BlWtQx8HjT9TRK/aiubmluVb9NNsGOb0u4f15CS7 OMkn+DM4lTWRepatRLI3Lz1JhhuvDWDvMw== X-Google-Smtp-Source: ABdhPJwpxWbIROlUuhxDmzXcwTLREkOuqmnIpiKx/wyngUHHTcCyhydmhJaHnjRcIqMjdVKCNNxgSg== X-Received: by 2002:ac8:4658:: with SMTP id f24mr951689qto.375.1619727304734; Thu, 29 Apr 2021 13:15:04 -0700 (PDT) Received: from gusbrs-laptop ([154.21.22.220]) by smtp.gmail.com with ESMTPSA id q26sm707064qtr.7.2021.04.29.13.15.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Apr 2021 13:15:04 -0700 (PDT) References: <87a6pj50u6.fsf@gmail.com> <83eeevj0kt.fsf@gnu.org> <87wnsnkcz1.fsf@gmail.com> <8335vbixea.fsf@gnu.org> <87tunrkbdi.fsf@gmail.com> <83y2d3hhfe.fsf@gnu.org> <83pmydc7u6.fsf@gnu.org> User-agent: mu4e 1.4.15; emacs 27.2 From: Gustavo Barros To: Eli Zaretskii Subject: Re: bug#48058: tab-width's docstring In-reply-to: <83pmydc7u6.fsf@gnu.org> Message-ID: <874kfo26gt.fsf@gmail.com> Date: Thu, 29 Apr 2021 17:14:59 -0300 MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 48058 Cc: 48058@debbugs.gnu.org, Stefan Kangas X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Thu, 29 Apr 2021 at 14:35, Eli Zaretskii wrote: >> From: Stefan Kangas >> Date: Thu, 29 Apr 2021 12:05:39 -0500 >> Cc: Gustavo Barros , 48058@debbugs.gnu.org >> >> I agree that the docstring is somewhat confusing, as it seems to rule >> out that this variable is ever used to control indentation. But some >> major modes do precisely that. >> >> Perhaps we could change the docstring note along the lines of: >> >> NOTE: Some major modes use this variable to determine an >> indentation >> step, but Emacs itself only uses this to display the width of a >> TAB >> character. >> >> Would something like that make sense? > > Something like that, yes. Perhaps just making the original text less > definitive will do as well. > Just chiming in to say I'm following the discussion attentively, but have nothing to add. Both Stefan's and Eli's suggestions look like improvements to me. And I'll be happy with what you come up with. Best regards, Gustavo. From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 29 18:53:39 2021 Received: (at 48058) by debbugs.gnu.org; 29 Apr 2021 22:53:40 +0000 Received: from localhost ([127.0.0.1]:57040 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lcFXP-0004Dh-LS for submit@debbugs.gnu.org; Thu, 29 Apr 2021 18:53:39 -0400 Received: from mail-pf1-f177.google.com ([209.85.210.177]:33579) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lcFXK-0004DD-AB for 48058@debbugs.gnu.org; Thu, 29 Apr 2021 18:53:35 -0400 Received: by mail-pf1-f177.google.com with SMTP id h11so7532269pfn.0 for <48058@debbugs.gnu.org>; Thu, 29 Apr 2021 15:53:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=ZdYbOxfCfITSbhHwl1FhX3coDu1sssUmf01872Twils=; b=tTwZ+Ssj3PlPefCl5sv1mGzONWOoarDShIPGDxgAdOPt24gODtWnNv7f/HFUeuq6UF PNatH0aTQQiLLAw6cKpsCPj6AGlElUDpStu6KVtIEFzuGOYyTxf4EFje7BKJ6hUtMh4g JWziNkiAd4wPMymMzhbN8qe7BlvFGdc4DHXZ2mIOtSFn1/M4Lf59bDtxTB3ww4zpjhTe M/o2QHOBwgTz3MkA/KYZt7wRFwr/exdCoLzDVQtoNCyFEPwjzS149sNxD1/w/axjZSco m7F1GnaEdE9pQZ3A3RSQqquyvjjGZdglMJSpNAMtV3gtCDQKk2KAI52DOnTCxbLOJdnT s+jA== X-Gm-Message-State: AOAM53245p+N/hXWtLUnUf5vwYNEgYNfLh961iWG5mJNHj8ZoTfMz9Ko uqfEZdlpSUKL4TmU/qOJ/Of4UtuvAd3uiNnVJS4= X-Google-Smtp-Source: ABdhPJw4lt924VzfYbeboyhqDcl01h6QWI0CxeZiy3Ylaxn0f9oHDxmxOC8NSmXN67r2cYpVtu7qPhyVKMuK7XDJwbI= X-Received: by 2002:a63:a16:: with SMTP id 22mr1839805pgk.345.1619736808353; Thu, 29 Apr 2021 15:53:28 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 29 Apr 2021 17:53:27 -0500 From: Stefan Kangas In-Reply-To: <874kfo26gt.fsf@gmail.com> References: <87a6pj50u6.fsf@gmail.com> <83eeevj0kt.fsf@gnu.org> <87wnsnkcz1.fsf@gmail.com> <8335vbixea.fsf@gnu.org> <87tunrkbdi.fsf@gmail.com> <83y2d3hhfe.fsf@gnu.org> <83pmydc7u6.fsf@gnu.org> <874kfo26gt.fsf@gmail.com> MIME-Version: 1.0 Date: Thu, 29 Apr 2021 17:53:27 -0500 Message-ID: Subject: Re: bug#48058: tab-width's docstring To: Gustavo Barros , Eli Zaretskii Content-Type: multipart/mixed; boundary="000000000000178f1305c1245d04" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 48058 Cc: 48058@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) --000000000000178f1305c1245d04 Content-Type: text/plain; charset="UTF-8" tags 48058 + patch thanks Gustavo Barros writes: >>> Perhaps we could change the docstring note along the lines of: >>> >>> NOTE: Some major modes use this variable to determine an >>> indentation >>> step, but Emacs itself only uses this to display the width of a >>> TAB >>> character. >>> >>> Would something like that make sense? >> >> Something like that, yes. Perhaps just making the original text less >> definitive will do as well. > > Just chiming in to say I'm following the discussion attentively, but > have nothing to add. Both Stefan's and Eli's suggestions look like > improvements to me. And I'll be happy with what you come up with. How does the attached patch look? --000000000000178f1305c1245d04 Content-Type: text/x-diff; charset="US-ASCII"; name="0001-Clarify-docstring-of-tab-width-variable.patch" Content-Disposition: attachment; filename="0001-Clarify-docstring-of-tab-width-variable.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: 9d07b7f03100f5d3_0.1 RnJvbSA1MjJiNDU4OGRmMjI1ZDZlODI1YzJjZTNjM2Q4MTE0NGJkN2UzYmZmIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBTdGVmYW4gS2FuZ2FzIDxzdGVmYW5AbWFyeGlzdC5zZT4KRGF0 ZTogRnJpLCAzMCBBcHIgMjAyMSAwMDozODo0MiArMDIwMApTdWJqZWN0OiBbUEFUQ0hdIENsYXJp ZnkgZG9jc3RyaW5nIG9mIHRhYi13aWR0aCB2YXJpYWJsZQoKKiBzcmMvYnVmZmVyLmMgKHN5bXNf b2ZfYnVmZmVyKSA8dGFiX3dpZHRoPjogRG9jIGZpeDsgY2xhcmlmeSB0aGF0CnRoaXMgdmFyaWFi bGUgaXMgdXNlZCBieSBzb21lIChidXQgbm90IGFsbCkgbWFqb3IgbW9kZXMgdG8gY29udHJvbCBh bgppbmRlbnRhdGlvbiBzdGVwLiAgKEJ1ZyM0ODA1OCkKLS0tCiBzcmMvYnVmZmVyLmMgfCA5ICsr KysrKy0tLQogMSBmaWxlIGNoYW5nZWQsIDYgaW5zZXJ0aW9ucygrKSwgMyBkZWxldGlvbnMoLSkK CmRpZmYgLS1naXQgYS9zcmMvYnVmZmVyLmMgYi9zcmMvYnVmZmVyLmMKaW5kZXggOGUzMzE2Mjk4 OS4uMDU0MGViZjAzNCAxMDA2NDQKLS0tIGEvc3JjL2J1ZmZlci5jCisrKyBiL3NyYy9idWZmZXIu YwpAQCAtNTY2Niw5ICs1NjY2LDEyIEBAIHN5bXNfb2ZfYnVmZmVyICh2b2lkKQogICBERUZWQVJf UEVSX0JVRkZFUiAoInRhYi13aWR0aCIsICZCVkFSIChjdXJyZW50X2J1ZmZlciwgdGFiX3dpZHRo KSwKIAkJICAgICBRaW50ZWdlcnAsCiAJCSAgICAgZG9jOiAvKiBEaXN0YW5jZSBiZXR3ZWVuIHRh YiBzdG9wcyAoZm9yIGRpc3BsYXkgb2YgdGFiIGNoYXJhY3RlcnMpLCBpbiBjb2x1bW5zLgotTk9U RTogVGhpcyBjb250cm9scyB0aGUgZGlzcGxheSB3aWR0aCBvZiBhIFRBQiBjaGFyYWN0ZXIsIGFu ZCBub3QKLXRoZSBzaXplIG9mIGFuIGluZGVudGF0aW9uIHN0ZXAuCi1UaGlzIHNob3VsZCBiZSBh biBpbnRlZ2VyIGdyZWF0ZXIgdGhhbiB6ZXJvLiAgKi8pOworVGhpcyBjb250cm9scyB0aGUgZGlz cGxheSB3aWR0aCBvZiBhIFRBQiBjaGFyYWN0ZXIgYW5kIHNob3VsZCBiZSBhbgoraW50ZWdlciBn cmVhdGVyIHRoYW4gemVyby4KKworSW4gc29tZSBtYWpvciBtb2RlcywgdGhpcyBpcyBhbHNvIHVz ZWQgdG8gY29udHJvbCB0aGUgc2l6ZSBvZiBhbgoraW5kZW50YXRpb24gc3RlcC4gIEhvd2V2ZXIs IHRoaXMgaXMgbm90IGFsd2F5cyB0aGUgY2FzZS4gIFNlZSB0aGUKK21ham9yIG1vZGUgZG9jdW1l bnRhdGlvbiBmb3IgdGhlIGV4YWN0IGRldGFpbHMgXFxbZGVzY3JpYmUtbW9kZV0uICAqLyk7CiAK ICAgREVGVkFSX1BFUl9CVUZGRVIgKCJjdGwtYXJyb3ciLCAmQlZBUiAoY3VycmVudF9idWZmZXIs IGN0bF9hcnJvdyksIFFuaWwsCiAJCSAgICAgZG9jOiAvKiBOb24tbmlsIG1lYW5zIGRpc3BsYXkg Y29udHJvbCBjaGFycyB3aXRoIHVwYXJyb3cuCi0tIAoyLjMwLjIKCg== --000000000000178f1305c1245d04-- From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 29 20:44:41 2021 Received: (at 48058) by debbugs.gnu.org; 30 Apr 2021 00:44:41 +0000 Received: from localhost ([127.0.0.1]:57158 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lcHGq-0002hu-Qc for submit@debbugs.gnu.org; Thu, 29 Apr 2021 20:44:41 -0400 Received: from mail-qk1-f182.google.com ([209.85.222.182]:34558) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lcHGo-0002hh-LW for 48058@debbugs.gnu.org; Thu, 29 Apr 2021 20:44:39 -0400 Received: by mail-qk1-f182.google.com with SMTP id q127so9985851qkb.1 for <48058@debbugs.gnu.org>; Thu, 29 Apr 2021 17:44:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:references:user-agent:from:to:cc:subject:in-reply-to :message-id:date:mime-version; bh=ta6wZbOnY1QuUtAHwh8lh1cvA3j3joL+P3bMFK4Dhr4=; b=OAg3WW+7Wy0Y4Xf2k/oG9eQA1njFY13wIeSimASD/v0gwS6OfURuhg7WQJ1KNmkBLf kXA6q3rmJ2zTXPdan29yZsme5E8/y8SnC6CPoH7Bd+MBYGleRBARPdHn2a41s64VfDaD L1dV/AATzmQPZTe0nULrFETG/v+T5JsnZ0j6eWUpNRkSzthuX/EhVHltkLEEnMwEo8hf j90t5ooFBMjUuhLyt6vwcUle7kRQ79tB4SufNEw+zv+WIC6G4JMBeK8ek3SvUKf2GVg/ xDODyi57/uaK17A4t3Gonotl7CiNILsZQPjHQOEeDYteZXFIlf+BixzUiB2pBlj+2Rc5 9FlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:references:user-agent:from:to:cc:subject :in-reply-to:message-id:date:mime-version; bh=ta6wZbOnY1QuUtAHwh8lh1cvA3j3joL+P3bMFK4Dhr4=; b=IoRHymq55hTmBn55XjxLJk97dvmohFQcWaVMY6o/rlV3CVM1HYKHZWWBL45Zsyh2tZ ICrpPMxJCUAPKVOjHPw0VsC54Q4+NRqE/3ChF9aOzjhbvTfxs7IiQCNenBLhtM72fhmE v68EQE5Un/gDwtsn4Nt1nh95UCkBitgh3UR18l2a1Nn6c1UfUwyWM1IquIDgmTUap+3f PYP1DVVgE46/kVzkU2LlScue/3PP172q62qrx8dED+3deuLm+QY5tjp7ZgqxShuSsWaX czuGvkEdTKgILwpp9mrEgFPxuqx/Sl8R98NNxq/K6YsuzMdnESFyNu+qCfPUJXMgq9fP hh5g== X-Gm-Message-State: AOAM530MvHPsscLvOGmorqWyPFEDuP3dgJ6j1YaumGtwJHSiSzc3MSJ9 Wf3L2JHEdB4UQpjAtxYd2yg6oVihaiwKIQ== X-Google-Smtp-Source: ABdhPJzHT+TE/X2Tu1LFUmG3tMFYIh3PV66463zGY2uY8uxs5i3EvS85+Ar8gcG2V2AmRqLd7CYfrg== X-Received: by 2002:ae9:ef88:: with SMTP id d130mr2576672qkg.107.1619743472770; Thu, 29 Apr 2021 17:44:32 -0700 (PDT) Received: from gusbrs-laptop ([154.21.22.220]) by smtp.gmail.com with ESMTPSA id v3sm218054qkb.124.2021.04.29.17.44.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Apr 2021 17:44:31 -0700 (PDT) References: <87a6pj50u6.fsf@gmail.com> <83eeevj0kt.fsf@gnu.org> <87wnsnkcz1.fsf@gmail.com> <8335vbixea.fsf@gnu.org> <87tunrkbdi.fsf@gmail.com> <83y2d3hhfe.fsf@gnu.org> <83pmydc7u6.fsf@gnu.org> <874kfo26gt.fsf@gmail.com> User-agent: mu4e 1.4.15; emacs 27.2 From: Gustavo Barros To: Stefan Kangas Subject: Re: bug#48058: tab-width's docstring In-reply-to: Message-ID: <87r1issis5.fsf@gmail.com> Date: Thu, 29 Apr 2021 21:44:26 -0300 MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 48058 Cc: Eli Zaretskii , 48058@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) Hi Stefan, On Thu, 29 Apr 2021 at 19:53, Stefan Kangas wrote: > tags 48058 + patch > thanks > > Gustavo Barros writes: > >>>> Perhaps we could change the docstring note along the lines of: >>>> >>>> NOTE: Some major modes use this variable to determine an >>>> indentation >>>> step, but Emacs itself only uses this to display the width of a >>>> TAB >>>> character. >>>> >>>> Would something like that make sense? >>> >>> Something like that, yes. Perhaps just making the original text >>> less >>> definitive will do as well. >> >> Just chiming in to say I'm following the discussion attentively, but >> have nothing to add. Both Stefan's and Eli's suggestions look like >> improvements to me. And I'll be happy with what you come up with. > > How does the attached patch look? Thanks, I do think it is an improvement, and had granted that in my previous message. And I also think the role I can play in this discussion is to provide some perspective on why it is difficult to get this docstring right for someone less acquainted with the fine prints of how indentation works. With that in mind, I tried to come up with something which would make it more clear to one such person. I hope I didn't get it wrong in so doing. It is the following: "`tab-width' controls the display width of a TAB character and the width of a tab step if it uses spaces instead of TAB characters, according to user options and major-mode settings. In most major modes the indentation step is derived from the langage's semantics and is independent of `tab-width', but some major-modes use it to control the size of an indentation step." Three things I hope to have added there which are not in the current docstring or in your patch. It is not just major-mode, user options influence too how `tab-width' is used. It is also not just "indentation", since a manual tab added by `tab-to-stop' or by `indent-for-tab-command' (if `tab-always-indent' is nil) will use `tab-width'. It is also not just "display of TAB character width", since `tab-width' will determine the number of spaces inserted if `indent-tabs-mode' is nil. And I grant I may be wrong in any number of these three things. But if I'm not, I do think they deserve mention. Again, this is not a "proposal", this is just what I miss there that I believe makes it hard to get what `tab-width' does (if you don't already know). And I think one of the things I failed to understand correctly, even when I opened this report, and the discussion with Eli helped me get a little better, is the term "indentation step". If I understand it better now, it is aimed at referring only to "major-mode specific indentation of a semantic character". Thus I included the term "tab step" as opposed to "indentation step", meaning a manually added "tab" (character or corresponding spaces). This may seem obvious to most on this list, but I missed my step (pun intended) right there. And I cannot even claim noobness (though I'll probably be guilty as charged). Best regards, Gustavo. From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 30 03:19:03 2021 Received: (at 48058) by debbugs.gnu.org; 30 Apr 2021 07:19:03 +0000 Received: from localhost ([127.0.0.1]:57370 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lcNQV-0003go-Ao for submit@debbugs.gnu.org; Fri, 30 Apr 2021 03:19:03 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45102) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lcNQS-0003gK-Bd for 48058@debbugs.gnu.org; Fri, 30 Apr 2021 03:19:02 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:58335) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcNQM-0003bp-ID; Fri, 30 Apr 2021 03:18:54 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2619 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lcNQK-0000Tb-FW; Fri, 30 Apr 2021 03:18:54 -0400 Date: Fri, 30 Apr 2021 10:18:43 +0300 Message-Id: <83eeescka4.fsf@gnu.org> From: Eli Zaretskii To: Stefan Kangas In-Reply-To: (message from Stefan Kangas on Thu, 29 Apr 2021 17:53:27 -0500) Subject: Re: bug#48058: tab-width's docstring References: <87a6pj50u6.fsf@gmail.com> <83eeevj0kt.fsf@gnu.org> <87wnsnkcz1.fsf@gmail.com> <8335vbixea.fsf@gnu.org> <87tunrkbdi.fsf@gmail.com> <83y2d3hhfe.fsf@gnu.org> <83pmydc7u6.fsf@gnu.org> <874kfo26gt.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 48058 Cc: 48058@debbugs.gnu.org, gusbrs.2016@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stefan Kangas > Date: Thu, 29 Apr 2021 17:53:27 -0500 > Cc: 48058@debbugs.gnu.org > > DEFVAR_PER_BUFFER ("tab-width", &BVAR (current_buffer, tab_width), > Qintegerp, > doc: /* 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. > -This should be an integer greater than zero. */); > +This controls the display width of a TAB character and should be an > +integer greater than zero. > + > +In some major modes, this is also used to control the size of an > +indentation step. However, this is not always the case. See the > +major mode documentation for the exact details \\[describe-mode]. */); I don't think the user will find anything about this in the documentation of the major mode. Did you see anything useful about this in the doc string of any major mode or in what "C-h m" displays for that mode? I tried two very popular modes (ELisp and C) and didn't see anything pertinent. I propose the following text instead: Distance between tab stops (for display of tab characters), in columns. This controls the width of a TAB character on display. The value should be a positive integer. Note that this variable doesn't necessarily affect the size of the indentation step, but if the major mode's indentation facility inserts one or more TAB characters, this variable will affect the indentation step as well, even if `indent-tabs-mode' is non-nil. From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 30 06:20:30 2021 Received: (at 48058) by debbugs.gnu.org; 30 Apr 2021 10:20:30 +0000 Received: from localhost ([127.0.0.1]:57554 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lcQFx-0008An-1e for submit@debbugs.gnu.org; Fri, 30 Apr 2021 06:20:30 -0400 Received: from mail-pf1-f176.google.com ([209.85.210.176]:38821) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lcQFv-0008AW-52 for 48058@debbugs.gnu.org; Fri, 30 Apr 2021 06:20:20 -0400 Received: by mail-pf1-f176.google.com with SMTP id j6so8771651pfh.5 for <48058@debbugs.gnu.org>; Fri, 30 Apr 2021 03:20:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=aPfj0wI5sSVeqzsxghRevc9rApilNJPLT2M+POegdVE=; b=blANakjz1cLM/pLXTh6F//xQBur2xggIRxvfA887rDnS1Go2YJcG33VVSh9Y9bJXsz S5zEnh3+MsR/jZezgiPEvy6uhiaQNLhgC3AY+gT7z8Hol2yFbPfY90X77KW3Q+PMHi8H sqGhN1fWxN91AUVMB0ddKqbSjCJvQzLRIYDotFLyB5PrjKepqxvUzgeq1BKBk2NSq/nf 081uqlQXtXAd7zMYdj57CGfX7geXrtTTUt8Rrc+HN9GcSvXO/wKRtCsX8crFfjr5vSR4 ScXfoRhgtgxaNoqNI3mZEnESu/3HZz3PRcjXtng0bl/1aocCYnIaZ4UJt92Gj7UvzwzH LIQA== X-Gm-Message-State: AOAM531ctDhXEeXLqF0dlV7cFSAfuU/R8kJOyJrfL4xmIaNmp8NajdMw N7S1r9VeqsHJf3IJUsMDqpXXbeNmtQe6LYNYcFQ= X-Google-Smtp-Source: ABdhPJyNyBK62qr++Re4a0sefJmPA4PrRtlPFXG+9o4KrBmbYJU5mkVYWVW/ACF50mzh3K4ClDDy6S++MLu4TwiLN7A= X-Received: by 2002:a63:a16:: with SMTP id 22mr3923863pgk.345.1619778013335; Fri, 30 Apr 2021 03:20:13 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 30 Apr 2021 05:20:12 -0500 From: Stefan Kangas In-Reply-To: <83eeescka4.fsf@gnu.org> References: <87a6pj50u6.fsf@gmail.com> <83eeevj0kt.fsf@gnu.org> <87wnsnkcz1.fsf@gmail.com> <8335vbixea.fsf@gnu.org> <87tunrkbdi.fsf@gmail.com> <83y2d3hhfe.fsf@gnu.org> <83pmydc7u6.fsf@gnu.org> <874kfo26gt.fsf@gmail.com> <83eeescka4.fsf@gnu.org> MIME-Version: 1.0 Date: Fri, 30 Apr 2021 05:20:12 -0500 Message-ID: Subject: Re: bug#48058: tab-width's docstring To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 48058 Cc: 48058@debbugs.gnu.org, gusbrs.2016@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) Eli Zaretskii writes: > I propose the following text instead: > > Distance between tab stops (for display of tab characters), in columns. > > This controls the width of a TAB character on display. > The value should be a positive integer. > Note that this variable doesn't necessarily affect the size of the > indentation step, but if the major mode's indentation facility > inserts one or more TAB characters, this variable will affect the > indentation step as well, even if `indent-tabs-mode' is non-nil. Perhaps we could divide the last sentence up to make it easier to read? Note that this variable doesn't necessarily affect the size of the indentation step. However, if the major mode's indentation facility normally inserts one or more TAB characters, this variable will affect the indentation step as well, even if `indent-tabs-mode' is non-nil. Otherwise LGTM, please install. From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 30 06:50:09 2021 Received: (at 48058-done) by debbugs.gnu.org; 30 Apr 2021 10:50:09 +0000 Received: from localhost ([127.0.0.1]:57568 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lcQin-0000d0-Jl for submit@debbugs.gnu.org; Fri, 30 Apr 2021 06:50:09 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55930) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lcQii-0000cL-DC for 48058-done@debbugs.gnu.org; Fri, 30 Apr 2021 06:50:08 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:39057) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcQic-00013N-PH; Fri, 30 Apr 2021 06:49:58 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3560 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lcQib-0004wu-6I; Fri, 30 Apr 2021 06:49:58 -0400 Date: Fri, 30 Apr 2021 13:49:48 +0300 Message-Id: <835z04caib.fsf@gnu.org> From: Eli Zaretskii To: Stefan Kangas In-Reply-To: (message from Stefan Kangas on Fri, 30 Apr 2021 05:20:12 -0500) Subject: Re: bug#48058: tab-width's docstring References: <87a6pj50u6.fsf@gmail.com> <83eeevj0kt.fsf@gnu.org> <87wnsnkcz1.fsf@gmail.com> <8335vbixea.fsf@gnu.org> <87tunrkbdi.fsf@gmail.com> <83y2d3hhfe.fsf@gnu.org> <83pmydc7u6.fsf@gnu.org> <874kfo26gt.fsf@gmail.com> <83eeescka4.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 48058-done Cc: 48058-done@debbugs.gnu.org, gusbrs.2016@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stefan Kangas > Date: Fri, 30 Apr 2021 05:20:12 -0500 > Cc: gusbrs.2016@gmail.com, 48058@debbugs.gnu.org > > Note that this variable doesn't necessarily affect the size of the > indentation step. However, if the major mode's indentation facility > normally inserts one or more TAB characters, this variable will > affect the indentation step as well, even if `indent-tabs-mode' is > non-nil. > > Otherwise LGTM, please install. Thanks, done (with one minor deviation: the "normally" part is not useful here). From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 30 08:00:32 2021 Received: (at 48058-done) by debbugs.gnu.org; 30 Apr 2021 12:00:33 +0000 Received: from localhost ([127.0.0.1]:57692 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lcRot-0006sk-9k for submit@debbugs.gnu.org; Fri, 30 Apr 2021 08:00:32 -0400 Received: from mail-qk1-f177.google.com ([209.85.222.177]:33280) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lcRoo-0006sP-Fv for 48058-done@debbugs.gnu.org; Fri, 30 Apr 2021 08:00:30 -0400 Received: by mail-qk1-f177.google.com with SMTP id o5so70317511qkb.0 for <48058-done@debbugs.gnu.org>; Fri, 30 Apr 2021 05:00:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:references:user-agent:from:to:cc:subject:in-reply-to :message-id:date:mime-version; bh=6VVvQbcFcmsrDxyqNthPumU2fsyzOmDFaJlzSixpDhA=; b=AO6mFcoQXGC3RSBQi3yWmM7zlkuWg+E76nRGN1kxttSDiUf2ZXFzJs0y04SlpH3fWt IGSoH7WR2+MXPlV0tEcgCTYQLuYqK7wCLxzQ92tiDwRxpb20qhQgyYRFchal1U2g8ozX 92q0+nsAE35Lodq5UG2qzE3R0+/Ws3IBmvzY8WxRh/+kKFtJcExRx0KVIrUe1Jl0EEyU fUMhbt+rZo4Lr12dY8FFgqbaNyjLN4VJAqJ5AqgQj58SJKPWCflWsD0OLvH4aWp+ElV/ uop8hjHDBljB3y9wI8fSRlWdvBWYsm34jtltJtqQaHozk9aL/mcHobNnkexPwE/JPm7W n+uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:references:user-agent:from:to:cc:subject :in-reply-to:message-id:date:mime-version; bh=6VVvQbcFcmsrDxyqNthPumU2fsyzOmDFaJlzSixpDhA=; b=JdGKA+6COCODL+sYdA7ziVF9O/9iinV5OJe9yFZ42BqM4dUBpzFZodxNvMr6WfTaoC udT/VWxV/i+0aaDSNHebmnF6/MYQJM0VDxCYEpRMhq0fgB6IeMAnzQaIhSGHfLFQqNw8 r56MAMszy8GeRrRjg/7CvxYhIp+XojpLBHdGsiGereP14aG3oJaMoOvn5Lf5fVcn/QVU resgQV74ACWjew/H/4ZdYPhTGEAlyfYwYd5qPfoXVDkn7JoI3Fa4KcklLTgBsnYEODZ9 iOg7dMLPguQX43v5hWDlBOODcJd869pF2pLqDwUU6SwgeJSdswr2ZQdCBXhKNezQOTK8 1hIA== X-Gm-Message-State: AOAM532ofrzolr01veB8ueEe1LvY2w72PkSiiROuIYYWgU/MiaMB59zD q/BJBazLLnvJ5IyAlvy/Vkzgageofdgc2g== X-Google-Smtp-Source: ABdhPJxpIUKgB9zdSLuTa6RWiJbQOyDpaQufVimY/Mrg3p6Ekzb2aBMc4K5p7+D7JJjEa8PZaPQzrg== X-Received: by 2002:a05:620a:15d6:: with SMTP id o22mr4733203qkm.411.1619784020508; Fri, 30 Apr 2021 05:00:20 -0700 (PDT) Received: from gusbrs-laptop ([212.102.61.54]) by smtp.gmail.com with ESMTPSA id r18sm2032837qtn.90.2021.04.30.05.00.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Apr 2021 05:00:19 -0700 (PDT) References: <87a6pj50u6.fsf@gmail.com> <83eeevj0kt.fsf@gnu.org> <87wnsnkcz1.fsf@gmail.com> <8335vbixea.fsf@gnu.org> <87tunrkbdi.fsf@gmail.com> <83y2d3hhfe.fsf@gnu.org> <83pmydc7u6.fsf@gnu.org> <874kfo26gt.fsf@gmail.com> <83eeescka4.fsf@gnu.org> <835z04caib.fsf@gnu.org> User-agent: mu4e 1.4.15; emacs 27.2 From: Gustavo Barros To: Eli Zaretskii Subject: Re: bug#48058: tab-width's docstring In-reply-to: <835z04caib.fsf@gnu.org> Message-ID: <87o8dwrnhs.fsf@gmail.com> Date: Fri, 30 Apr 2021 09:00:16 -0300 MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 48058-done Cc: 48058-done@debbugs.gnu.org, Stefan Kangas X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) On Fri, 30 Apr 2021 at 07:49, Eli Zaretskii wrote: >> From: Stefan Kangas >> Date: Fri, 30 Apr 2021 05:20:12 -0500 >> Cc: gusbrs.2016@gmail.com, 48058@debbugs.gnu.org >> >> Note that this variable doesn't necessarily affect the size of >> the >> indentation step. However, if the major mode's indentation >> facility >> normally inserts one or more TAB characters, this variable will >> affect the indentation step as well, even if `indent-tabs-mode' >> is >> non-nil. >> >> Otherwise LGTM, please install. > > Thanks, done (with one minor deviation: the "normally" part is not > useful here). Eli and Stefan, thank you very much. Best regards, Gustavo. From unknown Sat Jun 21 10:15:42 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 29 May 2021 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator