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: Fri, 9 Mar 2018 14:48:33 -0500 Message-ID: <9e7e6fa1-47d8-c0a2-797d-cd7edbf8fc4c@gmail.com> 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> <838tb5rxoe.fsf@gnu.org> <83lgf5q73p.fsf@gnu.org> <4742f0ae-86b5-48f9-4601-4dbba9e6380d@gmail.com> <83bmfzreaq.fsf@gnu.org> <83lgf3przh.fsf@gnu.org> <42d0c18b-8d14-bfe2-8f09-112787e8b0b4@gmail.com> <83zi3io9tr.fsf@gnu.org> <859ec725-acc3-22e4-ca26-28108c3e5e26@gmail.com> <83sh9ao086.fsf@gnu.org> <83muzhodkx.fsf@gnu.org> 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 1520624851 749 195.159.176.226 (9 Mar 2018 19:47:31 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 9 Mar 2018 19:47:31 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 Cc: eggert@cs.ucla.edu, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 09 20:47:27 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 1euNzC-0008Vz-H9 for ged-emacs-devel@m.gmane.org; Fri, 09 Mar 2018 20:47:26 +0100 Original-Received: from localhost ([::1]:47709 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1euO1F-00016G-3D for ged-emacs-devel@m.gmane.org; Fri, 09 Mar 2018 14:49:33 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39730) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1euO0P-00016B-TK for emacs-devel@gnu.org; Fri, 09 Mar 2018 14:48:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1euO0L-00069O-8i for emacs-devel@gnu.org; Fri, 09 Mar 2018 14:48:41 -0500 Original-Received: from mail-it0-x234.google.com ([2607:f8b0:4001:c0b::234]:50468) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1euO0L-00069G-3d; Fri, 09 Mar 2018 14:48:37 -0500 Original-Received: by mail-it0-x234.google.com with SMTP id d13so4068232itf.0; Fri, 09 Mar 2018 11:48:36 -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=C4EXCHcZgwCV0/+b+JE4NEQ43u4Ym2GHohnnnVm7CLQ=; b=Daex/n+fQ5AbftfI3g/edtcoaMvNXQC5SKSMb73dVoR3M0ERZGUL/2vEQLOxrnaI5/ 6XVJzfgKTSvLHWGjMMmjstB3XXjjn0gCWZdkDzVyovIQklAX/doofVO/VW8DT/16KpfS AfWw2AEAMTJYSvb6Jzlme8GwSbYeccs7LLYqi9bQ/3mbmS4mcfFycSGayqTwyQpVsVPS TDz3jNkvyGVFAys4O71aNit5ER/OfkWzi9zfISv/AdH/zVCeE66m3TZgqbGSD8VdZisX H0+Zj3F3Xwy129Y5Tni+eZVCIjz1Cp5UFcZka6EfHBf+sB66ZGpHFHmgGgXAKEMNtZzw US3Q== 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=C4EXCHcZgwCV0/+b+JE4NEQ43u4Ym2GHohnnnVm7CLQ=; b=gja0S/oLtcWU2vvkGN0/D6L3aDYbgXrctGLvioP6w0AaubbjJOwWLtz6nwsGbFesAC IK0VUNZvLAz1jEP7VODupbEo1vjNUcOc2c/acVfQ6yn08C89uRg9AttJgNp8USE9hALv koV9qiprm+zzkia2W7uQUSBOJYdQCnin3GMFW2rRSzWz9X/FpY4rnDqxDYgJASiRyxWB FoIVLlBL03/0M6uA3oguSyp8EpM2QGZYVykaVmzMcCngX/Y1mp6zEm98YZN8F9At7Fb9 b0RSpndWExQFb7BEQbLfpPLFFYizJZNoroJLJu547qtBBTS3v77y2FuOCfptNQML1jY6 DMsw== X-Gm-Message-State: AElRT7GngdYBwLYW9WsDeXcmsF5LFR2YiZQFCQaj+EWHZ9BIamtjUA08 +QEuvt8h13SJv5XtdJuVIPXPiC4L X-Google-Smtp-Source: AG47ELvi0zoVoyx2POPTuM7isNUUwKZexmXLF2b0XM+pYRzgm8qvAhoTxnzMgxbaXYnWx6yX1JgfvQ== X-Received: by 2002:a24:eca:: with SMTP id 193-v6mr15858ite.137.1520624916300; Fri, 09 Mar 2018 11:48:36 -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 202sm1536605itu.23.2018.03.09.11.48.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Mar 2018 11:48:35 -0800 (PST) In-Reply-To: <83muzhodkx.fsf@gnu.org> 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::234 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:223556 Archived-At: On 2018-03-09 03:30, Eli Zaretskii wrote: >> Cc: emacs-devel@gnu.org, eggert@cs.ucla.edu >> From: Clément Pit-Claudel >> Date: Thu, 8 Mar 2018 14:55:20 -0500 >> >>> Maybe we could find a middle ground, whereby each one of the examples >>> will approximately align. If that can be done, and the result is >>> acceptable, then the problem of recording the text properties in the >>> file and/or reindenting when the file is revisited goes away. >> >> Maybe :) I don't know how good it would look, in practice, but it's easy to experiment. >> Paul's algorithm is not too bad in that sense: these two examples align pixel-perfectly. > > Yes, but as I said, I don't think that approach is appropriate for > code indentation, because leading whitespace in code blocks _must_ > always align, IMO. IOW, that approach seems to favor alignment of > multi-line code sequences to alignment of indented blocks, and I think > programming modes should have the opposite preference. Indeed :) I was mostly of the same opinion, but I find the actual results pretty OK. >>> That's more relevant for text-derived modes, where indentation levels >>> are rigid and not determined by previous lines. There we could do a >>> better job, I hope. >> >> OK. I tend to think of indentation even in text modes as being somewhat previous-lines dependent (wrapped paragraphs align relative to bullet points, for example), but I agree that it isn't as much as in programming modes. > > IME, indentation of text in word processors I use does not depend on > previous lines at all. Except in lists, right? For example it's not uncommon to wrap like this: * Some long text here that wraps around: i. Point 1 … continued ii. Point 2 … continued iii. Point 3 … continued Clément