From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Daniel Colascione" Newsgroups: gmane.emacs.devel Subject: Should indent-tabs-mode insert tabs only leading whitespace? Date: Fri, 17 Jul 2020 10:52:20 -0700 Message-ID: <0456f08d3ac9a2ee84ced480529ced00.squirrel@dancol.org> Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1215"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: SquirrelMail/1.4.23 [SVN] To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jul 17 19:54:37 2020 Return-path: Envelope-to: ged-emacs-devel@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 1jwUZA-0000BB-LD for ged-emacs-devel@m.gmane-mx.org; Fri, 17 Jul 2020 19:54:36 +0200 Original-Received: from localhost ([::1]:45078 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jwUZ9-0008PV-CL for ged-emacs-devel@m.gmane-mx.org; Fri, 17 Jul 2020 13:54:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58614) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jwUX6-0007tr-3e for emacs-devel@gnu.org; Fri, 17 Jul 2020 13:52:28 -0400 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:43862) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jwUX3-0004U6-U4 for emacs-devel@gnu.org; Fri, 17 Jul 2020 13:52:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Transfer-Encoding:Content-Type:MIME-Version:To:From:Subject: Date:Message-ID:Sender:Reply-To:Cc:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=2h8q2rNv7srSQuJF4u9ak66L0A/jcNlBMa2hK8svwos=; b=F ztf/sZL81C9Kny3CYZzCL4owl/iLYpPywPn5wpOpGYj045buHxZBuKVoYyCUuL7Z4s5YsmyFj4ttz OT4XwPIKf8hS5LiZpnO15Fqy5Fx2JlGpJRA9xJUNjoCfjy9qI6JzTHasVrAnA/u1y0HKCZ0AJoDMx /i/cImWa6cH/cnN0/su7HFr3+pm+FaEnyLct/S0WzvnzI39t35s1UVRcAGT/FrpCDg/7QH8AwYDpu cUoUw3RwI2+0QcOL/AN8TYeJsZs+Gb17a+F3Q+tWeBURfnClg1KSJ0CzKKOI6qMhJxw/O6Vuf11OU shDMZGiK506JJlBd9eGLvs4l/jJZQ6n5A==; Original-Received: from localhost ([127.0.0.1] helo=dancol.org) by dancol.org with esmtp (Exim 4.89) (envelope-from ) id 1jwUWy-0008Kj-3l for emacs-devel@gnu.org; Fri, 17 Jul 2020 10:52:20 -0700 Original-Received: from 127.0.0.1 (SquirrelMail authenticated user dancol) by dancol.org with HTTP; Fri, 17 Jul 2020 10:52:20 -0700 X-Priority: 3 (Normal) Importance: Normal Received-SPF: pass client-ip=2600:3c01::f03c:91ff:fedf:adf3; envelope-from=dancol@dancol.org; helo=dancol.org X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:253043 Archived-At: I recently debugged a weird interaction between make-mode and ws-butler-mode that let to random tab characters being strewn in my makefiles: ws-butler-mode uses move-to-column after save to restore trailing whitespace on the line containing point. move-to-column calls indent-to to actually do the move. And because makefile-mode sets indent-tabs-mode, that indent-to inserts tabs sometimes, resulting in stray tab files in places where they don't belong. There are lots of fixes for this problem, but the fundamental issue seems to be that indent-to inserts tab characters for column alignment *after* non-whitespace characters on a given line. What if indent-to always inserted spaces when there were non-whitespace characters between BOL and point? That whitespace manipulation isn't really indentation.