From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= Newsgroups: gmane.emacs.devel Subject: Re: Variable-width font indentation Date: Tue, 6 Mar 2018 08:33:24 -0500 Message-ID: References: <87inaiss6l.fsf@web.de> <6FCF6ACA-4F29-4B6B-BE9D-D7130C6E9495@gnu.org> <87fu5moe4c.fsf@web.de> <877eqyocro.fsf@web.de> <83zi3uz4nb.fsf@gnu.org> <0b1dd3fa-e0b0-ed20-a256-dd92d1c1826f@dancol.org> <8bc3c4c7-dfc7-987a-95e7-bd309e2326c6@cs.ucla.edu> <03118DC0-39DA-4AB5-980E-A33809B9A5EE@raeburn.org> <83vaeas8uz.fsf@gnu.org> <83lgf6s3aa.fsf@gnu.org> <64ad488a4aa74c37b9711bf89d1d8abb@lanl.gov> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1520344366 9478 195.159.176.226 (6 Mar 2018 13:52:46 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 6 Mar 2018 13:52:46 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 Cc: Paul Eggert To: "Herring, Davis" , "emacs-devel@gnu.org" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 06 14:52:42 2018 Return-path: Envelope-to: ged-emacs-devel@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 1etD1B-0001Z2-JJ for ged-emacs-devel@m.gmane.org; Tue, 06 Mar 2018 14:52:37 +0100 Original-Received: from localhost ([::1]:55922 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1etD3E-0003HD-AP for ged-emacs-devel@m.gmane.org; Tue, 06 Mar 2018 08:54:44 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50961) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1etCie-0001yr-B4 for emacs-devel@gnu.org; Tue, 06 Mar 2018 08:33:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1etCid-0006qs-8x for emacs-devel@gnu.org; Tue, 06 Mar 2018 08:33:28 -0500 Original-Received: from mail-qk0-x236.google.com ([2607:f8b0:400d:c09::236]:37888) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1etCid-0006qc-4v for emacs-devel@gnu.org; Tue, 06 Mar 2018 08:33:27 -0500 Original-Received: by mail-qk0-x236.google.com with SMTP id s198so24837553qke.5 for ; Tue, 06 Mar 2018 05:33:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=dvtg8+LrBi1jEnFZaHMQ/OOSTFgP767mWEEh0cBHETY=; b=cO16CdirsP1mb7arjqYd6dw9IlJRm3cjgUvmCwQ9ZAV/gHCW+t9lqUSpA4TLtwgZns p6ILxt21uifA98i7yPntvuBmNc9MzdAFgcerg9nbDu2srIRCpOhRujRy95bFPa6/f4dU 0ye1r48Z3BLDJb4mjKYKysP2+g1B/WSFHb0NMai2r7eWR8OZSogETHuCcGCtFGSIjPHp chpnvsRLjSqtqeL+a4nMZl1SvWSd00/amjo/99okWJJQNNELP9HanZmx9xyhWTwYkeAU mQRd/jJJCrct502T5LsCCwCRFy9AAnNx6vn46WJ8kgM51JAi2fx12W9qbeH9lNHQweHZ pgtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=dvtg8+LrBi1jEnFZaHMQ/OOSTFgP767mWEEh0cBHETY=; b=QxEFyFdTNAID2ybL6MQ9qjoL1nSyflj8CvqWXMmGyWVpLfBJjTFMYfTgLa1pywzEqH 3ZhZdWEMMNFcl0MIgipwHMw4v60kpzmepgazHD1I+/O82kAyuI7pDIV16zNsiD5mlCRw 2X2zlmYyyrO6X2CowQUX7N0oECZvh1hXiYGOuNLXrDtl83oTA39+uxhDt2ZWKdi3Fz8G iBXtmomxQcauamEgd6vHVMXWowoQiujh7QF04Ozw0PAIF/Rc+4tvmbHkDNVOlwd/qwUm fpMCJRY8sUZ0ehR6kqAVBSfcGug9z60Qc0LCWJKEKyeJNPC0kf94pojHGgPnNa/kZTs9 ltVA== X-Gm-Message-State: AElRT7GT006njKIn+dr+n0AWcJ445Fwu1k5R9/aCjMb4slXz+e10Cx0G wbKt4ycxZXxmVUAjN1OsdpU= X-Google-Smtp-Source: AG47ELurq2KVmm64YwBFyAG3uNxM2pW5FDbz2IEwKjF8PRr2RmgstNRP3CSHmv6nqcJPafetwrhbLw== X-Received: by 10.55.79.11 with SMTP id d11mr26384424qkb.51.1520343206458; Tue, 06 Mar 2018 05:33:26 -0800 (PST) Original-Received: from ?IPv6:2601:184:4180:66e7:2829:cb05:cef:e671? ([2601:184:4180:66e7:2829:cb05:cef:e671]) by smtp.gmail.com with ESMTPSA id r5sm10268837qtc.26.2018.03.06.05.33.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Mar 2018 05:33:26 -0800 (PST) In-Reply-To: <64ad488a4aa74c37b9711bf89d1d8abb@lanl.gov> Content-Language: en-GB X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::236 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:223325 Archived-At: On 2018-03-05 23:05, Herring, Davis wrote: >> I don't know of a good solution to this problem: in general, >> there's not enough information to distinguish 'indentation' >> spaces (the two spaces before `printf (', `pr ()', and `return 0') >> and 'line-up' spaces (the spaces before `char ()'). > > This is of course an argument in favor of "smart tabs" No, not really: smart tabs aren't enough AFAICT. Take the following example: match opt with | [] -> [] | x :: t -> x :: f t You'd want to scale the spaces according to the line *below*, not ebove, and even then you'd have to account for the fact that 'x ' isn't as wide as '[]'. Smart Tabs are also not very good for languages like ELisp with variable indentation depths. If anything, I think this is more of an argument in favor of elastic tabs (http://nickgravgaard.com/elastic-tabstops/). Clément.