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: MoC for Non-GNU ELPA [was:Introducing Master of Ceremonies, a package for presentations] Date: Tue, 10 Dec 2024 17:04:40 +0900 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22035"; mail-complaints-to="usenet@ciao.gmane.io" Cc: bugs@gnu.support To: Psionic K , Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Dec 10 09:05:42 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 1tKvFV-0005Yc-GR for ged-emacs-devel@m.gmane-mx.org; Tue, 10 Dec 2024 09:05:41 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tKvEr-0002fc-IN; Tue, 10 Dec 2024 03:05:01 -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 1tKvEp-0002ed-7D for emacs-devel@gnu.org; Tue, 10 Dec 2024 03:04:59 -0500 Original-Received: from mail-yb1-xb36.google.com ([2607:f8b0:4864:20::b36]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tKvEk-0007U2-S2 for emacs-devel@gnu.org; Tue, 10 Dec 2024 03:04:58 -0500 Original-Received: by mail-yb1-xb36.google.com with SMTP id 3f1490d57ef6-e398484b60bso4437423276.1 for ; Tue, 10 Dec 2024 00:04:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=positron.solutions; s=google; t=1733817891; x=1734422691; darn=gnu.org; h=cc:to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=Du97elscef1Vpvg6Sq9fgCVqdNWf0VexNFreFKxyaks=; b=Eiu7aFd35sZtOx7rYrjlapYo+tdxy1yJI8yKH59oqQzYCEE0VdsgP/z5kb4vDQrMZM NI4W4/abnt9WX40+4yz7XUr0TXIi7NzVjF7NTKA4lm/eLt/p71RxymTwoxku9c2NAvUW L6HisuLy2f2shJKCGXVRAZuKyk/APCm2LQ565CXR60wsH5HKkSPKwi6iWvlnGQ42DAA2 ZvVNaF7uJ5fbDgpnA55Ju9mJ9YFujKjQEZ4ZJX53Tx9P0/l+8wYxiNeMuOQZCmLCHbsa qHSuK7W8CLM4kizQ1n1YBWAFO8AKZE/UNv0ztEPlMzVbqv8+muu8b0XiyacYqXVmRGk9 hMyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733817891; x=1734422691; h=cc:to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Du97elscef1Vpvg6Sq9fgCVqdNWf0VexNFreFKxyaks=; b=NX9qWUi1r3R1gZzEzRLMMAUVLw6tKWYlDmEPOXBYscZFyZRoorGQs/BNhR2PAZgY9D Yo78mfY0i1TSjXPzcreJY47hrtugFW+xEmxKGizspEnzzuUoz7lWhRPje1VIXYyW6R4W XE2IcSBev/H13JKOREcPjQFFaTWAgFcuu3VKIfbx16x4tCyBWSbaD7cF27erlbDt67vd eepmoDzqhgdBa78kv6uur007Xmc56GfAyTaOOwRpxKIQORh6aXFEle9po2Xi/H0GgQtz xaMIz6Imi630tH5FxheLwEeSvt2X9TARRCm8dfqY6V8R1tPiAoswC55xxWqboR/4QY32 SbyA== X-Forwarded-Encrypted: i=1; AJvYcCUd8AH+7q6c2Pq9mbTJBa1GEbrvjI5LrUxVnb0iTBCCwWjzHRoK6aaAeJ6QbdhXt4g7CW5NSBiIvw81Vg==@gnu.org X-Gm-Message-State: AOJu0YwwyWdFJ+Ib0kdMhAdrlPX01WogGSZwufTVka7iPbk1EkpO7vf9 Gk5B2H3D5k+CwIrR4hW84O38eua0IhuzMger7tBRihkPfTCrVgw2Bb2q8FQAzowuATy5THwipzC 8xYg906VrUe/nb2kJkKYcV1btd3nfkN9iTxkdBA== X-Gm-Gg: ASbGnctkND+CwUghO/5bkJPLn0ajkH2cHqyqehKlpFBDC1iL4RRVXn2Il41clclDaI1 u/9F11+ONDhG/NoCyNrUSMYTcXDnTuuiVedJLgg== X-Google-Smtp-Source: AGHT+IFny4R8GaYVTlvkZVp9peVxFAJeX90TLmMgZg64zIAQfCj6F892VF9ZQobmDUS4WLMhw+ZTVO5WrUuwD6zjql8= X-Received: by 2002:a05:6902:c06:b0:e38:b5f5:95eb with SMTP id 3f1490d57ef6-e3a0b72d409mr12749713276.35.1733817891560; Tue, 10 Dec 2024 00:04:51 -0800 (PST) Received-SPF: pass client-ip=2607:f8b0:4864:20::b36; envelope-from=exec@positron.solutions; helo=mail-yb1-xb36.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, 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:326275 Archived-At: 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.