From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.devel Subject: Line wrap reconsidered Date: Mon, 25 May 2020 14:13:04 -0400 Message-ID: <92FF4412-04FB-4521-B6CE-52B08526E4E5@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="76092"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon May 25 20:26:52 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 1jdHoK-000JeU-D7 for ged-emacs-devel@m.gmane-mx.org; Mon, 25 May 2020 20:26:52 +0200 Original-Received: from localhost ([::1]:54260 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdHoJ-0008UM-Dy for ged-emacs-devel@m.gmane-mx.org; Mon, 25 May 2020 14:26:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45712) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdHb2-0001bx-9C for emacs-devel@gnu.org; Mon, 25 May 2020 14:13:08 -0400 Original-Received: from mail-qt1-x82f.google.com ([2607:f8b0:4864:20::82f]:45592) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jdHb1-0000Lu-Fp for emacs-devel@gnu.org; Mon, 25 May 2020 14:13:07 -0400 Original-Received: by mail-qt1-x82f.google.com with SMTP id y1so3610637qtv.12 for ; Mon, 25 May 2020 11:13:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=zqtZwGPN5ZH0qBZiUT4Q0NzUd3OQrcFB9mhG4C3G9p0=; b=W2Mv3wm/HCbikJaLaoUlqMdK4Y097gP9Ut6cGXdOPYwl/Yokh+pcnUE9HS0ijDyFVd gGdBVv9+jqWATIh4f1K0EQkOPaL27O21+yGd2ffCKaW70fbCbKj8hJUCIURe2icfwxGG +qz/uCnY26YlYdNLua5LMi1Bv/cmtRRSKxgCjY5mJ5hMaUHvXSxBOEvMPrlILIXSlrFR Em+KnFhaJvwZoM6Eb5lBcadDzHFgdSU356ag8UdXqp/J1vUO/DWLddlCb3oIODKLkT7N WhP0Y4/qKM3dxvXbImLEDIFz/USGWxkSxoPRPO/s4ODWMuQodelSUG2SuP2Tw4TSCADf 6yRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=zqtZwGPN5ZH0qBZiUT4Q0NzUd3OQrcFB9mhG4C3G9p0=; b=kBJZGabFueFPT4JjGKN8v8ozcxwV9PQwKQVunndctTKpjz2vF7unkwi1bKQNf1p9tD JIBXsx1gxaABysnV34YKUmeMdR7wXSJhkuKOOBebxIn3E1v6i5D6YEP94O1SU5zx0k/p ZAyFhsWtTyYK3Vpk/VbDqOXfejSB6F3uBzbbFHXu0Z4R0kQhBlScNy5S69jQ8ehCWsdp f3LPaYcs20W/4k2pwSlHSUz8Tc/M6mxZcGSqKcfBIO7KL1BVB67hHDmM5Ktd9zxYb8SA AC5NjXO/wVPKvbESR/FaqzsH1Zhx4lTK0B9spf9hGD6Pg7AHO7NZt9xZIwScz9KvkG2H ql/w== X-Gm-Message-State: AOAM531y3r//JHj2N7fjcr7YXb7Vcjc2KqW8WiRaYRYZbAG+WEz59+0+ kox8G0656rVfBaTxsbqCPi+RwyPmrlNw2Q== X-Google-Smtp-Source: ABdhPJylSVCPeMgOqUNbCK4cnzz206EhipgqzbjuzmLFmggyFzthQvKxW+UhKhxK7rMfGc0Dun0j3w== X-Received: by 2002:ac8:3009:: with SMTP id f9mr9711052qte.335.1590430385740; Mon, 25 May 2020 11:13:05 -0700 (PDT) Original-Received: from [192.168.1.10] (c-174-60-229-153.hsd1.pa.comcast.net. [174.60.229.153]) by smtp.gmail.com with ESMTPSA id z3sm1456605qkl.111.2020.05.25.11.13.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 May 2020 11:13:05 -0700 (PDT) X-Mailer: Apple Mail (2.3608.80.23.2.2) Received-SPF: pass client-ip=2607:f8b0:4864:20::82f; envelope-from=casouri@gmail.com; helo=mail-qt1-x82f.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001 autolearn=_AUTOLEARN 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:251379 Archived-At: I=E2=80=99ve implemented and used a lisp-based line-wrapping feature for = a while and it=E2=80=99s still sub-optimal for me. I now want to try to = explore if I can add it directly to redisplay.=20 Here is what I come up with: in redisplay code, instead of only checking = for whitespace, check for a =E2=80=98no-wrap text-property, if the = character has this property, don=E2=80=99t wrap before[1] this character = (or maybe it can be the opposite, only wrap when the character has a = =E2=80=98can-wrap property). And this text property is calculated and = applied once.=20 Could this be plausible? Is checking text property is fast enough for = redisplay? [1] There are some complications to this, some characters can=E2=80=99t = have line break before them, some can=E2=80=99t have after; maybe use = =E2=80=98before, =E2=80=98after and nil instead of binary value. Yuan