A Scripter's Notes

Emacs, scripting and anything text oriented.

Generating a transparent favicon

While generating a simple favicon for this blog, I went through a little exercise on how to generate a favicon with transparent background. I did not want the favicon with square block background which runs a risk of not blending well with the browser tab background as seen below:

Bad Favicon

Do ediff as I mean

In almost all of my ediff use cases, I would have windows open side-by-side in a frame, and then I would want to do a diff between the two using ediff-buffers.

But emacs doesn’t know that. So it always asks me to select the buffers I want to diff. The same problem is with ediff-files too.

So I came up with the below helper function to pick the correct ediff command ..

Elisp Meta Characters in String

The setup of outshine package for emacs requires the user to set the variable outline-minor-mode-prefix to "\M-#" before the outline-mode package (that ships with emacs) is loaded.

The best way to do this is via the Customize interface in emacs.

So I did M-x customize and set that variable’s value to "\M-#" and restarted emacs and that worked.

But then I was surprised to see that value being saved in the custom.el as '(outline-minor-mode-prefix "\243").

tmux Shift+Mouse

In tmux, I had been missing the select and middle-click method for copying and pasting stuff in terminal using mouse.

Save a macro as a function in emacs

I am in the process of converting traditional verilog test benches to SystemVerilog UVM test benches. As per the UVM methodology, it is recommended to use `uvm_info instead of $display statements so that the info statement encodes a Message ID and Message Verbosity along with the message required to be printed.

I won’t go in more detail about UVM and verilog as this post is about how I can save a macro that I use very frequently into an elisp function.