* Introducing Master of Ceremonies, a package for presentations
@ 2024-12-03 16:01 Psionic K
2024-12-04 2:45 ` Psionic K
` (2 more replies)
0 siblings, 3 replies; 19+ messages in thread
From: Psionic K @ 2024-12-03 16:01 UTC (permalink / raw)
To: Emacs developers; +Cc: Psionic K
I use this package for making videos and presentations. It's almost
ready for archives.
https://github.com/positron-solutions/master-of-ceremonies
https://github.com/positron-solutions/master-of-ceremonies.git
`mc-focus' is one of the most useful commands. Select a region, call
it, and that region will be displayed full screen with appropriate
scaling. You can highlight multiple regions by selecting and using
the "l" key. The "." key will activate a "subtle" cursor that goes
away after a short number of blinks to assist highlighting without
needing to hide the cursor all the time. There is a magit-style
interface for learning the rest of the modal bindings, available under
"h".
The `mc-kill-ring-save` command will save an expression that can play
back this display, making it rather easy to step through sequences of
highlights. This produces high quality illustrations of code that
line up well with explanation. When combined with dslide (on non-GNU
ELPA and MELPA), the two packages can create effective presentations
about code that are missing almost nothing from dedicated presentation
software.
Many of the tools for accomplishing this were valuable as standalone
modes for presentation
- `mc-quiet-mode' suppresses messages
- `mc-subtle-cursor-mode' is great for using the cursor like a
transient laser pointer
- `mc-face-remap' will remap many faces from presets. I use this to
tweak faces for MC Focus screenshots.
- `mc-fixed-frame' sets to preset resolutions for recording videos and
corrects the size when minor actions like resizing buffer text change
the size of the frame
Bindings for built-in Emacs behaviors like hiding the mode line are
provided. I only need to add support for modifying the transient to
allow myself to add keycast toggling.
These tools have been combined into a one-stop interface, `mc-dispatch'.
The core code for `mc-focus' acquired numerous behaviors I was using
personally and so the code is rather off. It needs to be
re-architectured for smoothly supporting rectangle selection,
whitespace trimming, and playback. I have experimented with
translating overlays from the source into the text properties of the
display.
Numerous things work in numerous settings, so I have made it available
ahead of publishing on package archives. Emacs conf participants may
find it of use for some last minute embellishment.
PRs and issues will be attended to.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Introducing Master of Ceremonies, a package for presentations
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 9:16 ` Jean Louis
2024-12-06 19:57 ` Jean Louis
2 siblings, 1 reply; 19+ messages in thread
From: Psionic K @ 2024-12-04 2:45 UTC (permalink / raw)
To: Emacs developers, Philip Kaludercic; +Cc: Psionic K
[-- Attachment #1: Type: text/plain, Size: 3191 bytes --]
I intend to submit Master of Ceremonies to Non-GNU ELPA. I'm deciding what
changes are necessary to facilitate that and looking for low-hanging fruit
to improve user results.
- I'm likely to change the package file name and consequent naming over to
mc. Please understand when this breaks use-package expressions.
- Autoloads are being made for 29.4 since there is no stable 30.x release
to target right now
- Mark several customize variables as safe local variables
- Generate a manual just to point users towards likely entry points like
`mc-focus' and `mc-present'
- More stable API for `mc-focus' playback
The following architecture and feature changes are planned (this is as much
rubber ducking as it is communication):
One disappointment of mine that affects both dslide and mc is the lack of
sufficient multi-monitor detection on XFCE even when xrandr is present.
The feature I want to implement is to display a frame or presentation
fullscreen on the "other" monitor because in dslide, the comments in the
base buffer are visible and can be used for narration. At present, it
appears I would need to interpret xrandr itself since the high-level
interface Emacs ships with appears not to distinguish the two physical
monitors when they are treated as a single virtual screen. Since we need a
new frame either way, I may just do that for now and later add customize
support to "guess" the correct location and fullscreen parameter of the new
frame.
All region selection for `mc-focus' will be re-architectured to normalize
onto the rectangle selection case. The non-rectangle case will be
translated internally to work like the rectangle case. The reason is that
I need to support trimming and to "do the right thing" when the user begins
the selection with indentation. The rectangle case is more general to
every consequent problem. This path may also adapt to handle visual lines
better, injecting newlines when the column exceeds the window column width.
I've realized a common mc workflow of mine is to hide some text completely
rather than just highlight substrings. Subsequently, un-hiding creates the
effect of building up a larger expression with all text remaining fixed in
place, invaluable when presenting code.
The playback features of MC almost assuredly need keyword arguments.
Display can be affected by the string, its text properties, overlays, and
invisibility specs. One option is to merge all of the properties and
overlays. A more flexible option for interactive explanation of display
itself is to toggle the invisibility spec and overlays on the fly. This is
unsupported during playback without retaining the "redundant" information
of unmerged properties and overlays etc. I need to add support for
propagating overlay priorities. Reducing all overlays is an option, but
the rules for overlays that are fully contained etc are a bit tricky and I
don't want to emulate all of the behavior within MC.
Images in theory can work. The size of the image needs to be adjusted
according to the scale of the text overlay. There could be edge cases.
Any specified space used for centering would need to be adjusted. That
holds for text as well.
[-- Attachment #2: Type: text/html, Size: 3580 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Introducing Master of Ceremonies, a package for presentations
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
0 siblings, 2 replies; 19+ messages in thread
From: Dmitry Gutov @ 2024-12-04 3:01 UTC (permalink / raw)
To: Psionic K, Emacs developers, Philip Kaludercic
Hi!
On 04/12/2024 04:45, Psionic K wrote:
> - I'm likely to change the package file name and consequent naming over
> to mc. Please understand when this breaks use-package expressions.
Just FWIW, there is an existing package which effectively uses the
prefix "mc" - just following it with "/", it's called multiple-cursors,
and it's been pretty popular a number of years ago.
Probably remains so (2.3K stars on GH).
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Introducing Master of Ceremonies, a package for presentations
2024-12-04 3:01 ` Dmitry Gutov
@ 2024-12-04 3:13 ` Psionic K
2024-12-05 5:09 ` Richard Stallman
1 sibling, 0 replies; 19+ messages in thread
From: Psionic K @ 2024-12-04 3:13 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: Psionic K, Emacs developers, Philip Kaludercic
[-- Attachment #1: Type: text/plain, Size: 380 bytes --]
> Just FWIW, there is an existing package which effectively uses the
> prefix "mc" - just following it with "/", it's called multiple-cursors,
> and it's been pretty popular a number of years ago.
Thanks, I hadn't seen that on MELPA, only its mc-* derivatives.
`moc' was the fallback plan. It does not trivially complete together with
any `mc' symbols. Anyone object to that?
[-- Attachment #2: Type: text/html, Size: 569 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Introducing Master of Ceremonies, a package for presentations
2024-12-04 3:01 ` Dmitry Gutov
2024-12-04 3:13 ` Psionic K
@ 2024-12-05 5:09 ` Richard Stallman
1 sibling, 0 replies; 19+ messages in thread
From: Richard Stallman @ 2024-12-05 5:09 UTC (permalink / raw)
To: psionik; +Cc: emacs-devel
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
The name "master of ceremonies" is poetical, but on practical grounds
it might be better to call it "presenter". That is shorter, and would
make its purpose clear to everyone.
Bt "mc" is too terse -- it won't
--
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Introducing Master of Ceremonies, a package for presentations
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 9:16 ` Jean Louis
2024-12-04 9:55 ` Psionic K
2024-12-06 19:57 ` Jean Louis
2 siblings, 1 reply; 19+ messages in thread
From: Jean Louis @ 2024-12-04 9:16 UTC (permalink / raw)
To: Psionic K; +Cc: Emacs developers
* Psionic K <psionik@positron.solutions> [2024-12-03 19:03]:
> I use this package for making videos and presentations. It's almost
> ready for archives.
>
> https://github.com/positron-solutions/master-of-ceremonies
> https://github.com/positron-solutions/master-of-ceremonies.git
Thanks, very nice and totally useful.
But I do not need those 2 vertical lines left and right, I need it all over the screen.
I am to use it for displaying phone number and short notes or passwords which have to be observed.
Like (mc-focus "+123456678") but lines are only confusing.
--
Jean Louis
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Introducing Master of Ceremonies, a package for presentations
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
0 siblings, 2 replies; 19+ messages in thread
From: Psionic K @ 2024-12-04 9:55 UTC (permalink / raw)
To: Psionic K, bugs; +Cc: Emacs developers
[-- Attachment #1: Type: text/plain, Size: 1410 bytes --]
Help me understand the problem more. The current implementation uses
window margins. If your Emacs has obviously visible margins, then the
effect is less good. Can you set window margins to zero to see if that's
the source of your "vertical lines"?
I can switch the implementation to using specified space to overcome this
if it is indeed what we're talking about.
If there's a communication issue, feel free to drop a screenshot on a
github issue.
I have updated the git and package prefix as part of my preparation for
Non-GNU ELPA and MELPA.
https://github.com/positron-solutions/moc
https://github.com/positron-solutions/moc.git
On Wed, Dec 4, 2024 at 6:17 PM Jean Louis <bugs@gnu.support> wrote:
> * Psionic K <psionik@positron.solutions> [2024-12-03 19:03]:
> > I use this package for making videos and presentations. It's almost
> > ready for archives.
> >
> > https://github.com/positron-solutions/master-of-ceremonies
> > https://github.com/positron-solutions/master-of-ceremonies.git
>
> Thanks, very nice and totally useful.
>
> But I do not need those 2 vertical lines left and right, I need it all
> over the screen.
>
> I am to use it for displaying phone number and short notes or passwords
> which have to be observed.
>
> Like (mc-focus "+123456678") but lines are only confusing.
>
> --
> Jean Louis
>
--
Only the Future is Certain
[-- Attachment #2: Type: text/html, Size: 2463 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Introducing Master of Ceremonies, a package for presentations
2024-12-04 9:55 ` Psionic K
@ 2024-12-04 10:05 ` Psionic K
2024-12-04 17:51 ` Jean Louis
1 sibling, 0 replies; 19+ messages in thread
From: Psionic K @ 2024-12-04 10:05 UTC (permalink / raw)
To: Psionic K, Philip Kaludercic; +Cc: Emacs developers
[-- Attachment #1: Type: text/plain, Size: 2520 bytes --]
Hello Philip,
I have updated the git and package prefix as part of my preparation for
Non-GNU ELPA and MELPA. Unless someone has a good objection in the near
future, moc is the new prefix. There has been a short time for discussion,
but my search indicates it's not a common substring except for completing
with "mock".
https://github.com/positron-solutions/moc
https://github.com/positron-solutions/moc.git
The current package lint shows no issues and the compile is clean. I have
added a NEWS.org and moc.texi. The overall scheme is similar to what I
used in dslide.
I have marked code I still consider unreliably unstable / experimental with
🚧 to note areas that should be ransacked by vandals at the first
convenience.
I'm currently working on adding some kind of anti-highlight to completely
obscure a bit of text and some trimming to try and stabilize the playback
API for use in dslide.
On Wed, Dec 4, 2024 at 6:55 PM Psionic K <psionik@positron.solutions> wrote:
> Help me understand the problem more. The current implementation uses
> window margins. If your Emacs has obviously visible margins, then the
> effect is less good. Can you set window margins to zero to see if that's
> the source of your "vertical lines"?
>
> I can switch the implementation to using specified space to overcome this
> if it is indeed what we're talking about.
>
> If there's a communication issue, feel free to drop a screenshot on a
> github issue.
>
> I have updated the git and package prefix as part of my preparation for
> Non-GNU ELPA and MELPA.
>
> https://github.com/positron-solutions/moc
> https://github.com/positron-solutions/moc.git
>
>
> On Wed, Dec 4, 2024 at 6:17 PM Jean Louis <bugs@gnu.support> wrote:
>
>> * Psionic K <psionik@positron.solutions> [2024-12-03 19:03]:
>> > I use this package for making videos and presentations. It's almost
>> > ready for archives.
>> >
>> > https://github.com/positron-solutions/master-of-ceremonies
>> > https://github.com/positron-solutions/master-of-ceremonies.git
>>
>> Thanks, very nice and totally useful.
>>
>> But I do not need those 2 vertical lines left and right, I need it all
>> over the screen.
>>
>> I am to use it for displaying phone number and short notes or passwords
>> which have to be observed.
>>
>> Like (mc-focus "+123456678") but lines are only confusing.
>>
>> --
>> Jean Louis
>>
>
>
> --
> Only the Future is Certain
>
--
Only the Future is Certain
[-- Attachment #2: Type: text/html, Size: 4346 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Introducing Master of Ceremonies, a package for presentations
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
1 sibling, 1 reply; 19+ messages in thread
From: Jean Louis @ 2024-12-04 17:51 UTC (permalink / raw)
To: Psionic K; +Cc: Emacs developers
[-- Attachment #1: Type: text/plain, Size: 395 bytes --]
* Psionic K <psionik@positron.solutions> [2024-12-04 12:57]:
> Help me understand the problem more. The current implementation uses
> window margins. If your Emacs has obviously visible margins, then the
> effect is less good. Can you set window margins to zero to see if that's
> the source of your "vertical lines"?
See vertical lines on left and right side in attachment.
--
Jean Louis
[-- Attachment #2: 2024-12-04_20-50.png --]
[-- Type: image/png, Size: 31178 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Introducing Master of Ceremonies, a package for presentations
2024-12-04 17:51 ` Jean Louis
@ 2024-12-05 1:25 ` Psionic K
2024-12-05 5:25 ` Jean Louis
2024-12-05 18:41 ` Jean Louis
0 siblings, 2 replies; 19+ messages in thread
From: Psionic K @ 2024-12-05 1:25 UTC (permalink / raw)
To: bugs; +Cc: Psionic K, Emacs developers
I don't know what display behavior creates the bars. I think it's
margins, but let's find out. I have added a branch, no-margins, which
uses specified space instead of margins. Please let me know if it
fixes your problem.
Another critical bug fix is in both branches. The state of
`moc-subtle-cursor-mode' was initialized to t during loading (visible
after restart) and `moc-focus' inferred that it needed to restore
`moc-subtle-cursor-mode' after the first call, leaving behind a very
much activated `moc-subtle-cursor-mode' for the user to clean up
manually.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Introducing Master of Ceremonies, a package for presentations
2024-12-05 1:25 ` Psionic K
@ 2024-12-05 5:25 ` Jean Louis
2024-12-05 8:29 ` Psionic K
2024-12-05 18:41 ` Jean Louis
1 sibling, 1 reply; 19+ messages in thread
From: Jean Louis @ 2024-12-05 5:25 UTC (permalink / raw)
To: Psionic K; +Cc: Emacs developers
* Psionic K <psionik@positron.solutions> [2024-12-05 04:26]:
> I don't know what display behavior creates the bars. I think it's
> margins, but let's find out. I have added a branch, no-margins, which
> uses specified space instead of margins. Please let me know if it
> fixes your problem.
I tried new branch and I see same vertical bars.
It is caused by `set-window-margins' of course.
Point of displaying something large is to present it conclusively. If
you introduce visible margins and those margins will be also in
different colors in different themes.
It makes the display inconclusive, it makes a bit confusing "what am I seeing there".
--
Jean Louis
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Introducing Master of Ceremonies, a package for presentations
2024-12-05 5:25 ` Jean Louis
@ 2024-12-05 8:29 ` Psionic K
2024-12-05 17:40 ` Jean Louis
0 siblings, 1 reply; 19+ messages in thread
From: Psionic K @ 2024-12-05 8:29 UTC (permalink / raw)
To: Psionic K, bugs; +Cc: Emacs developers
I've updated the no-margins branch.
I reproduced your issue by setting a fringe face background different
than my default face background. MoC now sets fringe face background
to nil and restores it after done. While I did also resize the
fringes to zero, unless I can handle the echo area fringes and restore
those, I cannot be more surgical at this time.
Tangentially, the branch also contains overlay persistence and
playback I just added, which can help displaying fancy org modern
excerpts. I hope this doesn't confound our effort.
Let me know if this helps.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Introducing Master of Ceremonies, a package for presentations
2024-12-05 8:29 ` Psionic K
@ 2024-12-05 17:40 ` Jean Louis
0 siblings, 0 replies; 19+ messages in thread
From: Jean Louis @ 2024-12-05 17:40 UTC (permalink / raw)
To: Psionic K; +Cc: Emacs developers
* Psionic K <psionik@positron.solutions> [2024-12-05 11:29]:
> I've updated the no-margins branch.
>
> I reproduced your issue by setting a fringe face background different
> than my default face background. MoC now sets fringe face background
> to nil and restores it after done. While I did also resize the
> fringes to zero, unless I can handle the echo area fringes and restore
> those, I cannot be more surgical at this time.
with
git branch --list
I see no branches now any more, but it was before.
And why you need branch? Just make it in the main.
--
Jean Louis
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Introducing Master of Ceremonies, a package for presentations
2024-12-05 1:25 ` Psionic K
2024-12-05 5:25 ` Jean Louis
@ 2024-12-05 18:41 ` Jean Louis
2024-12-05 23:27 ` Psionic K
1 sibling, 1 reply; 19+ messages in thread
From: Jean Louis @ 2024-12-05 18:41 UTC (permalink / raw)
To: Psionic K; +Cc: Emacs developers
* Psionic K <psionik@positron.solutions> [2024-12-05 04:28]:
> I don't know what display behavior creates the bars. I think it's
> margins, but let's find out. I have added a branch, no-margins, which
> uses specified space instead of margins. Please let me know if it
> fixes your problem.
It works now, and I didn't use any branch. Good there are no lines on screen.
I have now included it in RCD Notes & Hyperscope, The Dynamic
Knowledge Repository for GNU Emacs, as it is going to be heavily used
in demonstrations of phone numbers, email addresses, each time user
has to write something on the paper, or call by watching the number,
street address, zip code, the last killed information, and so on.
Here is the video demonstration:
https://gnu.support/images/2024/12/2024-12-05/2024-12-05-21:38:25.ogv
I think that longer lines shall be wrapped, you have to include word
wrap, as otherwise lines will become smaller thant the original line!
--
Jean Louis
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Introducing Master of Ceremonies, a package for presentations
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 9:16 ` Jean Louis
@ 2024-12-06 19:57 ` Jean Louis
2024-12-07 12:02 ` Psionic K
2 siblings, 1 reply; 19+ messages in thread
From: Jean Louis @ 2024-12-06 19:57 UTC (permalink / raw)
To: Psionic K; +Cc: Emacs developers
Programming/git/moc/moc.el: Warning: ‘when-let’ is an obsolete macro (as of 31.1); use ‘when-let*’ or ‘and-let*’ instead. [3 times]
Programming/git/moc/moc.el: Warning: ‘if-let’ is an obsolete macro (as of 31.1); use ‘if-let*’ instead. [3 times]
Programming/git/moc/moc.el: Warning: ‘when-let’ is an obsolete macro (as of 31.1); use ‘when-let*’ or ‘and-let*’ instead. [2 times]
Programming/git/moc/moc.el: Warning: ‘if-let’ is an obsolete macro (as of 31.1); use ‘if-let*’ instead. [2 times]
--
Jean Louis
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Introducing Master of Ceremonies, a package for presentations
2024-12-06 19:57 ` Jean Louis
@ 2024-12-07 12:02 ` Psionic K
2024-12-08 6:29 ` Jean Louis
0 siblings, 1 reply; 19+ messages in thread
From: Psionic K @ 2024-12-07 12:02 UTC (permalink / raw)
To: Psionic K, bugs; +Cc: Emacs developers
[-- 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 --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Introducing Master of Ceremonies, a package for presentations
2024-12-07 12:02 ` Psionic K
@ 2024-12-08 6:29 ` Jean Louis
2024-12-08 7:14 ` Psionic K
0 siblings, 1 reply; 19+ messages in thread
From: Jean Louis @ 2024-12-08 6:29 UTC (permalink / raw)
To: Psionic K; +Cc: Emacs developers
* Psionic K <psionik@positron.solutions> [2024-12-07 15:03]:
> To be clear, Jean, are you conducting this review for Non-GNU ELPA?
For my software and for your improvement.
It is presenting well, but only short words. It should at least
present well sentences and paragraphs.
> > 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.
- calculate how many letters can fit in single line, for the maximum presentable width
- I would remove any double horizontal white space from sentences or paragraphs
- I would convert it to list of words
- then make new list of concatenated chunks of words that fit in the single line
- then concatenate maybe with new lines
- then present it
> 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.
I think yes with word parsing and deciding how to fit it.
--
Jean Louis
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: Introducing Master of Ceremonies, a package for presentations
2024-12-08 6:29 ` Jean Louis
@ 2024-12-08 7:14 ` Psionic K
0 siblings, 0 replies; 19+ messages in thread
From: Psionic K @ 2024-12-08 7:14 UTC (permalink / raw)
To: Psionic K, bugs; +Cc: Emacs developers
[-- 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 --]
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2024-12-08 7:14 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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.