unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
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: Sun, 8 Dec 2024 16:14:04 +0900	[thread overview]
Message-ID: <CADQMGAQFgi-QiTbAgLXyQ5Z3r4qXe9Phfow+=PyaeXm7r_fL5A@mail.gmail.com> (raw)
In-Reply-To: <Z1U8wQe39Y2ndMmd@lco2>

[-- Attachment #1: Type: text/plain, Size: 2488 bytes --]

I have pushed master with some packaging related fixups to make progress on
adding to MELPA / Non-GNU ELPA.  Among changes, I have adopted a new
strategy that leans on Emacs text editing.  The result is much more
satisfactory than the overlay stitching and translation I had started work
on in another stash which will now be deleted.

As a benefit, we finally have some basic whitespace cleanup and indentation
preservation when selections do not begin at a line beginning, such as can
be required if the preceding text is not whitespace.

What remains is an implementation of rectangle trimming and following up on
my continuation strategy, I will describe below.

> remove any double horizontal white space from sentences or paragraphs

User responsibility.  I can't make everyone or a reliable majority happy
with either decision and input text expresses these decisions or should.

> It is presenting well, but only short words. It should at least
> present well sentences and paragraphs.

The new `:continuation` key in `moc-focus` replay arg plist reveals my
strategy for this.  I read the state of `visual-line-mode` and
`adaptive-wrap-prefix-mode`.  I will default to truncation when these are
not active.  When they are active, I can calculate the right size as
described earlier and allow Emacs logic to wrap the text.  If in the future
text can be justified by an overlay or buffer-wide via a mode, it will be
easy to support, but I will not manually re-flow text because that is just
asking to re-implement and maintain the entire ball of yarn in Elisp, an
endeavour of very limited value to me and one that has workarounds for the
user:  Turn off read-only mode and make some edits.

When filling code with long lines and comments etc, the user's fill column
will usually be what they want.  I don't want to reflow Elisp code without
a lot more intelligence.  That is LLM work, not fiddly text editing rule
and heuristic based work.  Truncation is very robust at limiting the max
width.

For visual lines, along with the continuation strategy described above, I
am implementing a minimum character width, which is a heuristic to avoid
re-shaping text that is extremely short, below 30 characters or so.  Don't
want one word per line.

I can do manual justification, but honestly why not just do this with
specified space in Emacs and apply a text property if desired?  My
implementation will be useless by comparison in terms of coverage.  Images
can center.  Why not text?

[-- Attachment #2: Type: text/html, Size: 2963 bytes --]

      reply	other threads:[~2024-12-08  7:14 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
2024-12-08  6:29     ` Jean Louis
2024-12-08  7:14       ` Psionic K [this message]

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='CADQMGAQFgi-QiTbAgLXyQ5Z3r4qXe9Phfow+=PyaeXm7r_fL5A@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).