all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Psionic K <psionik@positron.solutions>
To: Psionic K <psionik@positron.solutions>,
	Emacs developers <emacs-devel@gnu.org>
Cc: bugs@gnu.support
Subject: MoC for Non-GNU ELPA [was:Introducing Master of Ceremonies, a package for presentations]
Date: Tue, 10 Dec 2024 17:04:40 +0900	[thread overview]
Message-ID: <CADQMGAQ88=q4c+=m56kKNg-fQawGY15wJ5CmPov5LHagzHkPcg@mail.gmail.com> (raw)

Master of Ceremonies was developed as a companion to Dslide.  Both
packages aid presenting and authoring video and other content within
Emacs.

https://github.com/positron-solutions/moc
https://github.com/positron-solutions/moc.git

Master of Ceremonies (MoC) has two core commands:  `moc-focus' and
`moc-dispatch'

`moc-focus' is a valuable tool for authoring screenshots or conducting
live explanation of excerpts of Emacs buffers, usually code.  It fills
the frame with the selected region.  You can apply highlights and
occlusions to selectively reveal or emphasize parts of an expression.
It attempts to faithfully preserve the appearance of the source buffer
by propagating much display information, such as overlays and the
invisibility spec.

`moc-focus-kill-ring-save' does exactly like what it sounds like.  It
saves an expression that can be used to play back the current MoC
buffer state, including highlights and occlusions.  This is how I
create much of my content for videos using Dslide.  Because the
highlight and occlusion states are saved, the playback expressions can
cover cases that simply saving text in a babel block would not be able
to quickly re-generate on demand.

Combining `moc-focus' and `moc-kill-ring-save', one can quickly obtain
the necessary inputs for authoring content with TikTok levels of
engagement, using nothing but text and code displayed in Emacs and
some post-processing or Dslide to step through highlights.

The use cases of `moc-focus' are broad:
- make buffer excerpts full frame to show to someone farther away from
the screen
- emphasize and step through pieces of these excerpts, building them
up with contents remaining in place
- demonstrate visibility and overlay behaviors
- save SVGs with no surrounding noise to utilize Emacs display for
authoring other graphics materials
- Steps in dslide presentations (presently through babel blocks as steps)

The second command, `moc-dispatch' is a centralized collection of
utilities and controls for conducting presentations.  The utilities
include:

- `moc-fixed-frame-set' sets a resolution and will attempt to preserve
that frame through unintended changes possibly not covered by
`frame-inhibit-implied-resize t'.
- `moc-subtle-cursor-mode' is a poor man's laser pointer built in.  If
your cursor color is highly visible, then this mode makes it very
convenient to have the benefits of a cursor when doing motion but to
hide that cursor immediately after use.
- `moc-face-remap' can store presets of mass face remappings.
`moc-focus' supports default presets.
- `moc-quiet-mode' suppresses messages, though I feel like users
should be able to figure out the simple variable change without a
mode, it is what is done for now.

I will be doing a video presentation of the Transient implementation
choices, using MoC to discuss and incidentally demonstrate MoC, on my
YouTube.  My most recent Dslide update:
https://www.youtube.com/watch?v=00JEayL5Emk

Status of work:

The playback expressions have been extremely unstable.  I am holding
off on declaring them version 1.  They are all generating expressions
with ":version 0" to indicate this lack of guarantees in the short
term while I gain usage data by doing presentations and videos.  I
will update this to 1 only when I am comfortable that I can maintain
at least some backwards compatibility.

Visual line mode content works acceptably.  The default is truncation.
This decision is inferred by looking at the state of visual modes in
the source buffer.  Controls to update this in a focus buffer will
only require modest re-architecture.  Since `moc-focus' can serialize
its own replay state, it is very easy to imagine how to accomplish
updates.

The implementations of visual line and truncation support leverage
Emacs text flow behavior.  This implementation was much, much shorter
and much more reliable in terms of results.  I will not go into detail
of other paths of implementation that I tried but discarded in utter
disgust.  Re-flow and column width are coupled and riddled with
details that shall not be guessed at from Elisp.  We can do more, but
I would prefer if Emacs does more and I just update MoC to hand this
highly non-specific work over to Emacs display.  The implementations I
have delivered are about 2% of the code of implementations I
discarded.

Hooks and various bits of normal things are missing.  I will, as is
the open source way, get to them in order of need, in order of
thinking of them, and in order of clean PR.  All have the option of
hitting my Github Sponsors to encourage expedited handling.

There is no support for graphical frames and I don't even know why I
would try or why a non-graphical user would ask.

Images could be supported better.  I merely need to scale the overlays
that occur in excerpts with images.  Some doodads created with fringes
etc do not survive the scaling well and are omitted from overlay
propagation.



             reply	other threads:[~2024-12-10  8:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-10  8:04 Psionic K [this message]
2024-12-24  2:48 ` MoC for Non-GNU ELPA [was:Introducing Master of Ceremonies, a package for presentations] Stefan Kangas
2024-12-25  4:46   ` Richard Stallman
2024-12-25  5:03     ` Psionic K
2024-12-25 12:20       ` Eli Zaretskii
2024-12-25 13:33         ` 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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADQMGAQ88=q4c+=m56kKNg-fQawGY15wJ5CmPov5LHagzHkPcg@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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.