Apr 23,
2018

Emacs Backups

Howdy Interweb neighbor!

Today rambling is about a little known Emacs package that I found somewhat casually. Emacs has an internal mechanism to backup files1 and they could turn up useful in case of a disaster, supposing the mentioned disaster doesn't wipe the user's storage device or worse.

Anyway, I've always found them somewhat difficult to handle on the shell cause their name consists of the full path and the exclamation point ! is used as separator, a tricky character to use when on a shell. The end result was I seldom used them in the past. Or in other words, only as the last option.

Enters backup-walker, available on your local Melpa/Elpa repository.

backup-walker

This nifty tool permits to show the differences, using Emacs' ediff, between your currently opened file and its backed-up copies stored in your home dir, and as the name imply, one can literally walk the differences in the past with the p and n keys.

How did I lived without it until now?


  1. ironically they are usually the first thing disabled because the default is to create them on the same path of the modified file ↩︎

 
 

Mar 22,
2018

Sqlitebrowser

Hello folks!

A few days ago I needed to inspect an SQLite DB file and after a quick query through Google, I found out that I already had the Sqlitebrowser package installed but I somewhat forgot about it or to have used it at all.

After firing it up and used it for a couple of minutes I finally recalled why I stopped using it: it horribly breaks Gnome's Workspaces1.

(ノಠ益ಠ)ノ彡┻━┻

This time I chose to fix it, yak shaving time!

Well, to be honest I'm surprised that the issue isn't present on the Debian bug tracking system, I wonder what SQLite browser is used by the Gnome's majority, anyway on the upstream GitHub repository there's a bug report (#934) and a commit (c4c4cf62a2adf90c7604a920c409c27192f177ce) that allegedly should fix this issue.

Small divagation

I started to use Docker to rebuild packages as it's quite friction-less when one become familiar with the terminology and the concepts of images and containers. I was never quite comfortable with the deb-builder even if Docker has some limitations, for example cross-building is not an option, anyway with Debian's dget it's quite fast to get packages' sources and the building dependencies, assuming one is using Docker on a fast up-link with the Interweb or a packages proxy2.

Turning back to the subject of this post, the interested reader can find below the required patch for current Debian stable package:

--- orig/src/MainWindow.cpp 2016-10-03 01:25:32.000000000 +0200
+++ mod/src/MainWindow.cpp  2018-11-14 12:53:07.466422797 +0100
@@ -814,7 +814,6 @@
 {
     if (!visible) {
         // Update main window
-        activateWindow();
         ui->dataTable->setFocus();
     } else {
         // fill edit dock with actual data

By the way, after fixing it, I found another SQLite capable browser called Sequeler, that also supports MySQL, MariaDB and PostgreSQL, and sports in my opinion a quite slick GTK3 interface. The latest version is also available as Flatpak, a nice touch if someone asks me.

For the moment, it lacks the ability to modify a record directly from the interface, without typing an update query on the console, but in it's current form is nonetheless a quite useful tool.

Now after the interruption I can continue with the regular programme schedule.


  1. what are commonly called "virtual screens↩︎

  2. Ephemeral Logs Reprise ↩︎

 
 

Feb 05,
2018

Application Idea

Greetings random Interweb surfer.

Today I want to share my elevator pitch for a multimedia application that I've imagined a few days ago.

Imagine a book reader that, when a page where a song is mentioned, the book reader starts playing it in the background.

I haven't thought a lot about the implementation details. A strategy could be to distribute books with metadata about which song should be played and when. Another approach could be to infer directly from the content of a page if a song is mentioned.

I consciously completely avoided the "media rights" can of worms. So, if someone want to implement it, should feel free to do it with my blessing.

In my opinion it could be the best thing since the invention of the sliced bread.