From: Psionic K <psionik@positron.solutions>
To: Psionic K <psionik@positron.solutions>, bugs@gnu.support
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: Introducing Master of Ceremonies, a package for presentations
Date: Sat, 7 Dec 2024 21:02:35 +0900 [thread overview]
Message-ID: <CADQMGAS781dbF2e5QvUO7auO1hQiv9D+MkCTUgmqgqKK_G-k4Q@mail.gmail.com> (raw)
In-Reply-To: <Z1NXLdykjF-gixh6@lco2>
[-- Attachment #1: Type: text/plain, Size: 1640 bytes --]
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.
[-- Attachment #2: Type: text/html, Size: 1837 bytes --]
next prev parent reply other threads:[~2024-12-07 12:02 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-03 16:01 Introducing Master of Ceremonies, a package for presentations Psionic K
2024-12-04 2:45 ` Psionic K
2024-12-04 3:01 ` Dmitry Gutov
2024-12-04 3:13 ` Psionic K
2024-12-05 5:09 ` Richard Stallman
2024-12-04 9:16 ` Jean Louis
2024-12-04 9:55 ` Psionic K
2024-12-04 10:05 ` Psionic K
2024-12-04 17:51 ` Jean Louis
2024-12-05 1:25 ` Psionic K
2024-12-05 5:25 ` Jean Louis
2024-12-05 8:29 ` Psionic K
2024-12-05 17:40 ` Jean Louis
2024-12-05 18:41 ` Jean Louis
2024-12-05 23:27 ` Psionic K
2024-12-06 19:57 ` Jean Louis
2024-12-07 12:02 ` Psionic K [this message]
2024-12-08 6:29 ` Jean Louis
2024-12-08 7:14 ` Psionic K
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CADQMGAS781dbF2e5QvUO7auO1hQiv9D+MkCTUgmqgqKK_G-k4Q@mail.gmail.com \
--to=psionik@positron.solutions \
--cc=bugs@gnu.support \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).