From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Psionic K Newsgroups: gmane.emacs.devel Subject: Re: Introducing Master of Ceremonies, a package for presentations Date: Sat, 7 Dec 2024 21:02:35 +0900 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000dd60410628ace8ab" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30596"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emacs developers To: Psionic K , bugs@gnu.support Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Dec 07 13:03:30 2024 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 1tJtWz-0007nM-TK for ged-emacs-devel@m.gmane-mx.org; Sat, 07 Dec 2024 13:03:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tJtWP-0006Ej-5j; Sat, 07 Dec 2024 07:02:53 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tJtWN-0006EH-01 for emacs-devel@gnu.org; Sat, 07 Dec 2024 07:02:51 -0500 Original-Received: from mail-yb1-xb33.google.com ([2607:f8b0:4864:20::b33]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tJtWL-00060a-0D for emacs-devel@gnu.org; Sat, 07 Dec 2024 07:02:50 -0500 Original-Received: by mail-yb1-xb33.google.com with SMTP id 3f1490d57ef6-e3a0acba5feso1164898276.2 for ; Sat, 07 Dec 2024 04:02:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=positron.solutions; s=google; t=1733572966; x=1734177766; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=M9nCMGKU/PZEXT7auU8rE25M2/1Sae7bvNRkX0N4EH8=; b=nnj+t/P2L91EeSKuE+m9ytdMfA7aJM3P/2lX9gX/2PYYara/N12OyNyzcz6XzdzfPX CuRj6d+WXNHVG4eOeR141QwzfhdiVJ/8VqC0oV0wnRgAoKDWyvLj9/N2xVj0Zz+Wpyrc nOmkQd7gopUUAEHVDsyzDctQrMdlfCAtlWjyZd2a/w74ob29e1cbyJHsmoUbDHByGvOe 2ik6EX+uzy/oBemd2TM4xPK2ozGk9yknMDjLKE7aEPCNv64C5NkUgZ3ZNjkSs4diahs8 5U3bqvmeaG0hcCYIuHLIdBuSSe4/q5gkYWzPAu0uhIlIB6EFEDwXLxC72z4Qnt1EmrTA owhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733572966; x=1734177766; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=M9nCMGKU/PZEXT7auU8rE25M2/1Sae7bvNRkX0N4EH8=; b=AGSX+Cva22bw2Bqg+hGy1KwPru69H87mVZnO3zBU7934lRa/0N+XyBrjNupcA3MbnQ OwG60diOqqlh+2vSTLI4SA512Kd0f3Df9CTfx7Mw4y3sOA1HmuIenKd6mwSNNYGARStO xVlcpLrZ1wiWSvdjBGkq7ZcJIKj2e+3IEahCntVxquC92tIKvUHvORboSJkRRdd/XGe4 gQBZlI7skcr8wdb7A1NaLlShDLsbBcjkIUwkdzsiedvRbvgIkjUzvzXdjsMlOMCDINE7 SXB4TeX4u1TGGFyUteSQPDK/c1fa7S9bwJIAaoatWkB+CKaERdcOcFILcA+MKIEFW9m+ Qx5w== X-Gm-Message-State: AOJu0YyuX5LygrdXJWPFJP+ipuzB/U65GGcSn6/y68xl4+C5Xvd0PMD1 AcMMXpNUkpZygPxCX+CzNbh/Jj2NNnH97QmnvMCnbWoNK8OfDG8+FD78nBTiGlf2D/+7LXSVXO9 YHYM6SnDNMdy23vuydK79VHBOoN2RfasLJB+Rsa4rzpg9EFPMgHk= X-Gm-Gg: ASbGnctJoqMbYUkKts0Mr2BBMqZiOAPzlD79FdFIUsPhZ6ID6TwcnKduiTdSujBvLY8 QcoRfbmlEzo1IpT6TYC4aO2crjLIr+AR1Ng== X-Google-Smtp-Source: AGHT+IE9bZ9tllikWVNv7Xcct7Z8I0zSv+p/HIOfgveYG+xhie91VKTECk+eTzrvqzvmYCtKwgHwgYr5lRWMeYgIVGg= X-Received: by 2002:a05:690c:6d10:b0:6ef:7f89:d8fa with SMTP id 00721157ae682-6efe3cdbc4dmr60286607b3.32.1733572966562; Sat, 07 Dec 2024 04:02:46 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::b33; envelope-from=exec@positron.solutions; helo=mail-yb1-xb33.google.com 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:326160 Archived-At: --000000000000dd60410628ace8ab Content-Type: text/plain; charset="UTF-8" To be clear, Jean, are you conducting this review for Non-GNU ELPA? > I think that longer lines shall be wrapped, you have to include word > wrap, as otherwise lines will become smaller thant the original line! Such a change is in progress. I'm just about to stash some re-work of the core logic for `moc-focus' to have general support for most cases. It's looking like 1k lines of rework and quite annoying. I suspect there must be a better way. I can fit visual lines by using their horizontal and vertical height after breaks to calculate what will provide the best aspect ratio. Such a calculation with reasonable accuracy can be done in one step without troubling Emacs. With some length of selection there is never anything I can do to make the text big, but we can make it pretty. The fundamental issue remains that translating overlays after such a reflow is not so trivial. That is unless I do the reflow within a buffer with editing commands after copying all of the necessary information over instead of stitching and welding overlays and strings together without the aid of a buffer. This would allow some savings by re-using editing logic to preserve overlays and property applications to injected whitespace. Instead of calculating things I can just read the final result of all the edits. This seems more robust and I think I will implement the easiest and most relevant cases first: - whitespace trimming of indentation - whitespace injection to maintain column alignment of first line in source - newline insertion to reflow long logical lines and match the target aspect ratio I might just need a break lol. --000000000000dd60410628ace8ab Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
To be clear, Jean, are you conducting this review for Non-= GNU ELPA?

> I think that longer lines shall be wrapped, you have = to include word
> wrap, as otherwise lines will become smaller thant = the original line!

Such a change is in progress.=C2=A0 I'm = just about to stash some re-work of the core logic for `moc-focus' to h= ave general support for most cases.=C2=A0 It's looking like 1k lines of= rework and quite annoying.=C2=A0 I suspect there must be a better way.

I can fit visual lines by using their horizontal and = vertical height after breaks to calculate what will provide the best aspect= ratio.=C2=A0 Such a calculation with reasonable accuracy can be done in on= e step without troubling Emacs.=C2=A0 With some length of selection there i= s never anything I can do to make the text big, but we can make it pretty.<= br>

The fundamental issue remains that translating= overlays after such a reflow is not so trivial.=C2=A0 That is unless I do = the reflow within a buffer with editing commands after copying all of the n= ecessary information over instead of stitching and welding overlays and str= ings together without the aid of a buffer.=C2=A0 This would allow some savi= ngs by re-using editing logic to preserve overlays and property application= s to injected whitespace.=C2=A0 Instead of calculating things I can just re= ad the final result of all the edits.=C2=A0 This seems more robust and I th= ink I will implement the easiest and most relevant cases first:

- whitespace trimming of indentation
- whitespace inje= ction to maintain column alignment of first line in source
- newl= ine insertion to reflow long logical lines and match the target aspect rati= o

I might just need a break lol.
--000000000000dd60410628ace8ab--