<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 <title>tizero's LLoGs</title>
 <id>gopher://sdf.org/0/users/tizero/feed.xml</id>
 <link href="gopher://sdf.org/0/users/tizero/feed.xml" rel="self" />
 <link href="gopher://sdf.org/1/users/tizero" />
 <updated>2025-08-30T11:24:40Z</updated>
 <entry>
   <id>gopher://sdf.org/0/users/tizero/2025-08-30.md</id>
   <title><![CDATA[LaTeX fragments in smu]]></title>
   <link href="gopher://sdf.org/0/users/tizero/2025-08-30.md" />
   <author><name>tizero</name></author>
   <content type="text">
     <![CDATA[LaTeX fragments in smu
======================


Subject: [PATCH] Do not process math inside LaTeX delimiters

---
smu.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/smu.c b/smu.c
index ebded4d..fb7a32e 100644
--- a/smu.c
+++ b/smu.c
@@ -76,6 +76,9 @@ static Tag surround[] = {
       { "**",         1,      "<strong>",     "</strong>" },
       { "_",          1,      "<em>",         "</em>" },
       { "*",          1,      "<em>",         "</em>" },
+       /* LaTeX delimiters */
+       { "$$",        -1,      "$$",           "$$" },
+       { "$",         -1,      "$",            "$"  },
};

static const char *replace[][2] = {
@@ -667,7 +670,9 @@ dosurround(const char *begin, const char *end, int newblock) {
                       l++;
               }

-               if (surround[i].process)
+               if (surround[i].process < 0)
+                       fwrite(start, sizeof(char), stop - start, stdout);
+               else if (surround[i].process)
                       process(start, stop, 0);
               else
                       hprint(start, stop);
--
2.50.1



References
----------

* https://github.com/karlb/smu]]>
   </content>
   <published>2025-08-30T00:00:00Z</published>
   <updated>2025-08-30T11:24:13Z</updated>
 </entry>
 <entry>
   <id>gopher://sdf.org/0/users/tizero/2025-08-04.md</id>
   <title><![CDATA[Custom plumber in Emacs and sacc]]></title>
   <link href="gopher://sdf.org/0/users/tizero/2025-08-04.md" />
   <author><name>tizero</name></author>
   <content type="text">
     <![CDATA[Custom plumber in Emacs and sacc
================================


Emacs
-----

When a URL button is pressed, Emacs invokes the browse-url function, which
tipically triggers xdg-open on Linux systems. If you want to use a custom
plumber script instead:

   ;;;$DOOMDIR/config.el

   (setq browse-url-browser-function 'browse-url-generic
         browse-url-generic-program "plumb")


sacc
----

The following patch makes sacc fire *plumber right away on selecting type BIN
IMG or GIF:

   diff -up sacc-1.07/sacc.c sacc-1.07-mod/sacc.c
   --- sacc-1.07/sacc.c        2023-07-31 22:01:45.000000000 +0200
   +++ sacc-1.07-mod/sacc.c    2025-08-04 18:02:25.409196008 +0200
   @@ -832,7 +832,13 @@ dig(Item *entry, Item *item)
       case '5':
       case '6':
       case '9':
   -           downloaditem(item);
   +   case 'I':
   +   case 'g':
   +           if (asprintf(&plumburi, "gopher://%s/%c%s",
   +                        item->host, t, item->selector) == -1)
   +                   return 0;
   +           execuri(plumber, "Plumbed", plumburi);
   +           free(plumburi);
               return 0;
       case '8':
               if (asprintf(&plumburi, "telnet://%s%s%s:%s",
   @@ -855,9 +861,6 @@ dig(Item *entry, Item *item)
                       diag("Type %c (%s) not supported", t, typedisplay(t));
                       return 0;
               }
   -   case 'g':
   -   case 'I':
   -           plumbitem(item);
       case 'i':
               return 0;
       }


Download
--------

* gopher://sdf.org/0/users/tizero/bin/sacc-plumber-1.07.diff]]>
   </content>
   <published>2025-08-04T00:00:00Z</published>
   <updated>2025-08-04T20:38:48Z</updated>
 </entry>
 <entry>
   <id>gopher://sdf.org/0/users/tizero/2025-08-02.md</id>
   <title><![CDATA[Little fix in sfeed_update]]></title>
   <link href="gopher://sdf.org/0/users/tizero/2025-08-02.md" />
   <author><name>tizero</name></author>
   <content type="text">
     <![CDATA[Little fix in sfeed_update
==========================


I use codemadness' sfeed as an RSS/Atom reader with its curses interface.
Noticed that new content for an entry with same id/title/link (e.g. edits
of a blog post after publishing) is not updated in feedfile when running
sfeed_update.

Issue: sort command inside merge() function.

   diff --git a/sfeed_update b/sfeed_update
   @@ -79,7 +79,7 @@ filter() {
    # merge raw files: unique sort by id, title, link.
    # merge(name, oldfile, newfile)
    merge() {
   -   sort -t '       ' -u -k6,6 -k2,2 -k3,3 "$2" "$3" 2>/dev/null
   +   sort -t '       ' -u -k6,6 -k2,2 -k3,3 "$3" "$2" 2>/dev/null
    }

    # order by timestamp (descending).


References
----------

*   https://codemadness.org/sfeed-simple-feed-parser.html
*   https://git.codemadness.org/sfeed/commit/e77e0165d3151ebe763a602adaa486af2467e6df.html]]>
   </content>
   <published>2025-08-02T00:00:00Z</published>
   <updated>2025-08-02T13:39:59Z</updated>
 </entry>
 <entry>
   <id>gopher://sdf.org/0/users/tizero/2025-08-01.md</id>
   <title><![CDATA[Simple blogging]]></title>
   <link href="gopher://sdf.org/0/users/tizero/2025-08-01.md" />
   <author><name>tizero</name></author>
   <content type="text">
     <![CDATA[Simple blogging
===============


Single bash script (inspired by codemadness `static-site-scripts`) to

*   generate `gophermap`
*   generate atom feed `feed.xml`
*   #push content to gopherhole


Caveats
-------

*   As usual, blogposts are represented by markdown files: these are supposed
   to reside in the same directory of the script
*   Filenames are supposed to be in the format `YYYY-MM-DD.md`


Download
--------

*   gopher://sdf.org/0/users/tizero/bin/simple-blogging.sh


References
----------

*   git://git.codemadness.org/static-site-scripts]]>
   </content>
   <published>2025-08-01T00:00:00Z</published>
   <updated>2025-08-01T23:03:06Z</updated>
 </entry>
 <entry>
   <id>gopher://sdf.org/0/users/tizero/2025-07-31.md</id>
   <title><![CDATA[A colorful pager]]></title>
   <link href="gopher://sdf.org/0/users/tizero/2025-07-31.md" />
   <author><name>tizero</name></author>
   <content type="text">
     <![CDATA[A colorful pager
================


   # ~/.bash_profile

   # Use less as a pager for tui clients as sfeed or sacc.
   #
   # Options:
   # - bold text --> bold + red
   # - underlined text --> underlined + blue
   # - prompt (lowerbar) --> blue no backrgound
   # - error messages (lowerbar) --> yellow no bg
   #
   export PAGER="less -R --use-color -Dd+r -Du+b -DPB- -DEY-"

   # Same thing for manual pages
   #
   export MANPAGER="$PAGER"
   export MANROFFOPT="-P -c"


References
----------

*   https://wiki.archlinux.org/title/Color_output_in_console
*   https://man.voidlinux.org/less.1]]>
   </content>
   <published>2025-07-31T00:00:00Z</published>
   <updated>2025-08-01T15:31:25Z</updated>
 </entry>
 <entry>
   <id>gopher://sdf.org/0/users/tizero/2025-07-30.md</id>
   <title><![CDATA[Gopher(s) links in CIRCE]]></title>
   <link href="gopher://sdf.org/0/users/tizero/2025-07-30.md" />
   <author><name>tizero</name></author>
   <content type="text">
     <![CDATA[Gopher(s) links in CIRCE
========================


*   In Doom Emacs turn any regexp starting with `gophers://` into clickable
   buttons:

       ;;; $DOOMDIR/config.el

       (add-to-list 'thing-at-point-uri-schemes "gophers://")

*   Add a desktop entry for sacc:

       # /usr/share/applications/sacc.desktop

       [Desktop Entry]
       Version=1.0
       Name=sacc
       GenericName=Web Browser
       Comment=Terminal gopher client
       Keywords=Internet;Gopher;Browser;Web;Explorer
       Exec=st -e /usr/bin/sacc %u
       Terminal=false
       Type=Application
       MimeType=x-scheme-handler/gopher;x-scheme-handler/gophers;
       Categories=Network;WebBrowser;

*   If there are no other desktop entries for gopher clients, `xdg-open` should
   now open gopher(s) links in sacc. If it doesn't, check the `mimeinfo.cache`
   file or use `xdg-settings`.


References
----------

*   https://github.com/emacs-circe/circe/blob/master/lui.el
*   https://wiki.archlinux.org/title/Xdg-open]]>
   </content>
   <published>2025-07-30T00:00:00Z</published>
   <updated>2025-08-01T15:27:49Z</updated>
 </entry>
</feed>