From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Skip Montanaro Newsgroups: gmane.emacs.help Subject: indent-tabs-mode scope? Date: Mon, 23 Jul 2018 12:22:49 -0500 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1532366280 5879 195.159.176.226 (23 Jul 2018 17:18:00 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 23 Jul 2018 17:18:00 +0000 (UTC) To: Help GNU Emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jul 23 19:17:56 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fheT6-0001Rl-BC for geh-help-gnu-emacs@m.gmane.org; Mon, 23 Jul 2018 19:17:56 +0200 Original-Received: from localhost ([::1]:35782 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fheVD-00043q-Az for geh-help-gnu-emacs@m.gmane.org; Mon, 23 Jul 2018 13:20:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59854) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fheUd-00040t-Ol for help-gnu-emacs@gnu.org; Mon, 23 Jul 2018 13:19:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fheUc-0004fX-Sy for help-gnu-emacs@gnu.org; Mon, 23 Jul 2018 13:19:31 -0400 Original-Received: from mail-pl0-x231.google.com ([2607:f8b0:400e:c01::231]:43134) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fheUc-0004er-Mz for help-gnu-emacs@gnu.org; Mon, 23 Jul 2018 13:19:30 -0400 Original-Received: by mail-pl0-x231.google.com with SMTP id o7-v6so495097plk.10 for ; Mon, 23 Jul 2018 10:19:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=sWoR8RkdxW6iDYerzD8C1bfYgfuhEuuCVVEUhViH+/U=; b=sK2/IOVWkZyqwRhPKanVF0lUZrqnlz02KGbbrVkizFY+o7B1XYT4hKIMjb/L8oJ15I iU8S0iM+MxFp1i0WD9UdBS52vl6kxrl0PpCvcUrbf75wwD7mdW8Vvb1CLd0z7rNXtYLV n1cqhKfuyrJBu24wvf8ZtcOx00wsDSKUVkT2bPDdlszu/rQwdGgicdMG2XpWMsMRinf8 0hS8XCC0BScETAbt/PxYcG6yDls2PhtSR2xYIOLG9/gDVRJPn90XNWAA+P7X5cwH9luj +GWEG9WNUdR4TR1Cf9mTop3flcQpa5GFae8yix4y8Rw5noWJ76P/jCBNIflIgSr8PDeu Ig0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=sWoR8RkdxW6iDYerzD8C1bfYgfuhEuuCVVEUhViH+/U=; b=jeoK0mranjkTJerEWYh6XSHouiH+sMJFytOILFhjKiDGaLxfcuwaCUvxt6b+EJoe4n GyqyCDNB5QvgikR+pWmuXf9jBz2OH/YZPe+kkcMcmrUktXYZtZoYoSyB37PNhNCZag+L RzwoYDaq94EDggLe71DCciHmvzb+BS8tf0lrVnCefL1qDq3eA12g8lJlpmj844R0ROqL rs4/urQAl8Nzydhpztzdwchm5yLbU3UNOIvT7QC3RgXDa2sToDJYRAWHhNfCcjf5kTQK AdtRv+sEm0NfQ91Q1K/UQ1rV/aRq8nc8glQTwSTstQOeW61JYUy43lv9jitUKAsJWlYo W0hA== X-Gm-Message-State: AOUpUlHWrh3nVbctazWLeIRXQW9nIHaqxE2YEGElgXpvyFGAJ8DFFgnl y8UA4TLPZGc81zMcwQwNyIUBzPJZvuwhNiBuWvM2A97FvA== X-Google-Smtp-Source: AAOMgpfESMQf+jppZ153ZBVa/cfVXUd5dNH/+1OR/LeYy4fCnjUYzOx17mQdsh8fsW6newsWVinldCnDJQcwDX/XWNc= X-Received: by 2002:a17:902:b48f:: with SMTP id y15-v6mr13770444plr.44.1532366369221; Mon, 23 Jul 2018 10:19:29 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c01::231 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:117573 Archived-At: I'm looking for a bit of confirmation here. I recently customized indent-tabs-mode to be nil by default. Previously, it was nil for python-mode (makes sense), but t elsewhere (the Emacs default). It appears that despite its name, it suppresses tab insertion everywhere possible, not just at the beginning of a line. For example, suppose I'm editing an SQL create table statement and want the column types to line up. I might start with this: CREATE TABLE Foo ( col1 INT NOT NULL, col2 then press TAB after typing "2". The cursor will be positioned under the "I" in "INT", using nothing but SPACE characters to achieve that effect. This is due to the value of indent-tabs-mode. Looking at the description for that variable, I see: Indentation can insert tabs if this is non-nil. I casually think of "indentation" as occurring only at the start of a line, but I suppose anywhere you want to advance the cursor to a "tab stop" (for those of you, who like me learned to type on a typewriter), the inserted white space could be considered indentation as well. Empirically, this looks like the case. I wonder if the doc string for indent-tabs-mode or for the indent-for-tab-command function should be tightened up a bit to explicitly describe this behavior. The indent-for-tab-command function doc string makes no mention of indent-tabs-mode, though it seems clear it alters the function's behavior (even without a dive into the code). If this is deemed a Good Thing, I will try and produce a PR for a doc change. Thanks, Skip Montanaro