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