<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
 xmlns:content="http://purl.org/rss/1.0/modules/content/"
 xmlns:wfw="http://wellformedweb.org/CommentAPI/"
 xmlns:dc="http://purl.org/dc/elements/1.1/"
 xmlns:atom="http://www.w3.org/2005/Atom"
 xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
 xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
 xmlns:georss="http://www.georss.org/georss"
 xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
 xmlns:media="http://search.yahoo.com/mrss/">
<channel>
<atom:link href="https://monadicsheep.org/blog/rss.xml" rel="self" type="application/rss+xml" />
<title>MonadicSheep blog.</title>
<link>https://monadicsheep.org/blog/</link>
<description><![CDATA[Blogs from MonadicSheep.]]></description>
<language>en</language>
<lastBuildDate>Wed, 08 Jul 2026 07:59:25 +0000</lastBuildDate>
<generator>Emacs 31.0.50 org-publish-rss.el 0.8</generator>
<item>
<title>Canvas patch: we need testers!</title>
<link>https://monadicsheep.org/blog/call-for-canvas-patch-testers.html</link>
<pubDate>Mon, 29 Jun 2026 00:00:00 +0000</pubDate>
<guid>https://monadicsheep.org/blog/call-for-canvas-patch-testers.html</guid>
<description>
<![CDATA[<div class="author">by Tushar</div><div class="org-org-date">2026 June 29</div><div class="tags"> <a class="tag" href="/blog/tag.html#emacs">emacs</a> <a class="tag" href="/blog/tag.html#canvas">canvas</a></div><p>
The <a href="https://monadicsheep.org/blog/hello.html">Canvas patch</a> is almost done.  Except that we need more testing,
specifically for its MS Windows port.  (Though testers on other
operating systems like GNU/Linux and MacOS are also welcome.)
</p>

<p>
Since we don't have any computers running MS Windows, we are not sure
if the code is actually correct.
</p>

<p>
Please follow the following instructions for testing it on MS Windows.
You can discuss the results or ask us questions at <a href="https://codeberg.org/MonadicSheep/emacs/issues">MonadicSheep Emacs
Fork's Issue tracker</a>, #phi-mu-lambda on Libera IRC (<a href="https://web.libera.chat/?nick=CanvasTester?#phi-mu-lambda">open webchat in
browser</a>), or on the fediverse (tag the post with #emacs).
</p>
<div id="outline-container-Building%20GNU%20Emacs%20on%20MS%20Windows" class="outline-2">
<h2 id="Building%20GNU%20Emacs%20on%20MS%20Windows"><span class="section-number-2">1.</span> Building GNU Emacs on MS Windows</h2>
<div class="outline-text-2" id="text-1">
<p>
More detailed information is available <a href="https://codeberg.org/MonadicSheep/emacs/src/master/nt/INSTALL.W64">here</a>.
</p>
<ol class="org-ol">
<li>Install <a href="https://www.msys2.org/">MSYS2</a> by following the official instructions
mentioned there.</li>
<li>Open a MSYS2 UCRT64 session terminal.</li>
<li><p>
In the bash prompt, run the following commands to get the canvas
patch source code.
</p>
<div class="org-src-container">
<pre class="src src-bash"><code>pacman -Sy git
git clone https://codeberg.org/MonadicSheep/emacs
</code></pre>
</div></li>
<li><p>
Now, change directory to emacs source checkout, by running the
following command.
</p>
<div class="org-src-container">
<pre class="src src-bash"><code><span class="org-builtin">cd</span> emacs/
</code></pre>
</div></li>

<li><p>
Install dependencies,
</p>
<div class="org-src-container">
<pre class="src src-bash"><code>pacman -Sy --needed base-devel autoconf <span class="org-sh-escaped-newline">\</span>
mingw-w64-ucrt-x86_64-toolchain <span class="org-sh-escaped-newline">\</span>
mingw-w64-ucrt-x86_64-xpm-nox <span class="org-sh-escaped-newline">\</span>
mingw-w64-ucrt-x86_64-gmp <span class="org-sh-escaped-newline">\</span>
mingw-w64-ucrt-x86_64-gnutls <span class="org-sh-escaped-newline">\</span>
mingw-w64-ucrt-x86_64-libtiff <span class="org-sh-escaped-newline">\</span>
mingw-w64-ucrt-x86_64-giflib <span class="org-sh-escaped-newline">\</span>
mingw-w64-ucrt-x86_64-libpng <span class="org-sh-escaped-newline">\</span>
mingw-w64-ucrt-x86_64-libjpeg-turbo <span class="org-sh-escaped-newline">\</span>
mingw-w64-ucrt-x86_64-librsvg <span class="org-sh-escaped-newline">\</span>
mingw-w64-ucrt-x86_64-libwebp <span class="org-sh-escaped-newline">\</span>
mingw-w64-ucrt-x86_64-lcms2 <span class="org-sh-escaped-newline">\</span>
mingw-w64-ucrt-x86_64-libxml2 <span class="org-sh-escaped-newline">\</span>
mingw-w64-ucrt-x86_64-zlib <span class="org-sh-escaped-newline">\</span>
mingw-w64-ucrt-x86_64-harfbuzz <span class="org-sh-escaped-newline">\</span>
mingw-w64-ucrt-x86_64-libgccjit <span class="org-sh-escaped-newline">\</span>
mingw-w64-ucrt-x86_64-sqlite3 <span class="org-sh-escaped-newline">\</span>
mingw-w64-ucrt-x86_64-libtree-sitter
</code></pre>
</div></li>

<li><p>
Now, run the following command to build Emacs.
</p>
<div class="org-src-container">
<pre class="src src-bash"><code>make
</code></pre>
</div>
<p>
This may take a while depending on your hardware.
</p></li>
<li><p>
Once that is done, you should be able to start emacs with the
following command.
</p>
<div class="org-src-container">
<pre class="src src-bash"><code>./src/emacs
</code></pre>
</div></li>
</ol>
</div>
</div>
<div id="outline-container-Testing" class="outline-2">
<h2 id="Testing"><span class="section-number-2">2.</span> Testing</h2>
<div class="outline-text-2" id="text-2">
<p>
Evaluate the following in <code>*scratch*</code> (Using <code>C-c C-e</code> keybinding).
</p>
<div class="org-src-container">
<pre class="src src-emacs-lisp"><code>(<span class="org-keyword">defun</span> <span class="org-function-name">make-rect</span> (width height pixel)
  (make-vector (* width height) pixel))

(<span class="org-keyword">setq</span> rect-canvas-vec (make-rect 250 250 #xFFFF0000))
(<span class="org-keyword">setq</span> rect-canvas `(image <span class="org-builtin">:type</span> canvas
                          <span class="org-builtin">:data-width</span> 250
                          <span class="org-builtin">:data-height</span> 250
                          <span class="org-builtin">:data</span> ,rect-canvas-vec))
(insert (propertize <span class="org-string">"#"</span> 'display rect-canvas))

(<span class="org-keyword">defvar</span> <span class="org-variable-name">rect-canvas-timer</span> nil)
(<span class="org-keyword">let</span> ((i 0))
  (<span class="org-keyword">setq</span> rect-canvas-timer
        (run-with-timer
         0 0.016
         (<span class="org-keyword">lambda</span> ()
           (<span class="org-keyword">if</span> (&lt; i (* 20 250))
               (<span class="org-keyword">progn</span>
                 (aset rect-canvas-vec (+ (* 115 250) i) #xFF0000FF)
                 (canvas-refresh rect-canvas t)
                 (<span class="org-keyword">setq</span> i (1+ i)))
             (cancel-timer rect-canvas-timer))))))
</code></pre>
</div>

<p>
You should be able to see something like this.
</p>
<video controls="yes"><source src="/media/canvas-patch-testing-code-demo-rect.webm"></video>
</div>
</div>
]]>
</description></item>
<item>
<title>Hello there!</title>
<link>https://monadicsheep.org/blog/hello.html</link>
<pubDate>Mon, 22 Jun 2026 00:00:00 +0000</pubDate>
<guid>https://monadicsheep.org/blog/hello.html</guid>
<description>
<![CDATA[<div class="author">by Tushar and Divya</div><div class="org-org-date">2026 June 22</div><div class="tags"> <a class="tag" href="/blog/tag.html#meta">meta</a> <a class="tag" href="/blog/tag.html#emacs-reader">emacs-reader</a> <a class="tag" href="/blog/tag.html#pale">pale</a> <a class="tag" href="/blog/tag.html#canvas">canvas</a></div><p>
Hello there!  This is MonadicSheep’s first blog post.  Even though this is our first public post, we have been working on several projects over the last few months.  This will be a brief overview of the projects and their developments.
</p>
<div id="outline-container-Emacs%20Reader%3A%20An%20all-in-one%20document%20reader%20for%20GNU%20Emacs." class="outline-2">
<h2 id="Emacs%20Reader%3A%20An%20all-in-one%20document%20reader%20for%20GNU%20Emacs."><span class="section-number-2">1.</span> Emacs Reader: An all-in-one document reader for GNU Emacs.</h2>
<div class="outline-text-2" id="text-1">
<p>
This <a href="https://codeberg.org/MonadicSheep/emacs-reader">project</a> began in the summer of 2025, around late February/early March.  It was the result of Divya’s frustrations with <a href="https://pdftools.wiki/">pdf-tools</a> (who had been contemplating this project for a while by then).  Some of the frustrations were: <i>insane</i> memory usage (in gigabytes!) which made it hard to read multiple large PDF files, having to go back to <a href="https://www.gnu.org/software/emacs/manual/html_node/emacs/Document-View.html">DocView</a> for EPUBs and the like.  DocView itself suffers from many of the similar issues, and also is less featureful (though it does have some interesting unique features).
</p>

<p>
It was decided in the initial prototype to rely exclusively on MuPDF, the most efficient and performant PDF engine out there, ahead of Poppler (used by <code>pdf-tools</code>).  One thing led to another, and Tushar joined the work as well and <del>bullied</del> pushed Divya into getting Emacs Reader polished and published.  Tushar helped immensely in the Emacs Lisp side of things, while Divya took care of the dynamic module and integration with MuPDF.
</p>

<p>
To learn more about what Emacs Reader can do and see it in action, checkout our <a href="https://emacsconf.org/2025/talks/reader/">Emacs Conf Talk</a> from December 2025.
</p>
</div>
</div>
<div id="outline-container-PALE%20%26%20Canvas%20Patch" class="outline-2">
<h2 id="PALE%20%26%20Canvas%20Patch"><span class="section-number-2">2.</span> PALE &amp; Canvas Patch</h2>
<div class="outline-text-2" id="text-2">
<p>
We quickly hit a brick wall in developing Emacs-Reader.  Our <del>hacks</del> techniques to get Emacs to display the pages were not cutting it for displaying text highlights on the page.  And to at least try to keep emacs-reader a little simple, we decided to extract them into a separate library, <a href="https://codeberg.org/MonadicSheep/pale">PALE: Picture &amp; Animation Library for Emacs</a>, and somehow get text highlighting working… Which we were able to get working by dividing the images into smaller images (tiles).
</p>

<p>
Soon, Daniel Mendler (minad) looked at our work and suggested a <a href="https://lists.gnu.org/archive/html/bug-gnu-emacs/2026-01/msg01995.html">“canvas” patch upstream</a>, which would relieve us all of the hacks in PALE, and Emacs-Reader.
</p>

<p>
Check this <a href="https://tusharhero.codeberg.page/emacs-pale-canvas-and-stuff-demos.html">web page</a> for demos.
</p>

<p>
We are currently finalizing <a href="https://codeberg.org/MonadicSheep/emacs">a new version of the Canvas patch</a> with Daniel Mendler to be re-submitted to Emacs Devel.  The hope is that it gets merged eventually.  Meanwhile, we’re also working on integrating Canvas to Emacs Reader to test a few things.
</p>
</div>
</div>
<div id="outline-container-Insidious%3A%20Youtube%20Client" class="outline-2">
<h2 id="Insidious%3A%20Youtube%20Client"><span class="section-number-2">3.</span> Insidious: Youtube Client</h2>
<div class="outline-text-2" id="text-3">
<p>
This <a href="https://codeberg.org/MonadicSheep/insidious">project</a> is an Emacs client for YouTube for fetching video search results.  Tushar started working on it because he wanted to have search results from multiple pages, which <a href="https://thanosapollo.org/projects/yeetube/">Yeetube</a>, another package for doing the same, didn't support at the time.
</p>

<p>
It was <a href="https://web.archive.org/web/20260622043532/https://lists.gnu.org/archive/html/emacs-devel/2026-04/msg00636.html">submitted</a> for NonGNU ELPA but it wasn't merged because of software freedom concerns: the package, when playing videos, invokes mpv which invokes yt-dlp, which <i>could</i> execute non-free Javascript on the user's system.
</p>

<p>
The development is currently slow.  But we have plans to revive the project in the future, possibly integrating with <a href="#PALE%20%26%20Canvas%20Patch">PALE/Canvas Patch</a> to display the videos directly inside Emacs buffers.
</p>
</div>
</div>
]]>
</description></item>
</channel>
</rss>
