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 10:34:41 -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> <29d3eeff-f9a9-ec31-f72c-cfbd7d00f7e0@cs.ucla.edu> <64941465-696a-4da1-a2af-e0258b8776fa@yandex.ru> 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 1520350530 13365 195.159.176.226 (6 Mar 2018 15:35:30 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 6 Mar 2018 15:35:30 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 06 16:35:25 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 1etEcc-0002XM-Qe for ged-emacs-devel@m.gmane.org; Tue, 06 Mar 2018 16:35:22 +0100 Original-Received: from localhost ([::1]:56487 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1etEef-0003PQ-Il for ged-emacs-devel@m.gmane.org; Tue, 06 Mar 2018 10:37:29 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49674) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1etEc4-0001SD-1A for emacs-devel@gnu.org; Tue, 06 Mar 2018 10:34:48 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1etEbz-0004lQ-SI for emacs-devel@gnu.org; Tue, 06 Mar 2018 10:34:48 -0500 Original-Received: from mail-it0-x22d.google.com ([2607:f8b0:4001:c0b::22d]:34477) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1etEbz-0004kw-NR for emacs-devel@gnu.org; Tue, 06 Mar 2018 10:34:43 -0500 Original-Received: by mail-it0-x22d.google.com with SMTP id n128so13057770ith.1 for ; Tue, 06 Mar 2018 07:34:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=T2TVb9lkYuZppmUVY8Igc5rvY/hZ1v6XiHU6xap9LAI=; b=o2S7Ub9gFAL/As6x6QpF7BnF/Jsr5pb5YE7i7vcprPgSdqPkmFAaFpu8SLDcev2Nl9 Y3y+zKhHRSIH9h/VDzedn/HAbZjz7kHuEl8tMisd1mhfzSb2utMSqYQozTXaVOxkYtlJ +FvTOxGu2+4U3mNIs7AHcfuncc7Pv2Kzn9FtBD/eKP+A2WIkypVtshKgjLyxTTaVXn2t V3yTXASjsS7e+q9SLkDr6Mq/M+bohmoo5tw1EcdiBuWA+HeIcvVdkrJ2qJvI9fIU4Q0D CE3vYgAJtzWtVOOH/vfkrQDJ+/ooO0ePMH5FaMNl6XQvFNFE6vzMmt2xUjqQ7ysYYUSZ gy+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=T2TVb9lkYuZppmUVY8Igc5rvY/hZ1v6XiHU6xap9LAI=; b=ZCmjuhmVIex2IMjEXzDGdZvsHzQ6q010cU04eU0FnyqhStLdZlYqb4IGjOes7Unb4k blZeVTaA0IbdJa2u8lAhF7I6xn27DtT8cKvyFotuDA79iqkPNe3CDun94Fw+ulfGszLG tgILwneZE/QwGKNCfPqnkTO7hPe056jcn9AyIYIzw/DGIZF6t/J0tMF9pzyEpZXVZ2JK UQlHyeR28eb82xu/jwhX9ujvI7xWSXWjVYKVeBRbc0KIvi71Lb35QW80XviC9zQesdTr CDjb8M/qD0A2xWo2VKtBE+NF9erNKdV1uN05hZfp77/H+QVmov+NYqVh0KirpQgctWNL 74rg== X-Gm-Message-State: AElRT7HDh64pfKuTzHZdNELqZ3RHiIYF4r8uFde5CsJtHIgQIGrtEshz acXD5SS/OyN/ThczoHrW22K0wMIi X-Google-Smtp-Source: AG47ELuW/fCw9ubrGg7sDLbct8UW8zCNU0EOE72uVZo6GgzwsI8gE/08S1xXxl28AOYXZ11xpHy9fg== X-Received: by 10.36.26.131 with SMTP id 125mr19034116iti.76.1520350482857; Tue, 06 Mar 2018 07:34:42 -0800 (PST) Original-Received: from [18.26.2.123] (26-2-123.dynamic.csail.mit.edu. [18.26.2.123]) by smtp.gmail.com with ESMTPSA id 202sm5662398itu.23.2018.03.06.07.34.42 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Mar 2018 07:34:42 -0800 (PST) In-Reply-To: <64941465-696a-4da1-a2af-e0258b8776fa@yandex.ru> Content-Language: en-GB X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4001:c0b::22d 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:223332 Archived-At: On 2018-03-06 10:15, Dmitry Gutov wrote: > On 3/5/18 9:49 PM, Paul Eggert wrote: >> On 03/05/2018 11:32 AM, dancol@dancol.org wrote: >>> 1: void foo(int a, >>> 2:          int b) >>> 3: { >>> 4:  ... >>> >>> How is any generic indentation system supposed to know that the "i" on >>> line 2 is supposed to line up with the "i" on line 1? >> >> It assumes the input is fixed-width, and that leading white space is intended to indent with respect to previous lines. Although it'd be some work to get Emacs to do this, I don't offhand see any algorithmic problem here. > > If the way whitespace at bol is rendered depends on indentation code, will the mean that while scrolling a buffer the display engine will have to call indentation code? In Paul's suggestion (the one I implemented), the width of whitespace at bol does not depend on indentation code.